@slidev/client 52.19.2 → 52.20.1
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/builtin/ShikiMagicMove.vue +2 -1
- package/constants.ts +1 -0
- package/layouts/iframe-left.vue +2 -2
- package/layouts/iframe-right.vue +2 -2
- package/layouts/iframe.vue +2 -2
- package/logic/recording.ts +8 -1
- package/package.json +9 -8
- package/styles/index.css +15 -0
|
@@ -180,12 +180,13 @@ onMounted(() => {
|
|
|
180
180
|
:step="stepIndex"
|
|
181
181
|
:animate="!isPrintMode"
|
|
182
182
|
:options="{
|
|
183
|
+
stagger: 1,
|
|
184
|
+
...configs.shiki?.magicMove,
|
|
183
185
|
globalScale: scale * zoom,
|
|
184
186
|
// Use duration 0 to skip animation instead of using the animate prop,
|
|
185
187
|
// because moving from non-animated to animated causes issues with
|
|
186
188
|
// new elements. Unfortunately, this causes a flash.
|
|
187
189
|
duration: isFirstTick ? 0 : $props.duration,
|
|
188
|
-
stagger: 1,
|
|
189
190
|
}"
|
|
190
191
|
/>
|
|
191
192
|
<button
|
package/constants.ts
CHANGED
package/layouts/iframe-left.vue
CHANGED
|
@@ -13,9 +13,9 @@ const scaleInvertPercent = computed(() => `${(1 / (props.scale || 1)) * 100}%`)
|
|
|
13
13
|
<div class="grid grid-cols-2 w-full h-full">
|
|
14
14
|
<div relative :style="{ width: scaleInvertPercent, height: scaleInvertPercent }">
|
|
15
15
|
<iframe
|
|
16
|
-
id="frame" class="
|
|
16
|
+
id="frame" class="slidev-layout-iframe"
|
|
17
17
|
:src="url"
|
|
18
|
-
:style="scale ? {
|
|
18
|
+
:style="scale ? { '--slidev-iframe-scale': scale } : {}"
|
|
19
19
|
/>
|
|
20
20
|
</div>
|
|
21
21
|
<div class="slidev-layout default" v-bind="$attrs">
|
package/layouts/iframe-right.vue
CHANGED
|
@@ -16,9 +16,9 @@ const scaleInvertPercent = computed(() => `${(1 / (props.scale || 1)) * 100}%`)
|
|
|
16
16
|
</div>
|
|
17
17
|
<div relative :style="{ width: scaleInvertPercent, height: scaleInvertPercent }">
|
|
18
18
|
<iframe
|
|
19
|
-
id="frame" class="
|
|
19
|
+
id="frame" class="slidev-layout-iframe"
|
|
20
20
|
:src="url"
|
|
21
|
-
:style="scale ? {
|
|
21
|
+
:style="scale ? { '--slidev-iframe-scale': scale } : {}"
|
|
22
22
|
/>
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
package/layouts/iframe.vue
CHANGED
|
@@ -13,9 +13,9 @@ const scaleInvertPercent = computed(() => `${(1 / (props.scale || 1)) * 100}%`)
|
|
|
13
13
|
<div class="h-full w-full">
|
|
14
14
|
<div relative :style="{ width: scaleInvertPercent, height: scaleInvertPercent }">
|
|
15
15
|
<iframe
|
|
16
|
-
id="frame" class="
|
|
16
|
+
id="frame" class="slidev-layout-iframe"
|
|
17
17
|
:src="url"
|
|
18
|
-
:style="scale ? {
|
|
18
|
+
:style="scale ? { '--slidev-iframe-scale': scale } : {}"
|
|
19
19
|
/>
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
package/logic/recording.ts
CHANGED
|
@@ -106,6 +106,11 @@ export function useRecording() {
|
|
|
106
106
|
async function startCameraStream() {
|
|
107
107
|
await ensureDevicesListPermissions()
|
|
108
108
|
await nextTick()
|
|
109
|
+
|
|
110
|
+
// Stopped tracks can never be resumed, the whole stream has to be requested again
|
|
111
|
+
if (streamCamera.value?.getTracks().some(track => track.readyState === 'ended'))
|
|
112
|
+
closeStream(streamCamera)
|
|
113
|
+
|
|
109
114
|
if (!streamCamera.value) {
|
|
110
115
|
if (currentCamera.value === 'none' && currentMic.value === 'none')
|
|
111
116
|
return
|
|
@@ -206,7 +211,9 @@ export function useRecording() {
|
|
|
206
211
|
const blob = recorderSlides.value!.getBlob()
|
|
207
212
|
downloadBlob(blob, duration, getFilename('screen', config.mimeType))
|
|
208
213
|
closeStream(streamCapture)
|
|
209
|
-
|
|
214
|
+
// `streamSlides` only borrows its tracks from `streamCapture` and `streamCamera`,
|
|
215
|
+
// stopping them here would also end the mic still used by the camera stream
|
|
216
|
+
streamSlides.value = undefined
|
|
210
217
|
recorderSlides.value = undefined
|
|
211
218
|
})
|
|
212
219
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "52.
|
|
4
|
+
"version": "52.20.1",
|
|
5
5
|
"description": "Presentation slides for developers",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"@shikijs/magic-move": "^4.4.3",
|
|
38
38
|
"@shikijs/monaco": "^4.4.3",
|
|
39
39
|
"@shikijs/vitepress-twoslash": "^4.4.3",
|
|
40
|
-
"@slidev/parser": "52.
|
|
40
|
+
"@slidev/parser": "52.20.1",
|
|
41
41
|
"@slidev/rough-notation": "^0.1.0",
|
|
42
|
-
"@slidev/types": "52.
|
|
42
|
+
"@slidev/types": "52.20.1",
|
|
43
43
|
"@typescript/ata": "^0.9.8",
|
|
44
44
|
"@unhead/vue": "^3.4.1",
|
|
45
|
-
"@unocss/extractor-mdc": "^66.10.
|
|
46
|
-
"@unocss/preset-mini": "^66.10.
|
|
47
|
-
"@unocss/reset": "^66.10.
|
|
45
|
+
"@unocss/extractor-mdc": "^66.10.4",
|
|
46
|
+
"@unocss/preset-mini": "^66.10.4",
|
|
47
|
+
"@unocss/reset": "^66.10.4",
|
|
48
48
|
"@vueuse/core": "^14.4.0",
|
|
49
49
|
"@vueuse/math": "^14.4.0",
|
|
50
50
|
"@vueuse/motion": "^3.0.3",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"fuse.js": "^7.5.0",
|
|
57
57
|
"katex": "^0.18.7",
|
|
58
58
|
"lz-string": "^1.5.0",
|
|
59
|
+
"markdown-it-github-alerts": "^1.0.1",
|
|
59
60
|
"mermaid": "^11.16.1",
|
|
60
61
|
"monaco-editor": "^0.56.0",
|
|
61
62
|
"nanotar": "^0.3.0",
|
|
@@ -63,12 +64,12 @@
|
|
|
63
64
|
"recordrtc": "^5.6.2",
|
|
64
65
|
"shiki": "^4.4.3",
|
|
65
66
|
"typescript": "^6.0.3",
|
|
66
|
-
"unocss": "^66.10.
|
|
67
|
+
"unocss": "^66.10.4",
|
|
67
68
|
"vue": "^3.5.42",
|
|
68
69
|
"vue-router": "^5.3.1",
|
|
69
70
|
"yaml": "^2.9.1"
|
|
70
71
|
},
|
|
71
72
|
"devDependencies": {
|
|
72
|
-
"vite": "
|
|
73
|
+
"vite": "^8.3.0"
|
|
73
74
|
}
|
|
74
75
|
}
|
package/styles/index.css
CHANGED
|
@@ -122,6 +122,21 @@ html {
|
|
|
122
122
|
transform: scale(calc(1 / var(--slidev-slide-scale)));
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
/*
|
|
126
|
+
* Counter the slide scale so iframes lay out and rasterize at their real
|
|
127
|
+
* on-screen resolution. Without this, canvas-based content (e.g. Excalidraw)
|
|
128
|
+
* is rendered at the slide's design size and bitmap-upscaled, which makes it
|
|
129
|
+
* blurry when the slide is scaled up. Scales below 1 are not countered, so
|
|
130
|
+
* scaled-down views like the overview keep the original layout.
|
|
131
|
+
*/
|
|
132
|
+
.slidev-layout-iframe {
|
|
133
|
+
--slidev-iframe-raster: max(var(--slidev-slide-scale, 1), 1);
|
|
134
|
+
width: calc(100% * var(--slidev-iframe-raster));
|
|
135
|
+
height: calc(100% * var(--slidev-iframe-raster));
|
|
136
|
+
transform: scale(calc(var(--slidev-iframe-scale, 1) / var(--slidev-iframe-raster)));
|
|
137
|
+
transform-origin: top left;
|
|
138
|
+
}
|
|
139
|
+
|
|
125
140
|
#twoslash-container {
|
|
126
141
|
position: fixed;
|
|
127
142
|
|