@slidev/client 52.15.0 → 52.15.2

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.
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { Menu } from 'floating-vue'
2
+ import { Dropdown } from 'floating-vue'
3
+ import { ref } from 'vue'
3
4
  import { useDrawings } from '../composables/useDrawings'
4
5
  import Draggable from './Draggable.vue'
5
6
  import IconButton from './IconButton.vue'
@@ -18,6 +19,23 @@ const {
18
19
  brushColors,
19
20
  } = useDrawings()
20
21
 
22
+ const strokeWidthDropdownShown = ref(false)
23
+
24
+ function showStrokeWidthDropdown(event: Event) {
25
+ event.preventDefault()
26
+ event.stopPropagation()
27
+ requestAnimationFrame(() => {
28
+ requestAnimationFrame(() => {
29
+ strokeWidthDropdownShown.value = true
30
+ })
31
+ })
32
+ }
33
+
34
+ function showStrokeWidthDropdownForPointer(event: PointerEvent) {
35
+ if (event.pointerType !== 'mouse')
36
+ showStrokeWidthDropdown(event)
37
+ }
38
+
21
39
  function undo() {
22
40
  drauu.undo()
23
41
  }
@@ -71,8 +89,8 @@ function setBrushColor(color: string) {
71
89
 
72
90
  <VerticalDivider />
73
91
 
74
- <Menu>
75
- <IconButton title="Adjust stroke width" :class="{ shallow: drawingMode === 'eraseLine' }">
92
+ <Dropdown v-model:shown="strokeWidthDropdownShown" :triggers="[]">
93
+ <IconButton title="Adjust stroke width" :class="{ shallow: drawingMode === 'eraseLine' }" @click="showStrokeWidthDropdown" @pointerdown="showStrokeWidthDropdownForPointer" @pointerup="showStrokeWidthDropdownForPointer" @touchend="showStrokeWidthDropdown">
76
94
  <svg viewBox="0 0 32 32" width="1.2em" height="1.2em">
77
95
  <line x1="2" y1="15" x2="22" y2="4" stroke="currentColor" stroke-width="1" stroke-linecap="round" />
78
96
  <line x1="2" y1="24" x2="28" y2="10" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
@@ -89,7 +107,7 @@ function setBrushColor(color: string) {
89
107
  </div>
90
108
  </div>
91
109
  </template>
92
- </Menu>
110
+ </Dropdown>
93
111
  <IconButton
94
112
  v-for="color of brushColors"
95
113
  :key="color"
@@ -134,7 +152,7 @@ function setBrushColor(color: string) {
134
152
  </template>
135
153
 
136
154
  <style>
137
- .v-popper--theme-menu .v-popper__arrow-inner {
155
+ .v-popper--theme-dropdown .v-popper__arrow-inner {
138
156
  --uno: border-main;
139
157
  }
140
158
  </style>
@@ -2,8 +2,8 @@ import type RecorderType from 'recordrtc'
2
2
  import type { Options as RecorderOptions } from 'recordrtc'
3
3
  import type { Ref } from 'vue'
4
4
  import { isTruthy } from '@antfu/utils'
5
+ import { fixWebmDuration } from '@fix-webm-duration/fix'
5
6
  import { useDevicesList, useEventListener, useLocalStorage } from '@vueuse/core'
6
- import fixWebmDuration from 'fix-webm-duration'
7
7
  import { nextTick, ref, shallowRef, watch } from 'vue'
8
8
  import { currentCamera, currentMic } from '../state'
9
9
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
3
  "type": "module",
4
- "version": "52.15.0",
4
+ "version": "52.15.2",
5
5
  "description": "Presentation slides for developers",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -29,6 +29,7 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@antfu/utils": "^9.3.0",
32
+ "@fix-webm-duration/fix": "^1.0.1",
32
33
  "@iconify-json/carbon": "^1.2.20",
33
34
  "@iconify-json/ph": "^1.2.2",
34
35
  "@iconify-json/svg-spinners": "^1.2.4",
@@ -47,7 +48,6 @@
47
48
  "ansis": "^4.2.0",
48
49
  "drauu": "^1.0.0",
49
50
  "file-saver": "^2.0.5",
50
- "fix-webm-duration": "^1.0.6",
51
51
  "floating-vue": "^5.2.2",
52
52
  "fuse.js": "^7.3.0",
53
53
  "katex": "^0.16.45",
@@ -64,8 +64,8 @@
64
64
  "vue": "^3.5.33",
65
65
  "vue-router": "^5.0.6",
66
66
  "yaml": "^2.8.3",
67
- "@slidev/parser": "52.15.0",
68
- "@slidev/types": "52.15.0"
67
+ "@slidev/types": "52.15.2",
68
+ "@slidev/parser": "52.15.2"
69
69
  },
70
70
  "devDependencies": {
71
71
  "vite": "^8.0.10"