@slidev/client 0.51.0-beta.2 → 0.51.0-beta.4
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.
- package/composables/useHideCursorIdle.ts +12 -3
- package/internals/FormSlider.vue +1 -1
- package/package.json +3 -3
- package/pages/export.vue +2 -2
- package/pages/presenter.vue +11 -10
- package/styles/index.css +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Ref } from 'vue'
|
|
2
2
|
import { useEventListener } from '@vueuse/core'
|
|
3
|
-
import { computed } from 'vue'
|
|
3
|
+
import { computed, watch } from 'vue'
|
|
4
4
|
import { hideCursorIdle } from '../state'
|
|
5
5
|
|
|
6
6
|
const TIMEOUT = 2000
|
|
@@ -19,15 +19,24 @@ export function useHideCursorIdle(
|
|
|
19
19
|
|
|
20
20
|
let timer: ReturnType<typeof setTimeout> | null = null
|
|
21
21
|
|
|
22
|
+
// If disabled, immediately show the cursor
|
|
23
|
+
watch(
|
|
24
|
+
shouldHide,
|
|
25
|
+
(value) => {
|
|
26
|
+
if (!value)
|
|
27
|
+
show()
|
|
28
|
+
},
|
|
29
|
+
)
|
|
30
|
+
|
|
22
31
|
useEventListener(
|
|
23
32
|
document.body,
|
|
24
33
|
['pointermove', 'pointerdown'],
|
|
25
34
|
() => {
|
|
26
35
|
show()
|
|
27
|
-
if (!shouldHide.value)
|
|
28
|
-
return
|
|
29
36
|
if (timer)
|
|
30
37
|
clearTimeout(timer)
|
|
38
|
+
if (!shouldHide.value)
|
|
39
|
+
return
|
|
31
40
|
timer = setTimeout(hide, TIMEOUT)
|
|
32
41
|
},
|
|
33
42
|
{ passive: true },
|
package/internals/FormSlider.vue
CHANGED
|
@@ -28,7 +28,7 @@ const value = defineModel<number>('modelValue', {
|
|
|
28
28
|
/>
|
|
29
29
|
</div>
|
|
30
30
|
<div relative h-22px>
|
|
31
|
-
<input v-model.number="value" type="number" v-bind="props" border="~
|
|
31
|
+
<input v-model.number="value" type="number" v-bind="props" border="~ main rounded" m0 w-20 bg-gray:5 pl2 align-top text-sm>
|
|
32
32
|
<span v-if="props.unit" pointer-events-none absolute right-1 top-0.5 text-xs op25>{{ props.unit }}</span>
|
|
33
33
|
</div>
|
|
34
34
|
</template>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.51.0-beta.
|
|
4
|
+
"version": "0.51.0-beta.4",
|
|
5
5
|
"description": "Presentation slides for developers",
|
|
6
6
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"vue": "^3.5.13",
|
|
61
61
|
"vue-router": "^4.5.0",
|
|
62
62
|
"yaml": "^2.6.1",
|
|
63
|
-
"@slidev/parser": "0.51.0-beta.
|
|
64
|
-
"@slidev/types": "0.51.0-beta.
|
|
63
|
+
"@slidev/parser": "0.51.0-beta.4",
|
|
64
|
+
"@slidev/types": "0.51.0-beta.4"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"vite": "^6.0.6"
|
package/pages/export.vue
CHANGED
|
@@ -275,8 +275,8 @@ if (import.meta.hot) {
|
|
|
275
275
|
Clear Captured Images
|
|
276
276
|
</button>
|
|
277
277
|
<button v-else class="slidev-form-button flex justify-center items-center gap-2" @click="capturePngs">
|
|
278
|
-
<div class="i-carbon:
|
|
279
|
-
Pre-capture
|
|
278
|
+
<div class="i-carbon:drop-photo inline-block text-xl" />
|
|
279
|
+
Pre-capture slides as Images
|
|
280
280
|
</button>
|
|
281
281
|
<FormItem title="Delay" description="Delay between capturing each slide in milliseconds.<br>Increase this value if slides are captured incompletely. <br>(Not related to PDF export)">
|
|
282
282
|
<input v-model="captureDelay" type="number" step="50" min="50">
|
package/pages/presenter.vue
CHANGED
|
@@ -127,16 +127,17 @@ onMounted(() => {
|
|
|
127
127
|
<template v-if="mainSlideMode === 'mirror'">
|
|
128
128
|
<ScreenCaptureMirror />
|
|
129
129
|
</template>
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
130
|
+
|
|
131
|
+
<!-- We use v-show here to still infer the clicks context -->
|
|
132
|
+
<SlideContainer
|
|
133
|
+
v-show="mainSlideMode === 'slides'"
|
|
134
|
+
key="main"
|
|
135
|
+
class="p-2 lg:p-4 flex-auto"
|
|
136
|
+
is-main
|
|
137
|
+
@contextmenu="onContextMenu"
|
|
138
|
+
>
|
|
139
|
+
<SlidesShow render-context="presenter" />
|
|
140
|
+
</SlideContainer>
|
|
140
141
|
|
|
141
142
|
<ClicksSlider
|
|
142
143
|
:key="currentSlideRoute?.no"
|
package/styles/index.css
CHANGED
|
@@ -123,8 +123,8 @@ html {
|
|
|
123
123
|
|
|
124
124
|
.slidev-form-button {
|
|
125
125
|
--uno: text-white px-4 py-1 rounded border-b-2;
|
|
126
|
-
--uno: 'bg-gray-
|
|
127
|
-
--uno: 'hover:(bg-gray-400
|
|
126
|
+
--uno: 'bg-gray-500 border-gray-700';
|
|
127
|
+
--uno: 'hover:(bg-gray-400 border-gray6)';
|
|
128
128
|
}
|
|
129
129
|
.slidev-form-button.primary {
|
|
130
130
|
--uno: bg-teal-600 border-teal-800;
|