@slidev/client 0.28.7 → 0.28.8

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.
Files changed (2) hide show
  1. package/internals/Goto.vue +17 -20
  2. package/package.json +10 -10
@@ -1,6 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { whenever } from '@vueuse/core'
3
- import { computed, nextTick, ref } from 'vue'
2
+ import { computed, nextTick, ref, watch } from 'vue'
4
3
  import { go, total } from '../logic/nav'
5
4
  import { showGotoDialog } from '../state'
6
5
 
@@ -19,10 +18,21 @@ function close() {
19
18
  showGotoDialog.value = false
20
19
  }
21
20
 
22
- whenever(showGotoDialog, async() => {
23
- text.value = ''
24
- await nextTick()
25
- input.value?.focus()
21
+ watch(showGotoDialog, async(show) => {
22
+ if (show) {
23
+ await nextTick()
24
+ text.value = ''
25
+ input.value?.focus()
26
+ }
27
+ else {
28
+ input.value?.blur()
29
+ }
30
+ })
31
+
32
+ // remove the g character coming from the key that triggered showGotoDialog (e.g. in Firefox)
33
+ watch(text, (t) => {
34
+ if (t.match(/^[^0-9]/))
35
+ text.value = text.value.substr(1)
26
36
  })
27
37
  </script>
28
38
 
@@ -38,7 +48,7 @@ whenever(showGotoDialog, async() => {
38
48
  <input
39
49
  ref="input"
40
50
  v-model="text"
41
- type="number"
51
+ type="text"
42
52
  :disabled="!showGotoDialog"
43
53
  class="outline-none bg-transparent"
44
54
  placeholder="Goto..."
@@ -49,16 +59,3 @@ whenever(showGotoDialog, async() => {
49
59
  >
50
60
  </div>
51
61
  </template>
52
-
53
- <style scoped>
54
- input::-webkit-outer-spin-button,
55
- input::-webkit-inner-spin-button {
56
- -webkit-appearance: none;
57
- margin: 0;
58
- }
59
-
60
- /* Firefox */
61
- input[type="number"] {
62
- -moz-appearance: textfield;
63
- }
64
- </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
- "version": "0.28.7",
3
+ "version": "0.28.8",
4
4
  "description": "Presentation slides for developers",
5
5
  "homepage": "https://sli.dev",
6
6
  "bugs": "https://github.com/slidevjs/slidev/issues",
@@ -13,27 +13,27 @@
13
13
  "author": "antfu <anthonyfu117@hotmail.com>",
14
14
  "dependencies": {
15
15
  "@antfu/utils": "^0.5.0",
16
- "@slidev/parser": "0.28.7",
17
- "@slidev/types": "0.28.7",
18
- "@vueuse/core": "^7.6.0",
16
+ "@slidev/parser": "0.28.8",
17
+ "@slidev/types": "0.28.8",
18
+ "@vueuse/core": "^7.6.2",
19
19
  "@vueuse/head": "^0.7.5",
20
20
  "@vueuse/motion": "^2.0.0-beta.9",
21
- "codemirror": "^5.65.1",
21
+ "codemirror": "^5.65.2",
22
22
  "drauu": "^0.2.1",
23
23
  "file-saver": "^2.0.5",
24
24
  "js-base64": "^3.7.2",
25
25
  "js-yaml": "^4.1.0",
26
26
  "katex": "^0.15.2",
27
- "mermaid": "8.13.0",
27
+ "mermaid": "^8.14.0",
28
28
  "monaco-editor": "^0.32.1",
29
- "nanoid": "^3.2.0",
29
+ "nanoid": "^3.3.1",
30
30
  "prettier": "^2.5.1",
31
31
  "recordrtc": "^5.6.2",
32
32
  "resolve": "^1.22.0",
33
- "vite-plugin-windicss": "^1.7.0",
34
- "vue": "^3.2.30",
33
+ "vite-plugin-windicss": "^1.7.1",
34
+ "vue": "^3.2.31",
35
35
  "vue-router": "^4.0.12",
36
- "windicss": "^3.4.3"
36
+ "windicss": "^3.4.4"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=14.0.0"