@slidev/client 0.27.16 → 0.27.20
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/Mermaid.vue +1 -1
- package/builtin/Monaco.vue +1 -1
- package/builtin/PlantUml.vue +1 -1
- package/builtin/VAfter.ts +2 -1
- package/builtin/VClicks.ts +2 -1
- package/builtin/Youtube.vue +1 -1
- package/constants.ts +1 -1
- package/env.ts +1 -1
- package/internals/DrawingControls.vue +1 -1
- package/internals/DrawingLayer.vue +1 -1
- package/internals/DrawingPreview.vue +1 -1
- package/internals/Editor.vue +2 -2
- package/internals/Goto.vue +1 -1
- package/internals/InfoDialog.vue +1 -1
- package/internals/NavControls.vue +1 -1
- package/internals/NoteEditor.vue +2 -2
- package/internals/Presenter.vue +2 -2
- package/internals/RecordingDialog.vue +4 -4
- package/internals/WebCamera.vue +1 -2
- package/layouts/iframe-left.vue +2 -11
- package/layouts/iframe-right.vue +2 -11
- package/layouts/iframe.vue +2 -8
- package/layouts/image-left.vue +1 -1
- package/layouts/image-right.vue +1 -1
- package/logic/drawings.ts +2 -1
- package/logic/nav.ts +2 -1
- package/logic/note.ts +4 -2
- package/logic/recording.ts +3 -2
- package/logic/shortcuts.ts +4 -2
- package/modules/context.ts +2 -1
- package/modules/directives.ts +2 -1
- package/package.json +12 -12
- package/routes.ts +2 -1
- package/setup/codemirror.ts +2 -1
- package/setup/main.ts +1 -1
- package/setup/mermaid.ts +2 -1
- package/setup/monaco.ts +1 -1
- package/setup/shortcuts.ts +1 -1
- package/shim.d.ts +1 -1
package/builtin/Mermaid.vue
CHANGED
package/builtin/Monaco.vue
CHANGED
|
@@ -12,7 +12,7 @@ Learn more: https://sli.dev/guide/syntax.html#monaco-editor
|
|
|
12
12
|
-->
|
|
13
13
|
|
|
14
14
|
<template>
|
|
15
|
-
<iframe ref="iframe" class="text-base w-full rounded" :style="{ height }"
|
|
15
|
+
<iframe ref="iframe" class="text-base w-full rounded" :style="{ height }" />
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<script setup lang="ts">
|
package/builtin/PlantUml.vue
CHANGED
package/builtin/VAfter.ts
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { toArray } from '@antfu/utils'
|
|
8
|
-
import {
|
|
8
|
+
import type { Directive, VNode } from 'vue'
|
|
9
|
+
import { defineComponent, h, resolveDirective, withDirectives } from 'vue'
|
|
9
10
|
|
|
10
11
|
export default defineComponent({
|
|
11
12
|
render() {
|
package/builtin/VClicks.ts
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { toArray } from '@antfu/utils'
|
|
8
|
-
import {
|
|
8
|
+
import type { Directive, VNode, VNodeArrayChildren } from 'vue'
|
|
9
|
+
import { defineComponent, h, isVNode, resolveDirective, withDirectives } from 'vue'
|
|
9
10
|
|
|
10
11
|
export default defineComponent({
|
|
11
12
|
props: {
|
package/builtin/Youtube.vue
CHANGED
package/constants.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComputedRef, InjectionKey, Ref } from 'vue'
|
|
1
|
+
import type { ComputedRef, InjectionKey, Ref } from 'vue'
|
|
2
2
|
|
|
3
3
|
export const injectionClicks: InjectionKey<Ref<number>> = Symbol('v-click-clicks')
|
|
4
4
|
export const injectionClicksElements: InjectionKey<Ref<(Element | string)[]>> = Symbol('v-click-clicks-elements')
|
package/env.ts
CHANGED
|
@@ -36,7 +36,7 @@ function setBrushColor(color: typeof brush.color) {
|
|
|
36
36
|
</button>
|
|
37
37
|
<button class="icon-btn" :class="{ shallow: drawingMode != 'line' }" @click="setDrawingMode('line')">
|
|
38
38
|
<svg width="1em" height="1em" class="-mt-0.5" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
|
|
39
|
-
<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"
|
|
39
|
+
<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" />
|
|
40
40
|
</svg>
|
|
41
41
|
</button>
|
|
42
42
|
<button class="icon-btn" :class="{ shallow: drawingMode != 'arrow' }" @click="setDrawingMode('arrow')">
|
package/internals/Editor.vue
CHANGED
|
@@ -130,7 +130,7 @@ throttledWatch(
|
|
|
130
130
|
:class="{'!opacity-30': handlerDown}"
|
|
131
131
|
:style="{right: `${editorWidth - 5}px`, cursor: 'col-resize'}"
|
|
132
132
|
@pointerdown="onHandlerDown"
|
|
133
|
-
|
|
133
|
+
/>
|
|
134
134
|
<div
|
|
135
135
|
class="shadow bg-main p-4 grid grid-rows-[max-content,1fr] h-full overflow-hidden border-l border-gray-400 border-opacity-20"
|
|
136
136
|
:style="{width: `${editorWidth}px`}"
|
|
@@ -147,7 +147,7 @@ throttledWatch(
|
|
|
147
147
|
<span class="text-2xl pt-1">
|
|
148
148
|
{{ tab === 'content' ? 'Slide' : 'Notes' }}
|
|
149
149
|
</span>
|
|
150
|
-
<div class="flex-auto"
|
|
150
|
+
<div class="flex-auto" />
|
|
151
151
|
<button class="icon-btn" @click="openInEditor()">
|
|
152
152
|
<carbon:launch />
|
|
153
153
|
</button>
|
package/internals/Goto.vue
CHANGED
package/internals/InfoDialog.vue
CHANGED
package/internals/NoteEditor.vue
CHANGED
|
@@ -66,14 +66,14 @@ onClickOutside(input, () => {
|
|
|
66
66
|
:class="props.class"
|
|
67
67
|
@click="switchNoteEdit"
|
|
68
68
|
v-html="info?.notesHTML"
|
|
69
|
-
|
|
69
|
+
/>
|
|
70
70
|
<div
|
|
71
71
|
v-else
|
|
72
72
|
class="prose overflow-auto outline-none"
|
|
73
73
|
:class="props.class"
|
|
74
74
|
@click="switchNoteEdit"
|
|
75
75
|
v-text="note"
|
|
76
|
-
|
|
76
|
+
/>
|
|
77
77
|
</template>
|
|
78
78
|
<textarea
|
|
79
79
|
v-else
|
package/internals/Presenter.vue
CHANGED
|
@@ -82,7 +82,7 @@ onMounted(() => {
|
|
|
82
82
|
<div class="bg-main h-full slidev-presenter">
|
|
83
83
|
<div class="grid-container">
|
|
84
84
|
<div class="grid-section top flex">
|
|
85
|
-
<img src="../assets/logo-title-horizontal.png" class="h-14 ml-2 py-2 my-auto"
|
|
85
|
+
<img src="../assets/logo-title-horizontal.png" class="h-14 ml-2 py-2 my-auto">
|
|
86
86
|
<div class="flex-auto" />
|
|
87
87
|
<div
|
|
88
88
|
class="timer-btn my-auto relative w-22px h-22px cursor-pointer text-lg"
|
|
@@ -133,7 +133,7 @@ onMounted(() => {
|
|
|
133
133
|
<div
|
|
134
134
|
class="progress h-2px bg-primary transition-all"
|
|
135
135
|
:style="{ width: `${(currentPage - 1) / (total - 1) * 100}%` }"
|
|
136
|
-
|
|
136
|
+
/>
|
|
137
137
|
</div>
|
|
138
138
|
</div>
|
|
139
139
|
<Goto />
|
|
@@ -42,7 +42,7 @@ async function start() {
|
|
|
42
42
|
name="title"
|
|
43
43
|
type="text"
|
|
44
44
|
placeholder="Enter the title..."
|
|
45
|
-
|
|
45
|
+
>
|
|
46
46
|
<div class="text-xs w-full opacity-50 py-2">
|
|
47
47
|
<div>This will be used in the output filename that might <br>help you better orangize your recording chips.</div>
|
|
48
48
|
</div>
|
|
@@ -52,12 +52,12 @@ async function start() {
|
|
|
52
52
|
v-model="recordCamera"
|
|
53
53
|
name="record-camera"
|
|
54
54
|
type="checkbox"
|
|
55
|
-
|
|
55
|
+
>
|
|
56
56
|
<label for="record-camera" @click="recordCamera = !recordCamera">Record camera separately</label>
|
|
57
57
|
</div>
|
|
58
58
|
<div class="text-xs w-full opacity-50">
|
|
59
59
|
<div class="mt-2 opacity-50">
|
|
60
|
-
|
|
60
|
+
Enumerated filenames
|
|
61
61
|
</div>
|
|
62
62
|
<div class="font-mono">
|
|
63
63
|
{{ getFilename('screen') }}
|
|
@@ -73,7 +73,7 @@ async function start() {
|
|
|
73
73
|
<button class="cancel" @click="close">
|
|
74
74
|
Cancel
|
|
75
75
|
</button>
|
|
76
|
-
<div class="flex-auto"
|
|
76
|
+
<div class="flex-auto" />
|
|
77
77
|
<button @click="start">
|
|
78
78
|
Start
|
|
79
79
|
</button>
|
package/internals/WebCamera.vue
CHANGED
|
@@ -80,7 +80,6 @@ onMounted(fixPosition)
|
|
|
80
80
|
class="absolute bottom-0 right-0 rounded-full bg-main shadow opacity-0 shadow z-30 hover:opacity-100 dark:(border border-true-gray-700)"
|
|
81
81
|
:style="handleStyle"
|
|
82
82
|
:class="handlerDown ? '!opacity-100' : ''"
|
|
83
|
-
|
|
84
|
-
</div>
|
|
83
|
+
/>
|
|
85
84
|
</div>
|
|
86
85
|
</template>
|
package/layouts/iframe-left.vue
CHANGED
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
|
|
3
|
-
const props = defineProps({
|
|
4
|
-
class: {
|
|
5
|
-
type: String,
|
|
6
|
-
},
|
|
7
|
-
url: {
|
|
8
|
-
type: String,
|
|
9
|
-
},
|
|
10
|
-
})
|
|
11
|
-
const url = ref(props.url)
|
|
2
|
+
const props = defineProps<{ class?: string; url: string }>()
|
|
12
3
|
</script>
|
|
13
4
|
|
|
14
5
|
<template>
|
|
15
6
|
<div class="grid grid-cols-2 w-full h-full">
|
|
16
7
|
<div class="h-full">
|
|
17
|
-
<iframe id="frame" class="w-full h-full" :src="url"
|
|
8
|
+
<iframe id="frame" class="w-full h-full" :src="url" />
|
|
18
9
|
</div>
|
|
19
10
|
<div class="slidev-layout default" :class="props.class">
|
|
20
11
|
<slot />
|
package/layouts/iframe-right.vue
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
|
|
3
|
-
const props = defineProps({
|
|
4
|
-
class: {
|
|
5
|
-
type: String,
|
|
6
|
-
},
|
|
7
|
-
url: {
|
|
8
|
-
type: String,
|
|
9
|
-
},
|
|
10
|
-
})
|
|
11
|
-
const url = ref(props.url)
|
|
2
|
+
const props = defineProps<{ class?: string; url: string }>()
|
|
12
3
|
</script>
|
|
13
4
|
|
|
14
5
|
<template>
|
|
@@ -17,7 +8,7 @@ const url = ref(props.url)
|
|
|
17
8
|
<slot />
|
|
18
9
|
</div>
|
|
19
10
|
<div class="h-full">
|
|
20
|
-
<iframe id="frame" class="w-full h-full" :src="url"
|
|
11
|
+
<iframe id="frame" class="w-full h-full" :src="url" />
|
|
21
12
|
</div>
|
|
22
13
|
</div>
|
|
23
14
|
</template>
|
package/layouts/iframe.vue
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
|
|
3
|
-
const props = defineProps({
|
|
4
|
-
url: {
|
|
5
|
-
type: String,
|
|
6
|
-
},
|
|
7
|
-
})
|
|
8
|
-
const url = ref(props.url)
|
|
2
|
+
defineProps<{ url: string }>()
|
|
9
3
|
</script>
|
|
10
4
|
|
|
11
5
|
<template>
|
|
12
6
|
<div class="h-full w-full">
|
|
13
7
|
<div class="w-full h-full">
|
|
14
|
-
<iframe id="frame" class="w-full h-full" :src="url"
|
|
8
|
+
<iframe id="frame" class="w-full h-full" :src="url" />
|
|
15
9
|
</div>
|
|
16
10
|
</div>
|
|
17
11
|
</template>
|
package/layouts/image-left.vue
CHANGED
|
@@ -16,7 +16,7 @@ const style = computed(() => handleBackground(props.image))
|
|
|
16
16
|
|
|
17
17
|
<template>
|
|
18
18
|
<div class="grid grid-cols-2 w-full h-full">
|
|
19
|
-
<div class="w-full w-full" :style="style"
|
|
19
|
+
<div class="w-full w-full" :style="style" />
|
|
20
20
|
<div class="slidev-layout default" :class="props.class">
|
|
21
21
|
<slot />
|
|
22
22
|
</div>
|
package/layouts/image-right.vue
CHANGED
|
@@ -19,6 +19,6 @@ const style = computed(() => handleBackground(props.image))
|
|
|
19
19
|
<div class="slidev-layout default" :class="props.class">
|
|
20
20
|
<slot />
|
|
21
21
|
</div>
|
|
22
|
-
<div class="w-full w-full" :style="style"
|
|
22
|
+
<div class="w-full w-full" :style="style" />
|
|
23
23
|
</div>
|
|
24
24
|
</template>
|
package/logic/drawings.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { computed, markRaw, nextTick, reactive, ref, watch, watchEffect } from 'vue'
|
|
2
|
-
import { Brush,
|
|
2
|
+
import type { Brush, DrawingMode, Options as DrauuOptions } from 'drauu'
|
|
3
|
+
import { createDrauu } from 'drauu'
|
|
3
4
|
import { useStorage, toReactive } from '@vueuse/core'
|
|
4
5
|
import { serverDrawingState as drawingState, configs } from '../env'
|
|
5
6
|
import { currentPage, isPresenter } from './nav'
|
package/logic/nav.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Ref } from 'vue'
|
|
2
|
+
import { computed, ref, nextTick } from 'vue'
|
|
2
3
|
import { isString, SwipeDirection, timestamp, usePointerSwipe } from '@vueuse/core'
|
|
3
4
|
import { rawRoutes, router } from '../routes'
|
|
4
5
|
import { configs } from '../env'
|
package/logic/note.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { MaybeRef
|
|
2
|
-
import {
|
|
1
|
+
import type { MaybeRef } from '@vueuse/core'
|
|
2
|
+
import { useFetch } from '@vueuse/core'
|
|
3
|
+
import type { Ref } from 'vue'
|
|
4
|
+
import { computed, ref, unref } from 'vue'
|
|
3
5
|
import type { SlideInfo, SlideInfoExtended } from '@slidev/types'
|
|
4
6
|
|
|
5
7
|
export interface UseSlideInfo{
|
package/logic/recording.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Ref } from 'vue'
|
|
2
|
+
import { nextTick, ref, shallowRef, watch } from 'vue'
|
|
2
3
|
import { useEventListener, useDevicesList } from '@vueuse/core'
|
|
3
4
|
import { isTruthy } from '@antfu/utils'
|
|
4
|
-
import RecorderType from 'recordrtc'
|
|
5
|
+
import type RecorderType from 'recordrtc'
|
|
5
6
|
import type { Options as RecorderOptions } from 'recordrtc'
|
|
6
7
|
import { currentCamera, currentMic } from '../state'
|
|
7
8
|
|
package/logic/shortcuts.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { Fn,
|
|
2
|
-
import {
|
|
1
|
+
import type { Fn, KeyFilter } from '@vueuse/core'
|
|
2
|
+
import { not, and, onKeyStroke } from '@vueuse/core'
|
|
3
|
+
import type { Ref } from 'vue'
|
|
4
|
+
import { watch } from 'vue'
|
|
3
5
|
import type { ShortcutOptions } from '@slidev/types'
|
|
4
6
|
import { fullscreen, magicKeys, shortcutsEnabled, isInputting, toggleOverview, showGotoDialog, showOverview, isOnFocus } from '../state'
|
|
5
7
|
import setupShortcuts from '../setup/shortcuts'
|
package/modules/context.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { App
|
|
1
|
+
import type { App } from 'vue'
|
|
2
|
+
import { computed, reactive, readonly } from 'vue'
|
|
2
3
|
import { objectKeys } from '@antfu/utils'
|
|
3
4
|
import type { UnwrapNestedRefs } from '@vue/reactivity'
|
|
4
5
|
import * as nav from '../logic/nav'
|
package/modules/directives.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.20",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"homepage": "https://sli.dev",
|
|
6
6
|
"bugs": "https://github.com/slidevjs/slidev/issues",
|
|
@@ -13,27 +13,27 @@
|
|
|
13
13
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@antfu/utils": "^0.3.0",
|
|
16
|
-
"@slidev/parser": "0.27.
|
|
17
|
-
"@slidev/types": "0.27.
|
|
18
|
-
"@vueuse/core": "^
|
|
19
|
-
"@vueuse/head": "^0.
|
|
16
|
+
"@slidev/parser": "0.27.20",
|
|
17
|
+
"@slidev/types": "0.27.20",
|
|
18
|
+
"@vueuse/core": "^7.3.0",
|
|
19
|
+
"@vueuse/head": "^0.7.4",
|
|
20
20
|
"@vueuse/motion": "^2.0.0-beta.4",
|
|
21
|
-
"codemirror": "^5.
|
|
21
|
+
"codemirror": "^5.64.0",
|
|
22
22
|
"drauu": "^0.2.1",
|
|
23
23
|
"file-saver": "^2.0.5",
|
|
24
24
|
"js-base64": "^3.7.2",
|
|
25
25
|
"js-yaml": "^4.1.0",
|
|
26
|
-
"katex": "^0.
|
|
26
|
+
"katex": "^0.15.1",
|
|
27
27
|
"mermaid": "8.13.0",
|
|
28
|
-
"monaco-editor": "^0.
|
|
28
|
+
"monaco-editor": "^0.31.0",
|
|
29
29
|
"nanoid": "^3.1.30",
|
|
30
|
-
"prettier": "^2.
|
|
30
|
+
"prettier": "^2.5.1",
|
|
31
31
|
"recordrtc": "^5.6.2",
|
|
32
32
|
"resolve": "^1.20.0",
|
|
33
|
-
"vite-plugin-windicss": "^1.4
|
|
34
|
-
"vue": "^3.2.
|
|
33
|
+
"vite-plugin-windicss": "^1.5.4",
|
|
34
|
+
"vue": "^3.2.26",
|
|
35
35
|
"vue-router": "^4.0.12",
|
|
36
|
-
"windicss": "^3.
|
|
36
|
+
"windicss": "^3.3.0"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=14.0.0"
|
package/routes.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RouteRecordRaw } from 'vue-router'
|
|
2
|
+
import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
|
|
2
3
|
import Play from './internals/Play.vue'
|
|
3
4
|
// @ts-expect-error
|
|
4
5
|
import _rawRoutes from '/@slidev/routes'
|
package/setup/codemirror.ts
CHANGED
package/setup/main.ts
CHANGED
package/setup/mermaid.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* __imports__ */
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import type { MermaidOptions } from '@slidev/types'
|
|
4
|
+
import { defineMermaidSetup } from '@slidev/types'
|
|
4
5
|
|
|
5
6
|
export default defineMermaidSetup(() => {
|
|
6
7
|
// eslint-disable-next-line prefer-const
|
package/setup/monaco.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getCurrentInstance, onMounted } from 'vue'
|
|
2
2
|
import * as monaco from 'monaco-editor'
|
|
3
3
|
import { createSingletonPromise } from '@antfu/utils'
|
|
4
|
-
import { MonacoSetupReturn } from '@slidev/types'
|
|
4
|
+
import type { MonacoSetupReturn } from '@slidev/types'
|
|
5
5
|
/* __imports__ */
|
|
6
6
|
|
|
7
7
|
const setup = createSingletonPromise(async() => {
|
package/setup/shortcuts.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* __imports__ */
|
|
2
2
|
|
|
3
|
-
import { ShortcutOptions, NavOperations } from '@slidev/types'
|
|
3
|
+
import type { ShortcutOptions, NavOperations } from '@slidev/types'
|
|
4
4
|
import { next, prev, nextSlide, prevSlide, downloadPDF } from '../logic/nav'
|
|
5
5
|
import { toggleDark } from '../logic/dark'
|
|
6
6
|
import { toggleOverview, showGotoDialog, showOverview } from '../state'
|
package/shim.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare interface Window {
|
|
|
6
6
|
|
|
7
7
|
// with vite-plugin-md, markdowns can be treat as Vue components
|
|
8
8
|
declare module '*.md' {
|
|
9
|
-
import { ComponentOptions } from 'vue'
|
|
9
|
+
import type { ComponentOptions } from 'vue'
|
|
10
10
|
const component: ComponentOptions
|
|
11
11
|
export default component
|
|
12
12
|
}
|