@slidev/client 51.3.0 → 51.5.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.
@@ -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(defineProps<{
26
- codeLz: string
27
- diffLz?: string
28
- lang?: string
29
- readonly?: boolean
30
- lineNumbers?: 'on' | 'off' | 'relative' | 'interval'
31
- height?: number | string // Posible values: 'initial', 'auto', '100%', '200px', etc.
32
- editorOptions?: monaco.editor.IEditorOptions
33
- ata?: boolean
34
- runnable?: boolean
35
- writable?: string
36
- autorun?: boolean | 'once'
37
- showOutputAt?: RawAtValue
38
- outputHeight?: string
39
- highlightOutput?: boolean
40
- runnerOptions?: Record<string, unknown>
41
- }>(), {
42
- codeLz: '',
43
- lang: 'typescript',
44
- readonly: false,
45
- lineNumbers: 'off',
46
- height: 'initial',
47
- ata: true,
48
- runnable: false,
49
- autorun: true,
50
- highlightOutput: true,
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
 
@@ -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(defineProps<{
17
- level: number
18
- start?: string | number
19
- listStyle?: string | string[]
20
- list: TocItem[]
21
- listClass?: string | string[]
22
- }>(), { level: 1 })
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/constants.ts CHANGED
@@ -83,4 +83,5 @@ export const HEADMATTER_FIELDS = [
83
83
  'mdc',
84
84
  'contextMenu',
85
85
  'wakeLock',
86
+ 'seoMeta',
86
87
  ]
@@ -11,6 +11,6 @@ const value = defineModel<boolean>('modelValue', {
11
11
  <template>
12
12
  <div border="~ main rounded" flex="~ gap-2 items-center" relative h-5 w-5 p0.5 hover:bg-active p1>
13
13
  <div i-ri-check-line :class="value ? '' : 'op0'" />
14
- <input v-model="value" type="checkbox" absolute inset-0 opacity-0.1 :disabled="disabled">
14
+ <input v-model="value" type="checkbox" absolute inset-0 opacity-10 :disabled="disabled">
15
15
  </div>
16
16
  </template>
@@ -26,7 +26,7 @@ watch(
26
26
  if (!isInputting.value) {
27
27
  note.value = (v?.note || '').trim()
28
28
  const frontmatterPart = v?.frontmatterRaw?.trim() ? `---\n${v.frontmatterRaw.trim()}\n---\n\n` : ''
29
- content.value = frontmatterPart + (v?.content || '').trim()
29
+ content.value = frontmatterPart + (v?.source.contentRaw || '').trim()
30
30
  dirty.value = false
31
31
  }
32
32
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
3
  "type": "module",
4
- "version": "51.3.0",
4
+ "version": "51.5.0",
5
5
  "description": "Presentation slides for developers",
6
6
  "author": "antfu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -29,42 +29,41 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@antfu/utils": "^9.1.0",
32
- "@iconify-json/carbon": "^1.2.7",
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.0.0",
36
- "@shikijs/monaco": "^3.0.0",
37
- "@shikijs/vitepress-twoslash": "^3.0.0",
35
+ "@shikijs/engine-javascript": "^3.2.1",
36
+ "@shikijs/monaco": "^3.2.1",
37
+ "@shikijs/vitepress-twoslash": "^3.2.1",
38
38
  "@slidev/rough-notation": "^0.1.0",
39
39
  "@typescript/ata": "^0.9.7",
40
- "@unhead/vue": "^1.11.19",
40
+ "@unhead/vue": "^2.0.2",
41
41
  "@unocss/reset": "^66.0.0",
42
- "@vueuse/core": "^12.7.0",
43
- "@vueuse/math": "^12.7.0",
44
- "@vueuse/motion": "^2.2.6",
45
- "drauu": "^0.4.2",
42
+ "@vueuse/core": "^13.0.0",
43
+ "@vueuse/math": "^13.0.0",
44
+ "@vueuse/motion": "^3.0.3",
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",
49
49
  "katex": "^0.16.21",
50
50
  "lz-string": "^1.5.0",
51
- "mermaid": "^11.4.1",
51
+ "mermaid": "^11.6.0",
52
52
  "monaco-editor": "0.51.0",
53
53
  "nanotar": "^0.2.0",
54
54
  "pptxgenjs": "^3.12.0",
55
- "prettier": "^3.5.2",
56
55
  "recordrtc": "^5.6.2",
57
- "shiki": "^3.0.0",
58
- "shiki-magic-move": "^1.0.1",
59
- "typescript": "^5.7.3",
56
+ "shiki": "^3.2.1",
57
+ "shiki-magic-move": "^1.1.0",
58
+ "typescript": "^5.8.2",
60
59
  "unocss": "^66.0.0",
61
60
  "vue": "^3.5.13",
62
61
  "vue-router": "^4.5.0",
63
- "yaml": "^2.7.0",
64
- "@slidev/parser": "51.3.0",
65
- "@slidev/types": "51.3.0"
62
+ "yaml": "^2.7.1",
63
+ "@slidev/types": "51.5.0",
64
+ "@slidev/parser": "51.5.0"
66
65
  },
67
66
  "devDependencies": {
68
- "vite": "^6.1.1"
67
+ "vite": "^6.2.3"
69
68
  }
70
69
  }
@@ -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 => createFixedClicks(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.current = nextFrame.value[1]
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
  />
package/setup/main.ts CHANGED
@@ -2,7 +2,7 @@ import type { AppContext } from '@slidev/types'
2
2
  import type { App } from 'vue'
3
3
  import setups from '#slidev/setups/main'
4
4
  import TwoSlashFloatingVue from '@shikijs/vitepress-twoslash/client'
5
- import { createHead } from '@unhead/vue'
5
+ import { createHead } from '@unhead/vue/client'
6
6
  import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
7
7
  import { createVClickDirectives } from '../modules/v-click'
8
8
  import { createVDragDirective } from '../modules/v-drag'