@slidev/client 0.49.27 → 0.49.29

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.
@@ -17,18 +17,16 @@ const tab = ref<'content' | 'note'>('content')
17
17
  const content = ref('')
18
18
  const note = ref('')
19
19
  const dirty = ref(false)
20
- const frontmatter = ref<any>({})
21
20
 
22
21
  const { info, update } = useDynamicSlideInfo(currentSlideNo)
23
22
 
24
23
  watch(
25
24
  info,
26
25
  (v) => {
27
- frontmatter.value = v?.frontmatter || {}
28
-
29
26
  if (!isInputting.value) {
30
27
  note.value = (v?.note || '').trim()
31
- content.value = (v?.content || '').trim()
28
+ const frontmatterPart = v?.frontmatterRaw?.trim() ? `---\n${v.frontmatterRaw.trim()}\n---\n\n` : ''
29
+ content.value = frontmatterPart + (v?.content || '').trim()
32
30
  dirty.value = false
33
31
  }
34
32
  },
@@ -37,10 +35,17 @@ watch(
37
35
 
38
36
  async function save() {
39
37
  dirty.value = false
38
+
39
+ let frontmatterRaw: string | undefined
40
+ const contentOnly = content.value.trim().replace(/^---\n([\s\S]*?)\n---\n/, (_, f) => {
41
+ frontmatterRaw = f
42
+ return ''
43
+ })
44
+
40
45
  await update({
41
46
  note: note.value || undefined,
42
- content: content.value,
43
- // frontmatter: frontmatter.value,
47
+ content: contentOnly,
48
+ frontmatterRaw,
44
49
  })
45
50
  }
46
51
 
@@ -151,6 +151,7 @@ export function useRecording() {
151
151
  cursor: 'motion',
152
152
  resizeMode: 'crop-and-scale',
153
153
  },
154
+ selfBrowserSurface: 'include',
154
155
  })
155
156
  streamCapture.value.addEventListener('inactive', stopRecording)
156
157
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
3
  "type": "module",
4
- "version": "0.49.27",
4
+ "version": "0.49.29",
5
5
  "description": "Presentation slides for developers",
6
6
  "author": "antfu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -32,36 +32,36 @@
32
32
  "@iconify-json/carbon": "^1.1.37",
33
33
  "@iconify-json/ph": "^1.1.14",
34
34
  "@iconify-json/svg-spinners": "^1.1.3",
35
- "@shikijs/monaco": "^1.13.0",
36
- "@shikijs/vitepress-twoslash": "^1.13.0",
35
+ "@shikijs/monaco": "^1.14.1",
36
+ "@shikijs/vitepress-twoslash": "^1.14.1",
37
37
  "@slidev/rough-notation": "^0.1.0",
38
38
  "@typescript/ata": "^0.9.7",
39
- "@unhead/vue": "^1.9.16",
40
- "@unocss/reset": "^0.62.2",
41
- "@vueuse/core": "^11.0.0",
42
- "@vueuse/math": "^11.0.0",
39
+ "@unhead/vue": "^1.10.0",
40
+ "@unocss/reset": "^0.62.3",
41
+ "@vueuse/core": "^11.0.3",
42
+ "@vueuse/math": "^11.0.3",
43
43
  "@vueuse/motion": "^2.2.3",
44
- "drauu": "^0.4.0",
44
+ "drauu": "^0.4.1",
45
45
  "file-saver": "^2.0.5",
46
46
  "floating-vue": "^5.2.2",
47
47
  "fuse.js": "^7.0.0",
48
48
  "katex": "^0.16.11",
49
49
  "lz-string": "^1.5.0",
50
- "mermaid": "^10.9.1",
51
- "monaco-editor": "^0.50.0",
50
+ "mermaid": "^11.0.2",
51
+ "monaco-editor": "^0.51.0",
52
52
  "prettier": "^3.3.3",
53
53
  "recordrtc": "^5.6.2",
54
- "shiki": "^1.13.0",
55
- "shiki-magic-move": "^0.4.3",
54
+ "shiki": "^1.14.1",
55
+ "shiki-magic-move": "^0.4.4",
56
56
  "typescript": "^5.5.4",
57
- "unocss": "^0.62.2",
57
+ "unocss": "^0.62.3",
58
58
  "vue": "^3.4.38",
59
59
  "vue-router": "^4.4.3",
60
60
  "yaml": "^2.5.0",
61
- "@slidev/parser": "0.49.27",
62
- "@slidev/types": "0.49.27"
61
+ "@slidev/types": "0.49.29",
62
+ "@slidev/parser": "0.49.29"
63
63
  },
64
64
  "devDependencies": {
65
- "vite": "^5.4.1"
65
+ "vite": "^5.4.2"
66
66
  }
67
67
  }
package/styles/code.css CHANGED
@@ -5,7 +5,6 @@ html.dark:root {
5
5
  /* Shiki */
6
6
  html.dark .shiki {
7
7
  color: var(--shiki-dark, inherit);
8
- background: var(--shiki-dark-bg, inherit);
9
8
  --twoslash-popup-bg: var(--shiki-dark-bg, inherit);
10
9
  }
11
10
 
package/uno.config.ts CHANGED
@@ -1,9 +1,6 @@
1
- import { fileURLToPath } from 'node:url'
2
- import { readFileSync } from 'node:fs'
3
1
  import {
4
2
  defineConfig,
5
3
  presetAttributify,
6
- presetIcons,
7
4
  presetTypography,
8
5
  presetUno,
9
6
  transformerDirectives,
@@ -41,18 +38,8 @@ export default defineConfig({
41
38
  presets: [
42
39
  presetUno(),
43
40
  presetAttributify(),
44
- presetIcons({
45
- collectionsNodeResolvePath: fileURLToPath(import.meta.url),
46
- collections: {
47
- slidev: {
48
- logo: async () => {
49
- const content = readFileSync(fileURLToPath(new URL('assets/logo.svg', import.meta.url)), 'utf-8')
50
- return content
51
- },
52
- },
53
- },
54
- }),
55
41
  presetTypography(),
42
+ /* Preset Icons is added in ../node/setups/unocss.ts */
56
43
  ],
57
44
  transformers: [
58
45
  transformerDirectives({ enforce: 'pre' }),