@slidev/client 0.48.0-beta.1 → 0.48.0-beta.3
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/Editor.vue +0 -1
- package/internals/IconButton.vue +0 -2
- package/internals/InfoDialog.vue +1 -1
- package/internals/Modal.vue +1 -1
- package/internals/NoteEditor.vue +1 -1
- package/internals/SlidesOverview.vue +1 -1
- package/logic/note.ts +5 -5
- package/package.json +6 -6
- package/routes.ts +2 -4
package/internals/Editor.vue
CHANGED
package/internals/IconButton.vue
CHANGED
package/internals/InfoDialog.vue
CHANGED
|
@@ -10,7 +10,7 @@ const props = defineProps({
|
|
|
10
10
|
},
|
|
11
11
|
})
|
|
12
12
|
|
|
13
|
-
const emit = defineEmits
|
|
13
|
+
const emit = defineEmits(['update:modelValue'])
|
|
14
14
|
const value = useVModel(props, 'modelValue', emit)
|
|
15
15
|
const hasInfo = computed(() => typeof configs.info === 'string')
|
|
16
16
|
</script>
|
package/internals/Modal.vue
CHANGED
package/internals/NoteEditor.vue
CHANGED
|
@@ -14,7 +14,7 @@ import IconButton from './IconButton.vue'
|
|
|
14
14
|
|
|
15
15
|
const props = defineProps<{ modelValue: boolean }>()
|
|
16
16
|
|
|
17
|
-
const emit = defineEmits([])
|
|
17
|
+
const emit = defineEmits(['update:modelValue'])
|
|
18
18
|
const value = useVModel(props, 'modelValue', emit)
|
|
19
19
|
|
|
20
20
|
function close() {
|
package/logic/note.ts
CHANGED
|
@@ -2,17 +2,17 @@ import type { MaybeRef } from '@vueuse/core'
|
|
|
2
2
|
import { useFetch } from '@vueuse/core'
|
|
3
3
|
import type { Ref } from 'vue'
|
|
4
4
|
import { computed, ref, unref } from 'vue'
|
|
5
|
-
import type { SlideInfo
|
|
5
|
+
import type { SlideInfo } from '@slidev/types'
|
|
6
6
|
|
|
7
7
|
export interface UseSlideInfo {
|
|
8
|
-
info: Ref<
|
|
9
|
-
update: (data: Partial<SlideInfo>) => Promise<
|
|
8
|
+
info: Ref<SlideInfo | undefined>
|
|
9
|
+
update: (data: Partial<SlideInfo>) => Promise<SlideInfo | void>
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export function useSlideInfo(id: number | undefined): UseSlideInfo {
|
|
13
13
|
if (id == null) {
|
|
14
14
|
return {
|
|
15
|
-
info: ref() as Ref<
|
|
15
|
+
info: ref() as Ref<SlideInfo | undefined>,
|
|
16
16
|
update: async () => {},
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -41,7 +41,7 @@ export function useSlideInfo(id: number | undefined): UseSlideInfo {
|
|
|
41
41
|
info.value = payload.data
|
|
42
42
|
})
|
|
43
43
|
import.meta.hot?.on('slidev-update-note', (payload) => {
|
|
44
|
-
if (payload.id === id && info.value.note
|
|
44
|
+
if (payload.id === id && info.value.note?.trim() !== payload.note?.trim())
|
|
45
45
|
info.value = { ...info.value, ...payload }
|
|
46
46
|
})
|
|
47
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
|
-
"version": "0.48.0-beta.
|
|
3
|
+
"version": "0.48.0-beta.3",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"@antfu/utils": "^0.7.7",
|
|
23
23
|
"@iconify-json/carbon": "^1.1.30",
|
|
24
24
|
"@iconify-json/ph": "^1.1.11",
|
|
25
|
-
"@shikijs/vitepress-twoslash": "^1.1.
|
|
25
|
+
"@shikijs/vitepress-twoslash": "^1.1.5",
|
|
26
26
|
"@unhead/vue": "^1.8.10",
|
|
27
27
|
"@unocss/reset": "^0.58.5",
|
|
28
28
|
"@vueuse/core": "^10.7.2",
|
|
29
29
|
"@vueuse/math": "^10.7.2",
|
|
30
30
|
"@vueuse/motion": "^2.0.0",
|
|
31
|
-
"codemirror": "^5.65.
|
|
31
|
+
"codemirror": "^5.65.16",
|
|
32
32
|
"defu": "^6.1.4",
|
|
33
33
|
"drauu": "^0.3.7",
|
|
34
34
|
"file-saver": "^2.0.5",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"unocss": "^0.58.5",
|
|
47
47
|
"vue": "^3.4.19",
|
|
48
48
|
"vue-router": "^4.2.5",
|
|
49
|
-
"@slidev/
|
|
50
|
-
"@slidev/
|
|
49
|
+
"@slidev/parser": "0.48.0-beta.3",
|
|
50
|
+
"@slidev/types": "0.48.0-beta.3"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"vite": "^5.1.
|
|
53
|
+
"vite": "^5.1.3"
|
|
54
54
|
}
|
|
55
55
|
}
|
package/routes.ts
CHANGED
|
@@ -2,8 +2,6 @@ import type { RouteLocationNormalized, RouteRecordRaw } from 'vue-router'
|
|
|
2
2
|
import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
|
|
3
3
|
import type { TransitionGroupProps } from 'vue'
|
|
4
4
|
import type { ClicksContext } from '@slidev/types'
|
|
5
|
-
import Play from './internals/Play.vue'
|
|
6
|
-
import Print from './internals/Print.vue'
|
|
7
5
|
|
|
8
6
|
// @ts-expect-error missing types
|
|
9
7
|
import _rawRoutes, { redirects } from '/@slidev/routes'
|
|
@@ -17,13 +15,13 @@ export const routes: RouteRecordRaw[] = [
|
|
|
17
15
|
{
|
|
18
16
|
name: 'play',
|
|
19
17
|
path: '/',
|
|
20
|
-
component: Play,
|
|
18
|
+
component: () => import('./internals/Play.vue'),
|
|
21
19
|
children: [
|
|
22
20
|
...rawRoutes,
|
|
23
21
|
...redirects,
|
|
24
22
|
],
|
|
25
23
|
},
|
|
26
|
-
{ name: 'print', path: '/print', component: Print },
|
|
24
|
+
{ name: 'print', path: '/print', component: () => import('./internals/Print.vue') },
|
|
27
25
|
{ path: '', redirect: { path: '/1' } },
|
|
28
26
|
{ path: '/:pathMatch(.*)', redirect: { path: '/1' } },
|
|
29
27
|
]
|