@slidev/client 0.49.1 → 0.49.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.
@@ -68,7 +68,7 @@ export function useDragElementsUpdater(no: number) {
68
68
  let replaced = false
69
69
 
70
70
  section = type === 'prop'
71
- ? section.replace(/<(v-?drag)(.*?)>/ig, (full, tag, attrs, index) => {
71
+ ? section.replace(/<(v-?drag)(.*?)>/gi, (full, tag, attrs, index) => {
72
72
  if (index === idx) {
73
73
  replaced = true
74
74
  const posMatch = attrs.match(/pos=".*?"/)
@@ -80,7 +80,7 @@ export function useDragElementsUpdater(no: number) {
80
80
  }
81
81
  return full
82
82
  })
83
- : section.replace(/(?<![</\w])v-drag(?:=".*?")?/ig, (full, index) => {
83
+ : section.replace(/(?<![</\w])v-drag(?:=".*?")?/gi, (full, index) => {
84
84
  if (index === idx) {
85
85
  replaced = true
86
86
  return `v-drag="${posStr}"`
@@ -4,7 +4,7 @@ import type { ClicksContext } from '@slidev/types'
4
4
  import { CLICKS_MAX } from '../constants'
5
5
 
6
6
  const props = defineProps<{
7
- class?: string
7
+ class?: string | string[]
8
8
  noteHtml?: string
9
9
  note?: string
10
10
  placeholder?: string
@@ -63,7 +63,7 @@ useEventListener('keypress', (e) => {
63
63
  }
64
64
  return
65
65
  }
66
- const num = Number.parseInt(e.key.replace(/[^0-9]/g, ''))
66
+ const num = Number.parseInt(e.key.replace(/\D/g, ''))
67
67
  if (Number.isNaN(num)) {
68
68
  keyboardBuffer.value = ''
69
69
  return
@@ -81,8 +81,6 @@ function onAfterLeave() {
81
81
 
82
82
  <DragControl v-if="activeDragElement" :data="activeDragElement" />
83
83
 
84
- <div id="twoslash-container" />
85
-
86
84
  <!-- Global Top -->
87
85
  <GlobalTop />
88
86
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
3
  "type": "module",
4
- "version": "0.49.1",
4
+ "version": "0.49.3",
5
5
  "description": "Presentation slides for developers",
6
6
  "author": "antfu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -29,15 +29,15 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@antfu/utils": "^0.7.8",
32
- "@iconify-json/carbon": "^1.1.32",
32
+ "@iconify-json/carbon": "^1.1.33",
33
33
  "@iconify-json/ph": "^1.1.13",
34
34
  "@iconify-json/svg-spinners": "^1.1.2",
35
- "@shikijs/monaco": "^1.5.1",
36
- "@shikijs/vitepress-twoslash": "^1.5.1",
35
+ "@shikijs/monaco": "^1.5.2",
36
+ "@shikijs/vitepress-twoslash": "^1.5.2",
37
37
  "@slidev/rough-notation": "^0.1.0",
38
38
  "@typescript/ata": "^0.9.4",
39
39
  "@unhead/vue": "^1.9.10",
40
- "@unocss/reset": "^0.60.0",
40
+ "@unocss/reset": "^0.60.2",
41
41
  "@vueuse/core": "^10.9.0",
42
42
  "@vueuse/math": "^10.9.0",
43
43
  "@vueuse/motion": "^2.1.0",
@@ -48,19 +48,19 @@
48
48
  "fuse.js": "^7.0.0",
49
49
  "katex": "^0.16.10",
50
50
  "lz-string": "^1.5.0",
51
- "mermaid": "^10.9.0",
51
+ "mermaid": "^10.9.1",
52
52
  "monaco-editor": "^0.48.0",
53
53
  "prettier": "^3.2.5",
54
54
  "recordrtc": "^5.6.2",
55
- "shiki": "^1.5.1",
55
+ "shiki": "^1.5.2",
56
56
  "shiki-magic-move": "^0.4.2",
57
57
  "typescript": "^5.4.5",
58
- "unocss": "^0.60.0",
58
+ "unocss": "^0.60.2",
59
59
  "vue": "^3.4.27",
60
60
  "vue-router": "^4.3.2",
61
61
  "yaml": "^2.4.2",
62
- "@slidev/parser": "0.49.1",
63
- "@slidev/types": "0.49.1"
62
+ "@slidev/parser": "0.49.3",
63
+ "@slidev/types": "0.49.3"
64
64
  },
65
65
  "devDependencies": {
66
66
  "vite": "^5.2.11"
@@ -41,7 +41,7 @@ function getSlideClicks(route: SlideRoute) {
41
41
  }
42
42
 
43
43
  function wordCount(str: string) {
44
- return str.match(/[\w\d\’\'-]+/gi)?.length || 0
44
+ return str.match(/[\w'-]+/g)?.length || 0
45
45
  }
46
46
 
47
47
  function isElementInViewport(el: HTMLElement) {
package/pages/play.vue CHANGED
@@ -73,4 +73,5 @@ if (__DEV__ && __SLIDEV_FEATURE_EDITOR__)
73
73
  <SideEditor v-if="SideEditor && showEditor" :resize="true" />
74
74
  </div>
75
75
  <Controls v-if="!isPrintMode" />
76
+ <div id="twoslash-container" />
76
77
  </template>
package/styles/index.css CHANGED
@@ -124,3 +124,8 @@ html {
124
124
  #twoslash-container {
125
125
  position: fixed;
126
126
  }
127
+
128
+ #twoslash-container .v-popper__wrapper {
129
+ transform: scale(calc(1 * var(--slidev-slide-scale)));
130
+ transform-origin: 30px top;
131
+ }