@slidev/client 0.43.5 → 0.43.7
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/PlantUml.vue +6 -3
- package/builtin/Toc.vue +1 -2
- package/builtin/VClick.ts +2 -1
- package/builtin/VClicks.ts +1 -1
- package/composables/useNav.ts +2 -1
- package/composables/useViewTransition.ts +1 -1
- package/iframes/monaco/index.ts +2 -4
- package/internals/DrawingControls.vue +23 -3
- package/internals/Editor.vue +5 -0
- package/internals/HiddenText.vue +9 -0
- package/internals/InfoDialog.vue +1 -1
- package/internals/NavControls.vue +34 -8
- package/internals/NotesView.vue +4 -0
- package/internals/Presenter.vue +1 -1
- package/internals/PresenterPrint.vue +1 -1
- package/internals/RecordingControls.vue +4 -0
- package/internals/SlidesOverview.vue +2 -0
- package/layouts/iframe-left.vue +4 -4
- package/layouts/iframe-right.vue +1 -1
- package/layouts/iframe.vue +1 -1
- package/modules/context.ts +1 -1
- package/package.json +11 -11
- package/shim.d.ts +3 -2
package/builtin/PlantUml.vue
CHANGED
|
@@ -13,15 +13,18 @@ Alice -> Bob : Hello!
|
|
|
13
13
|
<script setup lang="ts">
|
|
14
14
|
import { computed } from 'vue'
|
|
15
15
|
|
|
16
|
-
const props = defineProps<{
|
|
16
|
+
const props = withDefaults(defineProps<{
|
|
17
17
|
code: string
|
|
18
18
|
server: string
|
|
19
19
|
scale?: number
|
|
20
|
-
|
|
20
|
+
alt?: string
|
|
21
|
+
}>(), {
|
|
22
|
+
alt: 'PlantUML diagram',
|
|
23
|
+
})
|
|
21
24
|
|
|
22
25
|
const uri = computed(() => `${props.server}/svg/${props.code}`)
|
|
23
26
|
</script>
|
|
24
27
|
|
|
25
28
|
<template>
|
|
26
|
-
<img
|
|
29
|
+
<img :src="uri" :style="{ scale }" :alt="alt">
|
|
27
30
|
</template>
|
package/builtin/Toc.vue
CHANGED
|
@@ -53,8 +53,7 @@ function filterTreeDepth(tree: TocItem[], level = 1): TocItem[] {
|
|
|
53
53
|
function filterOnlyCurrentTree(tree: TocItem[]): TocItem[] {
|
|
54
54
|
return tree
|
|
55
55
|
.filter(
|
|
56
|
-
(item: TocItem) =>
|
|
57
|
-
item.active || item.activeParent || item.hasActiveParent,
|
|
56
|
+
(item: TocItem) => item.active || item.activeParent || item.hasActiveParent,
|
|
58
57
|
)
|
|
59
58
|
.map((item: TocItem) => ({
|
|
60
59
|
...item,
|
package/builtin/VClick.ts
CHANGED
package/builtin/VClicks.ts
CHANGED
|
@@ -63,7 +63,7 @@ export default defineComponent({
|
|
|
63
63
|
if (!isVNode(i))
|
|
64
64
|
return i
|
|
65
65
|
if (listTags.includes(i.type as string) && Array.isArray(i.children)) {
|
|
66
|
-
// eslint-disable-next-line
|
|
66
|
+
// eslint-disable-next-line ts/no-use-before-define
|
|
67
67
|
const [vNodes, total] = mapChildren(i.children, depth + 1)
|
|
68
68
|
idx += total
|
|
69
69
|
return h(i, {}, [vNodes])
|
package/composables/useNav.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { computed } from 'vue'
|
|
|
3
3
|
import type { RouteLocationNormalizedLoaded, RouteRecordRaw } from 'vue-router'
|
|
4
4
|
import type { TocItem } from '@slidev/types'
|
|
5
5
|
import type { SlidevContextNav } from '../modules/context'
|
|
6
|
-
import { addToTree, downloadPDF, filterTree, getPath, getTreeWithActiveStatuses, next, nextSlide, openInEditor, prev, prevSlide } from '../logic/nav'
|
|
6
|
+
import { addToTree, downloadPDF, filterTree, getPath, getTreeWithActiveStatuses, go, next, nextSlide, openInEditor, prev, prevSlide } from '../logic/nav'
|
|
7
7
|
import { rawRoutes } from '../routes'
|
|
8
8
|
|
|
9
9
|
export function useNav(route: ComputedRef<RouteRecordRaw | RouteLocationNormalizedLoaded>): SlidevContextNav {
|
|
@@ -41,6 +41,7 @@ export function useNav(route: ComputedRef<RouteRecordRaw | RouteLocationNormaliz
|
|
|
41
41
|
rawTree,
|
|
42
42
|
treeWithActiveStatuses,
|
|
43
43
|
tree,
|
|
44
|
+
go,
|
|
44
45
|
downloadPDF,
|
|
45
46
|
next,
|
|
46
47
|
nextSlide,
|
|
@@ -31,7 +31,7 @@ export function useViewTransition() {
|
|
|
31
31
|
let changeRoute: () => void
|
|
32
32
|
const ready = new Promise<void>(resolve => (changeRoute = resolve))
|
|
33
33
|
|
|
34
|
-
// eslint-disable-next-line
|
|
34
|
+
// eslint-disable-next-line ts/ban-ts-comment
|
|
35
35
|
// @ts-expect-error
|
|
36
36
|
const transition = document.startViewTransition(() => {
|
|
37
37
|
changeRoute()
|
package/iframes/monaco/index.ts
CHANGED
|
@@ -138,8 +138,7 @@ async function start() {
|
|
|
138
138
|
update = () => {
|
|
139
139
|
monaco.editor.setTheme(props.dark
|
|
140
140
|
? (theme.dark || 'vitesse-dark')
|
|
141
|
-
: (theme.light || 'vitesse-light')
|
|
142
|
-
)
|
|
141
|
+
: (theme.light || 'vitesse-light'))
|
|
143
142
|
styleObject.innerHTML = `:root { ${props.style} }`
|
|
144
143
|
|
|
145
144
|
if (originalEditor.getValue().toString() !== props.code) {
|
|
@@ -213,8 +212,7 @@ async function start() {
|
|
|
213
212
|
update = () => {
|
|
214
213
|
monaco.editor.setTheme(props.dark
|
|
215
214
|
? (theme.dark || 'vitesse-dark')
|
|
216
|
-
: (theme.light || 'vitesse-light')
|
|
217
|
-
)
|
|
215
|
+
: (theme.light || 'vitesse-light'))
|
|
218
216
|
styleObject.innerHTML = `:root { ${props.style} }`
|
|
219
217
|
|
|
220
218
|
if (originalEditor.getValue().toString() !== props.code) {
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import {
|
|
3
|
-
brush,
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
brush,
|
|
4
|
+
brushColors,
|
|
5
|
+
canClear,
|
|
6
|
+
canRedo,
|
|
7
|
+
canUndo,
|
|
8
|
+
clearDrauu,
|
|
9
|
+
drauu,
|
|
10
|
+
drawingEnabled,
|
|
11
|
+
drawingMode,
|
|
12
|
+
drawingPinned,
|
|
6
13
|
} from '../logic/drawings'
|
|
7
14
|
import VerticalDivider from './VerticalDivider.vue'
|
|
8
15
|
import Draggable from './Draggable.vue'
|
|
16
|
+
import HiddenText from './HiddenText.vue'
|
|
9
17
|
|
|
10
18
|
function undo() {
|
|
11
19
|
drauu.undo()
|
|
@@ -33,24 +41,30 @@ function setBrushColor(color: typeof brush.color) {
|
|
|
33
41
|
:initial-y="10"
|
|
34
42
|
>
|
|
35
43
|
<button class="slidev-icon-btn" :class="{ shallow: drawingMode !== 'stylus' }" @click="setDrawingMode('stylus')">
|
|
44
|
+
<HiddenText text="Draw with stylus" />
|
|
36
45
|
<carbon:pen />
|
|
37
46
|
</button>
|
|
38
47
|
<button class="slidev-icon-btn" :class="{ shallow: drawingMode !== 'line' }" @click="setDrawingMode('line')">
|
|
48
|
+
<HiddenText text="Draw a line" />
|
|
39
49
|
<svg width="1em" height="1em" class="-mt-0.5" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
|
|
40
50
|
<path d="M21.71 3.29a1 1 0 0 0-1.42 0l-18 18a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l18-18a1 1 0 0 0 0-1.42z" fill="currentColor" />
|
|
41
51
|
</svg>
|
|
42
52
|
</button>
|
|
43
53
|
<button class="slidev-icon-btn" :class="{ shallow: drawingMode !== 'arrow' }" @click="setDrawingMode('arrow')">
|
|
54
|
+
<HiddenText text="Draw an arrow" />
|
|
44
55
|
<carbon:arrow-up-right />
|
|
45
56
|
</button>
|
|
46
57
|
<button class="slidev-icon-btn" :class="{ shallow: drawingMode !== 'ellipse' }" @click="setDrawingMode('ellipse')">
|
|
58
|
+
<HiddenText text="Draw an ellipse" />
|
|
47
59
|
<carbon:radio-button />
|
|
48
60
|
</button>
|
|
49
61
|
<button class="slidev-icon-btn" :class="{ shallow: drawingMode !== 'rectangle' }" @click="setDrawingMode('rectangle')">
|
|
62
|
+
<HiddenText text="Draw a rectangle" />
|
|
50
63
|
<carbon:checkbox />
|
|
51
64
|
</button>
|
|
52
65
|
<!-- TODO: not sure why it's not working! -->
|
|
53
66
|
<!-- <button class="slidev-icon-btn" :class="{ shallow: drawingMode != 'eraseLine' }" @click="setDrawingMode('eraseLine')">
|
|
67
|
+
<HiddenText text="Erase" />
|
|
54
68
|
<carbon:erase />
|
|
55
69
|
</button> -->
|
|
56
70
|
|
|
@@ -63,6 +77,7 @@ function setBrushColor(color: typeof brush.color) {
|
|
|
63
77
|
:class="brush.color === color ? 'active' : 'shallow'"
|
|
64
78
|
@click="setBrushColor(color)"
|
|
65
79
|
>
|
|
80
|
+
<HiddenText text="Set brush color" />
|
|
66
81
|
<div
|
|
67
82
|
class="w-6 h-6 transition-all transform border border-gray-400/50"
|
|
68
83
|
:class="brush.color !== color ? 'rounded-1/2 scale-85' : 'rounded-md'"
|
|
@@ -73,17 +88,21 @@ function setBrushColor(color: typeof brush.color) {
|
|
|
73
88
|
<VerticalDivider />
|
|
74
89
|
|
|
75
90
|
<button class="slidev-icon-btn" :class="{ disabled: !canUndo }" @click="undo()">
|
|
91
|
+
<HiddenText text="Undo" />
|
|
76
92
|
<carbon:undo />
|
|
77
93
|
</button>
|
|
78
94
|
<button class="slidev-icon-btn" :class="{ disabled: !canRedo }" @click="redo()">
|
|
95
|
+
<HiddenText text="Redo" />
|
|
79
96
|
<carbon:redo />
|
|
80
97
|
</button>
|
|
81
98
|
<button class="slidev-icon-btn" :class="{ disabled: !canClear }" @click="clearDrauu()">
|
|
99
|
+
<HiddenText text="Delete" />
|
|
82
100
|
<carbon:delete />
|
|
83
101
|
</button>
|
|
84
102
|
|
|
85
103
|
<VerticalDivider />
|
|
86
104
|
<button class="slidev-icon-btn" :class="{ shallow: !drawingPinned }" @click="drawingPinned = !drawingPinned">
|
|
105
|
+
<HiddenText :text="drawingPinned ? 'Unpin drawing' : 'Pin drawing'" />
|
|
87
106
|
<carbon:pin-filled v-show="drawingPinned" class="transform -rotate-45" />
|
|
88
107
|
<carbon:pin v-show="!drawingPinned" />
|
|
89
108
|
</button>
|
|
@@ -93,6 +112,7 @@ function setBrushColor(color: typeof brush.color) {
|
|
|
93
112
|
:class="{ shallow: !drawingEnabled }"
|
|
94
113
|
@click="drawingEnabled = !drawingEnabled"
|
|
95
114
|
>
|
|
115
|
+
<HiddenText :text="drawingPinned ? 'Drawing pinned' : 'Drawing unpinned'" />
|
|
96
116
|
<carbon:error v-show="drawingPinned" />
|
|
97
117
|
<carbon:close-outline v-show="!drawingPinned" />
|
|
98
118
|
</button>
|
package/internals/Editor.vue
CHANGED
|
@@ -5,6 +5,7 @@ import { activeElement, editorWidth, isInputting, showEditor } from '../state'
|
|
|
5
5
|
import { useCodeMirror } from '../setup/codemirror'
|
|
6
6
|
import { currentSlideId, openInEditor } from '../logic/nav'
|
|
7
7
|
import { useDynamicSlideInfo } from '../logic/note'
|
|
8
|
+
import HiddenText from './HiddenText.vue'
|
|
8
9
|
|
|
9
10
|
const props = defineProps<{
|
|
10
11
|
resize: boolean
|
|
@@ -147,9 +148,11 @@ throttledWatch(
|
|
|
147
148
|
<div class="flex pb-2 text-xl -mt-1">
|
|
148
149
|
<div class="mr-4 rounded flex">
|
|
149
150
|
<button class="slidev-icon-btn" :class="tab === 'content' ? 'text-$slidev-theme-primary' : ''" @click="switchTab('content')">
|
|
151
|
+
<HiddenText text="Switch to content tab" />
|
|
150
152
|
<carbon:account />
|
|
151
153
|
</button>
|
|
152
154
|
<button class="slidev-icon-btn" :class="tab === 'note' ? 'text-$slidev-theme-primary' : ''" @click="switchTab('note')">
|
|
155
|
+
<HiddenText text="Switch to notes tab" />
|
|
153
156
|
<carbon:align-box-bottom-right />
|
|
154
157
|
</button>
|
|
155
158
|
</div>
|
|
@@ -158,9 +161,11 @@ throttledWatch(
|
|
|
158
161
|
</span>
|
|
159
162
|
<div class="flex-auto" />
|
|
160
163
|
<button class="slidev-icon-btn" @click="openInEditor()">
|
|
164
|
+
<HiddenText text="Open in editor" />
|
|
161
165
|
<carbon:launch />
|
|
162
166
|
</button>
|
|
163
167
|
<button class="slidev-icon-btn" @click="close">
|
|
168
|
+
<HiddenText text="Close" />
|
|
164
169
|
<carbon:close />
|
|
165
170
|
</button>
|
|
166
171
|
</div>
|
package/internals/InfoDialog.vue
CHANGED
|
@@ -8,6 +8,7 @@ import { configs } from '../env'
|
|
|
8
8
|
import Settings from './Settings.vue'
|
|
9
9
|
import MenuButton from './MenuButton.vue'
|
|
10
10
|
import VerticalDivider from './VerticalDivider.vue'
|
|
11
|
+
import HiddenText from './HiddenText.vue'
|
|
11
12
|
|
|
12
13
|
// @ts-expect-error virtual module
|
|
13
14
|
import CustomNavControls from '/@slidev/custom-nav-controls'
|
|
@@ -33,8 +34,7 @@ function onMouseLeave() {
|
|
|
33
34
|
|
|
34
35
|
const barStyle = computed(() => props.persist
|
|
35
36
|
? 'text-$slidev-controls-foreground bg-transparent'
|
|
36
|
-
: 'rounded-md bg-main shadow dark:border dark:border-gray-400 dark:border-opacity-10'
|
|
37
|
-
)
|
|
37
|
+
: 'rounded-md bg-main shadow dark:border dark:border-gray-400 dark:border-opacity-10')
|
|
38
38
|
|
|
39
39
|
const RecordingControls = shallowRef<any>()
|
|
40
40
|
if (__SLIDEV_FEATURE_RECORD__)
|
|
@@ -53,19 +53,28 @@ if (__SLIDEV_FEATURE_DRAWINGS__)
|
|
|
53
53
|
@mouseleave="onMouseLeave"
|
|
54
54
|
>
|
|
55
55
|
<button v-if="!isEmbedded" class="slidev-icon-btn" @click="toggleFullscreen">
|
|
56
|
-
<
|
|
57
|
-
|
|
56
|
+
<template v-if="isFullscreen">
|
|
57
|
+
<HiddenText text="Close fullscreen" />
|
|
58
|
+
<carbon:minimize />
|
|
59
|
+
</template>
|
|
60
|
+
<template v-else>
|
|
61
|
+
<HiddenText text="Enter fullscreen" />
|
|
62
|
+
<carbon:maximize />
|
|
63
|
+
</template>
|
|
58
64
|
</button>
|
|
59
65
|
|
|
60
66
|
<button class="slidev-icon-btn" :class="{ disabled: !hasPrev }" @click="prev">
|
|
67
|
+
<HiddenText text="Go to previous slide" />
|
|
61
68
|
<carbon:arrow-left />
|
|
62
69
|
</button>
|
|
63
70
|
|
|
64
71
|
<button class="slidev-icon-btn" :class="{ disabled: !hasNext }" title="Next" @click="next">
|
|
72
|
+
<HiddenText text="Go to next slide" />
|
|
65
73
|
<carbon:arrow-right />
|
|
66
74
|
</button>
|
|
67
75
|
|
|
68
76
|
<button v-if="!isEmbedded" class="slidev-icon-btn" title="Slides overview" @click="toggleOverview()">
|
|
77
|
+
<HiddenText text="Show slide overview" />
|
|
69
78
|
<carbon:apps />
|
|
70
79
|
</button>
|
|
71
80
|
|
|
@@ -75,8 +84,14 @@ if (__SLIDEV_FEATURE_DRAWINGS__)
|
|
|
75
84
|
title="Toggle dark mode"
|
|
76
85
|
@click="toggleDark()"
|
|
77
86
|
>
|
|
78
|
-
<
|
|
79
|
-
|
|
87
|
+
<template v-if="isDark">
|
|
88
|
+
<HiddenText text="Switch to light theme" />
|
|
89
|
+
<carbon-moon />
|
|
90
|
+
</template>
|
|
91
|
+
<template v-else>
|
|
92
|
+
<HiddenText text="Switch to dark mode theme" />
|
|
93
|
+
<carbon-sun />
|
|
94
|
+
</template>
|
|
80
95
|
</button>
|
|
81
96
|
|
|
82
97
|
<VerticalDivider />
|
|
@@ -93,13 +108,20 @@ if (__SLIDEV_FEATURE_DRAWINGS__)
|
|
|
93
108
|
title="Show presenter cursor"
|
|
94
109
|
@click="showPresenterCursor = !showPresenterCursor"
|
|
95
110
|
>
|
|
96
|
-
<
|
|
97
|
-
|
|
111
|
+
<template v-if="showPresenterCursor">
|
|
112
|
+
<HiddenText text="Hide presenter cursor" />
|
|
113
|
+
<ph-cursor-fill />
|
|
114
|
+
</template>
|
|
115
|
+
<template v-else>
|
|
116
|
+
<HiddenText text="Show presenter cursor" />
|
|
117
|
+
<ph-cursor-duotone />
|
|
118
|
+
</template>
|
|
98
119
|
</button>
|
|
99
120
|
</template>
|
|
100
121
|
|
|
101
122
|
<template v-if="__SLIDEV_FEATURE_DRAWINGS__ && (!configs.drawings.presenterOnly || isPresenter) && !isEmbedded">
|
|
102
123
|
<button class="slidev-icon-btn relative" title="Drawing" @click="drawingEnabled = !drawingEnabled">
|
|
124
|
+
<HiddenText v-if="drawingEnabled" :text="drawingEnabled ? 'Hide drawing toolbar' : 'Show drawing toolbar'" />
|
|
103
125
|
<carbon:pen />
|
|
104
126
|
<div
|
|
105
127
|
v-if="drawingEnabled"
|
|
@@ -123,11 +145,13 @@ if (__SLIDEV_FEATURE_DRAWINGS__)
|
|
|
123
145
|
class="slidev-icon-btn <md:hidden"
|
|
124
146
|
@click="showEditor = !showEditor"
|
|
125
147
|
>
|
|
148
|
+
<HiddenText :text="showEditor ? 'Hide editor' : 'Show editor'" />
|
|
126
149
|
<carbon:text-annotation-toggle />
|
|
127
150
|
</button>
|
|
128
151
|
</template>
|
|
129
152
|
<template v-if="!__DEV__">
|
|
130
153
|
<button v-if="configs.download" class="slidev-icon-btn" @click="downloadPDF">
|
|
154
|
+
<HiddenText text="Download as PDF" />
|
|
131
155
|
<carbon:download />
|
|
132
156
|
</button>
|
|
133
157
|
</template>
|
|
@@ -137,6 +161,7 @@ if (__SLIDEV_FEATURE_DRAWINGS__)
|
|
|
137
161
|
class="slidev-icon-btn"
|
|
138
162
|
@click="showInfoDialog = !showInfoDialog"
|
|
139
163
|
>
|
|
164
|
+
<HiddenText text="Show info" />
|
|
140
165
|
<carbon:information />
|
|
141
166
|
</button>
|
|
142
167
|
|
|
@@ -144,6 +169,7 @@ if (__SLIDEV_FEATURE_DRAWINGS__)
|
|
|
144
169
|
<MenuButton>
|
|
145
170
|
<template #button>
|
|
146
171
|
<button class="slidev-icon-btn">
|
|
172
|
+
<HiddenText text="Adjust settings" />
|
|
147
173
|
<carbon:settings-adjust />
|
|
148
174
|
</button>
|
|
149
175
|
</template>
|
package/internals/NotesView.vue
CHANGED
|
@@ -8,6 +8,7 @@ import { fullscreen } from '../state'
|
|
|
8
8
|
import { total } from '../logic/nav'
|
|
9
9
|
import { rawRoutes } from '../routes'
|
|
10
10
|
import NoteDisplay from './NoteDisplay.vue'
|
|
11
|
+
import HiddenText from './HiddenText.vue'
|
|
11
12
|
|
|
12
13
|
const slideTitle = configs.titleTemplate.replace('%s', configs.title || 'Slidev')
|
|
13
14
|
useHead({
|
|
@@ -57,13 +58,16 @@ function decreaseFontSize() {
|
|
|
57
58
|
<div class="flex-none border-t border-gray-400 border-opacity-20">
|
|
58
59
|
<div class="flex gap-1 items-center px-6 py-3">
|
|
59
60
|
<button class="slidev-icon-btn" @click="toggleFullscreen">
|
|
61
|
+
<HiddenText :text="isFullscreen ? 'Close fullscreen' : 'Enter fullscreen'" />
|
|
60
62
|
<carbon:minimize v-if="isFullscreen" />
|
|
61
63
|
<carbon:maximize v-else />
|
|
62
64
|
</button>
|
|
63
65
|
<button class="slidev-icon-btn" @click="increaseFontSize">
|
|
66
|
+
<HiddenText text="Increase font size" />
|
|
64
67
|
<carbon:zoom-in />
|
|
65
68
|
</button>
|
|
66
69
|
<button class="slidev-icon-btn" @click="decreaseFontSize">
|
|
70
|
+
<HiddenText text="Decrease font size" />
|
|
67
71
|
<carbon:zoom-out />
|
|
68
72
|
</button>
|
|
69
73
|
<div class="flex-auto" />
|
package/internals/Presenter.vue
CHANGED
|
@@ -88,7 +88,7 @@ onMounted(() => {
|
|
|
88
88
|
<div class="bg-main h-full slidev-presenter">
|
|
89
89
|
<div class="grid-container">
|
|
90
90
|
<div class="grid-section top flex">
|
|
91
|
-
<img src="../assets/logo-title-horizontal.png" class="ml-2 my-auto h-10 py-1 lg:h-14 lg:py-2" style="height: 3.5rem;">
|
|
91
|
+
<img src="../assets/logo-title-horizontal.png" class="ml-2 my-auto h-10 py-1 lg:h-14 lg:py-2" style="height: 3.5rem;" alt="Slidev logo">
|
|
92
92
|
<div class="flex-auto" />
|
|
93
93
|
<div
|
|
94
94
|
class="timer-btn my-auto relative w-22px h-22px cursor-pointer text-lg"
|
|
@@ -5,6 +5,7 @@ import { recorder } from '../logic/recording'
|
|
|
5
5
|
import { currentCamera, showRecordingDialog } from '../state'
|
|
6
6
|
import DevicesList from './DevicesList.vue'
|
|
7
7
|
import MenuButton from './MenuButton.vue'
|
|
8
|
+
import HiddenText from './HiddenText.vue'
|
|
8
9
|
|
|
9
10
|
const {
|
|
10
11
|
recording,
|
|
@@ -40,6 +41,7 @@ onMounted(() => {
|
|
|
40
41
|
title="Show camera view"
|
|
41
42
|
@click="toggleAvatar"
|
|
42
43
|
>
|
|
44
|
+
<HiddenText text="Toggle camera view" />
|
|
43
45
|
<carbon:user-avatar />
|
|
44
46
|
</button>
|
|
45
47
|
|
|
@@ -49,12 +51,14 @@ onMounted(() => {
|
|
|
49
51
|
title="Recording"
|
|
50
52
|
@click="toggleRecording"
|
|
51
53
|
>
|
|
54
|
+
<HiddenText :text="recording ? 'Stop record video' : 'Record video'" />
|
|
52
55
|
<carbon:stop-outline v-if="recording" />
|
|
53
56
|
<carbon:video v-else />
|
|
54
57
|
</button>
|
|
55
58
|
<MenuButton :disabled="recording">
|
|
56
59
|
<template #button>
|
|
57
60
|
<button class="slidev-icon-btn h-full !text-sm !px-0">
|
|
61
|
+
<HiddenText text="Select recording device" />
|
|
58
62
|
<carbon:chevron-up class="opacity-50" />
|
|
59
63
|
</button>
|
|
60
64
|
</template>
|
|
@@ -9,6 +9,7 @@ import { getSlideClass } from '../utils'
|
|
|
9
9
|
import SlideContainer from './SlideContainer.vue'
|
|
10
10
|
import SlideWrapper from './SlideWrapper'
|
|
11
11
|
import DrawingPreview from './DrawingPreview.vue'
|
|
12
|
+
import HiddenText from './HiddenText.vue'
|
|
12
13
|
|
|
13
14
|
const props = defineProps<{ modelValue: boolean }>()
|
|
14
15
|
|
|
@@ -157,6 +158,7 @@ watchEffect(() => {
|
|
|
157
158
|
</div>
|
|
158
159
|
</Transition>
|
|
159
160
|
<button v-if="value" class="fixed text-2xl top-4 right-4 slidev-icon-btn text-gray-400" @click="close">
|
|
161
|
+
<HiddenText text="Close" />
|
|
160
162
|
<carbon:close />
|
|
161
163
|
</button>
|
|
162
164
|
</template>
|
package/layouts/iframe-left.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed } from '
|
|
2
|
+
import { computed } from 'vue'
|
|
3
3
|
|
|
4
4
|
const props = defineProps<{
|
|
5
5
|
url: string
|
|
@@ -17,9 +17,9 @@ const scaleInvertPercent = computed(() => `${(1 / (props.scale || 1)) * 100}%`)
|
|
|
17
17
|
:src="url"
|
|
18
18
|
:style="scale ? { transform: `scale(${scale})`, transformOrigin: 'top left' } : {}"
|
|
19
19
|
/>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
</div>
|
|
21
|
+
<div class="slidev-layout default" v-bind="$attrs">
|
|
22
|
+
<slot />
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
25
25
|
</template>
|
package/layouts/iframe-right.vue
CHANGED
package/layouts/iframe.vue
CHANGED
package/modules/context.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { isDark } from '../logic/dark'
|
|
|
9
9
|
import { injectionClicks, injectionCurrentPage, injectionSlidevContext } from '../constants'
|
|
10
10
|
import { useContext } from '../composables/useContext'
|
|
11
11
|
|
|
12
|
-
export type SlidevContextNavKey = 'path' | 'total' | 'currentPage' | 'currentPath' | 'currentRoute' | 'currentSlideId' | 'currentLayout' | 'nextRoute' | 'rawTree' | 'treeWithActiveStatuses' | 'tree' | 'downloadPDF' | 'next' | 'nextSlide' | 'openInEditor' | 'prev' | 'prevSlide' | 'rawRoutes'
|
|
12
|
+
export type SlidevContextNavKey = 'path' | 'total' | 'currentPage' | 'currentPath' | 'currentRoute' | 'currentSlideId' | 'currentLayout' | 'nextRoute' | 'rawTree' | 'treeWithActiveStatuses' | 'tree' | 'downloadPDF' | 'next' | 'nextSlide' | 'openInEditor' | 'prev' | 'prevSlide' | 'rawRoutes' | 'go'
|
|
13
13
|
export type SlidevContextNavClicksKey = 'clicks' | 'clicksElements' | 'clicksTotal' | 'hasNext' | 'hasPrev'
|
|
14
14
|
|
|
15
15
|
export interface SlidevContextNav extends Pick<typeof nav, SlidevContextNavKey> {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.7",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@antfu/utils": "^0.7.6",
|
|
19
|
-
"@unocss/reset": "^0.
|
|
20
|
-
"@vueuse/core": "^10.
|
|
19
|
+
"@unocss/reset": "^0.56.5",
|
|
20
|
+
"@vueuse/core": "^10.5.0",
|
|
21
21
|
"@vueuse/head": "^2.0.0",
|
|
22
|
-
"@vueuse/math": "^10.
|
|
22
|
+
"@vueuse/math": "^10.5.0",
|
|
23
23
|
"@vueuse/motion": "^2.0.0",
|
|
24
24
|
"codemirror": "^5.65.5",
|
|
25
25
|
"defu": "^6.1.2",
|
|
@@ -28,23 +28,23 @@
|
|
|
28
28
|
"fuse.js": "^6.6.2",
|
|
29
29
|
"js-base64": "^3.7.5",
|
|
30
30
|
"js-yaml": "^4.1.0",
|
|
31
|
-
"katex": "^0.16.
|
|
32
|
-
"mermaid": "^10.
|
|
31
|
+
"katex": "^0.16.9",
|
|
32
|
+
"mermaid": "^10.5.0",
|
|
33
33
|
"monaco-editor": "^0.37.1",
|
|
34
34
|
"nanoid": "^5.0.1",
|
|
35
35
|
"prettier": "^3.0.3",
|
|
36
36
|
"recordrtc": "^5.6.2",
|
|
37
37
|
"resolve": "^1.22.6",
|
|
38
|
-
"unocss": "^0.
|
|
38
|
+
"unocss": "^0.56.5",
|
|
39
39
|
"vite-plugin-windicss": "^1.9.1",
|
|
40
40
|
"vue": "^3.3.4",
|
|
41
|
-
"vue-router": "^4.2.
|
|
41
|
+
"vue-router": "^4.2.5",
|
|
42
42
|
"vue-starport": "^0.4.0",
|
|
43
43
|
"windicss": "^3.5.6",
|
|
44
|
-
"@slidev/parser": "0.43.
|
|
45
|
-
"@slidev/types": "0.43.
|
|
44
|
+
"@slidev/parser": "0.43.7",
|
|
45
|
+
"@slidev/types": "0.43.7"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"vite": "^4.4.
|
|
48
|
+
"vite": "^4.4.11"
|
|
49
49
|
}
|
|
50
50
|
}
|
package/shim.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
1
|
declare interface Window {
|
|
4
2
|
// extend the window
|
|
5
3
|
}
|
|
@@ -9,16 +7,19 @@ declare module '*.vue';
|
|
|
9
7
|
// with unplugin-vue-markdown, markdowns can be treat as Vue components
|
|
10
8
|
declare module '*.md' {
|
|
11
9
|
import type { ComponentOptions } from 'vue'
|
|
10
|
+
|
|
12
11
|
const component: ComponentOptions
|
|
13
12
|
export default component
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
declare module '/@slidev/configs' {
|
|
17
16
|
import { SlidevConfig } from '@slidev/types'
|
|
17
|
+
|
|
18
18
|
export default SlidevConfig
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
declare module 'mermaid/dist/mermaid.esm.mjs' {
|
|
22
22
|
import Mermaid from 'mermaid/dist/mermaid.d.ts'
|
|
23
|
+
|
|
23
24
|
export default Mermaid
|
|
24
25
|
}
|