@slidev/client 0.43.5 → 0.43.6
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/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 +10 -3
- package/internals/NavControls.vue +1 -2
- package/internals/PresenterPrint.vue +1 -1
- package/layouts/iframe-left.vue +1 -1
- package/layouts/iframe-right.vue +1 -1
- package/layouts/iframe.vue +1 -1
- package/modules/context.ts +1 -1
- package/package.json +6 -6
- package/shim.d.ts +3 -2
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,8 +1,15 @@
|
|
|
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'
|
|
@@ -33,8 +33,7 @@ function onMouseLeave() {
|
|
|
33
33
|
|
|
34
34
|
const barStyle = computed(() => props.persist
|
|
35
35
|
? 'text-$slidev-controls-foreground bg-transparent'
|
|
36
|
-
: 'rounded-md bg-main shadow dark:border dark:border-gray-400 dark:border-opacity-10'
|
|
37
|
-
)
|
|
36
|
+
: 'rounded-md bg-main shadow dark:border dark:border-gray-400 dark:border-opacity-10')
|
|
38
37
|
|
|
39
38
|
const RecordingControls = shallowRef<any>()
|
|
40
39
|
if (__SLIDEV_FEATURE_RECORD__)
|
package/layouts/iframe-left.vue
CHANGED
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.6",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@antfu/utils": "^0.7.6",
|
|
19
|
-
"@unocss/reset": "^0.
|
|
19
|
+
"@unocss/reset": "^0.56.4",
|
|
20
20
|
"@vueuse/core": "^10.4.1",
|
|
21
21
|
"@vueuse/head": "^2.0.0",
|
|
22
22
|
"@vueuse/math": "^10.4.1",
|
|
@@ -35,14 +35,14 @@
|
|
|
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.4",
|
|
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.6",
|
|
45
|
+
"@slidev/types": "0.43.6"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"vite": "^4.4.9"
|
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
|
}
|