@slidev/client 0.28.7 → 0.28.10

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.
@@ -48,6 +48,10 @@ function setBrushColor(color: typeof brush.color) {
48
48
  <button class="icon-btn" :class="{ shallow: drawingMode != 'rectangle' }" @click="setDrawingMode('rectangle')">
49
49
  <carbon:checkbox />
50
50
  </button>
51
+ <!-- TODO: not sure why it's not working! -->
52
+ <!-- <button class="icon-btn" :class="{ shallow: drawingMode != 'eraseLine' }" @click="setDrawingMode('eraseLine')">
53
+ <carbon:erase />
54
+ </button> -->
51
55
 
52
56
  <VerticalDivider />
53
57
 
@@ -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>
@@ -55,7 +55,7 @@ if (__SLIDEV_FEATURE_DRAWINGS__)
55
55
  <div
56
56
  class="absolute bottom-0 left-0 transition duration-300 opacity-0 hover:opacity-100"
57
57
  :class="[
58
- persistNav ? 'opacity-100 right-0' : 'oapcity-0 p-2',
58
+ persistNav ? 'opacity-100 right-0' : 'opacity-0 p-2',
59
59
  isDrawing ? 'pointer-events-none': ''
60
60
  ]"
61
61
  >
@@ -1,5 +1,5 @@
1
1
  // @ts-expect-error missing types
2
- import mermaid from 'mermaid/dist/mermaid.min'
2
+ import mermaid from 'mermaid/dist/mermaid'
3
3
  import { customAlphabet } from 'nanoid'
4
4
  import { decode } from 'js-base64'
5
5
  import { clearUndefined } from '@antfu/utils'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
- "version": "0.28.7",
3
+ "version": "0.28.10",
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.10",
17
+ "@slidev/types": "0.28.10",
18
+ "@vueuse/core": "^7.7.0",
19
19
  "@vueuse/head": "^0.7.5",
20
20
  "@vueuse/motion": "^2.0.0-beta.9",
21
- "codemirror": "^5.65.1",
22
- "drauu": "^0.2.1",
21
+ "codemirror": "^5.65.2",
22
+ "drauu": "^0.3.0",
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",
35
- "vue-router": "^4.0.12",
36
- "windicss": "^3.4.3"
33
+ "vite-plugin-windicss": "^1.8.2",
34
+ "vue": "^3.2.31",
35
+ "vue-router": "^4.0.13",
36
+ "windicss": "^3.5.1"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=14.0.0"