@slidev/client 51.3.0 → 51.4.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/builtin/Monaco.vue +30 -27
- package/builtin/TocList.vue +10 -7
- package/package.json +16 -16
- package/pages/presenter.vue +9 -3
package/builtin/Monaco.vue
CHANGED
|
@@ -22,33 +22,36 @@ import { useNav } from '../composables/useNav'
|
|
|
22
22
|
import { useSlideContext } from '../context'
|
|
23
23
|
import { makeId } from '../logic/utils'
|
|
24
24
|
|
|
25
|
-
const props = withDefaults(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
25
|
+
const props = withDefaults(
|
|
26
|
+
defineProps<{
|
|
27
|
+
codeLz?: string
|
|
28
|
+
diffLz?: string
|
|
29
|
+
lang?: string
|
|
30
|
+
readonly?: boolean
|
|
31
|
+
lineNumbers?: 'on' | 'off' | 'relative' | 'interval'
|
|
32
|
+
height?: number | string // Posible values: 'initial', 'auto', '100%', '200px', etc.
|
|
33
|
+
editorOptions?: monaco.editor.IEditorOptions
|
|
34
|
+
ata?: boolean
|
|
35
|
+
runnable?: boolean
|
|
36
|
+
writable?: string
|
|
37
|
+
autorun?: boolean | 'once'
|
|
38
|
+
showOutputAt?: RawAtValue
|
|
39
|
+
outputHeight?: string
|
|
40
|
+
highlightOutput?: boolean
|
|
41
|
+
runnerOptions?: Record<string, unknown>
|
|
42
|
+
}>(),
|
|
43
|
+
{
|
|
44
|
+
codeLz: '',
|
|
45
|
+
lang: 'typescript',
|
|
46
|
+
readonly: false,
|
|
47
|
+
lineNumbers: 'off',
|
|
48
|
+
height: 'initial',
|
|
49
|
+
ata: true,
|
|
50
|
+
runnable: false,
|
|
51
|
+
autorun: true,
|
|
52
|
+
highlightOutput: true,
|
|
53
|
+
},
|
|
54
|
+
)
|
|
52
55
|
|
|
53
56
|
const CodeRunner = defineAsyncComponent(() => import('../internals/CodeRunner.vue').then(r => r.default))
|
|
54
57
|
|
package/builtin/TocList.vue
CHANGED
|
@@ -13,13 +13,16 @@ import { toArray } from '@antfu/utils'
|
|
|
13
13
|
import { computed } from 'vue'
|
|
14
14
|
import { useNav } from '../composables/useNav'
|
|
15
15
|
|
|
16
|
-
const props = withDefaults(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
const props = withDefaults(
|
|
17
|
+
defineProps<{
|
|
18
|
+
level?: number
|
|
19
|
+
start?: string | number
|
|
20
|
+
listStyle?: string | string[]
|
|
21
|
+
list: TocItem[]
|
|
22
|
+
listClass?: string | string[]
|
|
23
|
+
}>(),
|
|
24
|
+
{ level: 1 },
|
|
25
|
+
)
|
|
23
26
|
|
|
24
27
|
const { isPresenter } = useNav()
|
|
25
28
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "51.
|
|
4
|
+
"version": "51.4.0",
|
|
5
5
|
"description": "Presentation slides for developers",
|
|
6
6
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -29,20 +29,20 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@antfu/utils": "^9.1.0",
|
|
32
|
-
"@iconify-json/carbon": "^1.2.
|
|
32
|
+
"@iconify-json/carbon": "^1.2.8",
|
|
33
33
|
"@iconify-json/ph": "^1.2.2",
|
|
34
34
|
"@iconify-json/svg-spinners": "^1.2.2",
|
|
35
|
-
"@shikijs/engine-javascript": "^3.
|
|
36
|
-
"@shikijs/monaco": "^3.
|
|
37
|
-
"@shikijs/vitepress-twoslash": "^3.
|
|
35
|
+
"@shikijs/engine-javascript": "^3.1.0",
|
|
36
|
+
"@shikijs/monaco": "^3.1.0",
|
|
37
|
+
"@shikijs/vitepress-twoslash": "^3.1.0",
|
|
38
38
|
"@slidev/rough-notation": "^0.1.0",
|
|
39
39
|
"@typescript/ata": "^0.9.7",
|
|
40
|
-
"@unhead/vue": "^1.11.
|
|
40
|
+
"@unhead/vue": "^1.11.20",
|
|
41
41
|
"@unocss/reset": "^66.0.0",
|
|
42
|
-
"@vueuse/core": "^
|
|
43
|
-
"@vueuse/math": "^
|
|
44
|
-
"@vueuse/motion": "^
|
|
45
|
-
"drauu": "^0.4.
|
|
42
|
+
"@vueuse/core": "^13.0.0",
|
|
43
|
+
"@vueuse/math": "^13.0.0",
|
|
44
|
+
"@vueuse/motion": "^3.0.1",
|
|
45
|
+
"drauu": "^0.4.3",
|
|
46
46
|
"file-saver": "^2.0.5",
|
|
47
47
|
"floating-vue": "^5.2.2",
|
|
48
48
|
"fuse.js": "^7.1.0",
|
|
@@ -52,19 +52,19 @@
|
|
|
52
52
|
"monaco-editor": "0.51.0",
|
|
53
53
|
"nanotar": "^0.2.0",
|
|
54
54
|
"pptxgenjs": "^3.12.0",
|
|
55
|
-
"prettier": "^3.5.
|
|
55
|
+
"prettier": "^3.5.3",
|
|
56
56
|
"recordrtc": "^5.6.2",
|
|
57
|
-
"shiki": "^3.
|
|
57
|
+
"shiki": "^3.1.0",
|
|
58
58
|
"shiki-magic-move": "^1.0.1",
|
|
59
|
-
"typescript": "^5.
|
|
59
|
+
"typescript": "^5.8.2",
|
|
60
60
|
"unocss": "^66.0.0",
|
|
61
61
|
"vue": "^3.5.13",
|
|
62
62
|
"vue-router": "^4.5.0",
|
|
63
63
|
"yaml": "^2.7.0",
|
|
64
|
-
"@slidev/parser": "51.
|
|
65
|
-
"@slidev/types": "51.
|
|
64
|
+
"@slidev/parser": "51.4.0",
|
|
65
|
+
"@slidev/types": "51.4.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"vite": "^6.
|
|
68
|
+
"vite": "^6.2.1"
|
|
69
69
|
}
|
|
70
70
|
}
|
package/pages/presenter.vue
CHANGED
|
@@ -54,7 +54,13 @@ const notesEditing = ref(false)
|
|
|
54
54
|
|
|
55
55
|
const { timer, isTimerActive, resetTimer, toggleTimer } = useTimer()
|
|
56
56
|
|
|
57
|
-
const clicksCtxMap = computed(() => slides.value.map(route =>
|
|
57
|
+
const clicksCtxMap = computed(() => slides.value.map((route) => {
|
|
58
|
+
const clicks = ref(0)
|
|
59
|
+
return {
|
|
60
|
+
context: createFixedClicks(route, clicks),
|
|
61
|
+
clicks,
|
|
62
|
+
}
|
|
63
|
+
}))
|
|
58
64
|
const nextFrame = computed(() => {
|
|
59
65
|
if (clicksContext.value.current < clicksContext.value.total)
|
|
60
66
|
return [currentSlideRoute.value!, clicksContext.value.current + 1] as const
|
|
@@ -72,7 +78,7 @@ watch(
|
|
|
72
78
|
nextFrame,
|
|
73
79
|
() => {
|
|
74
80
|
if (nextFrameClicksCtx.value && nextFrame.value)
|
|
75
|
-
nextFrameClicksCtx.value.
|
|
81
|
+
nextFrameClicksCtx.value.clicks.value = nextFrame.value[1]
|
|
76
82
|
},
|
|
77
83
|
{ immediate: true },
|
|
78
84
|
)
|
|
@@ -149,7 +155,7 @@ onMounted(() => {
|
|
|
149
155
|
<SlideContainer v-if="nextFrame && nextFrameClicksCtx" key="next">
|
|
150
156
|
<SlideWrapper
|
|
151
157
|
:key="nextFrame[0].no"
|
|
152
|
-
:clicks-context="nextFrameClicksCtx"
|
|
158
|
+
:clicks-context="nextFrameClicksCtx.context"
|
|
153
159
|
:route="nextFrame[0]"
|
|
154
160
|
render-context="previewNext"
|
|
155
161
|
/>
|