@slidev/client 0.38.7 → 0.38.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.
package/builtin/Tweet.vue
CHANGED
|
@@ -58,7 +58,7 @@ else {
|
|
|
58
58
|
|
|
59
59
|
<template>
|
|
60
60
|
<Transform :scale="scale || 1">
|
|
61
|
-
<div ref="tweet" class="tweet"
|
|
61
|
+
<div ref="tweet" class="tweet">
|
|
62
62
|
<div v-if="!loaded || tweetNotFound" class="w-30 h-30 my-10px bg-gray-400 bg-opacity-10 rounded-lg flex opacity-50">
|
|
63
63
|
<div class="m-auto animate-pulse text-4xl">
|
|
64
64
|
<carbon:logo-twitter />
|
package/internals/Play.vue
CHANGED
|
@@ -9,6 +9,7 @@ import Controls from './Controls.vue'
|
|
|
9
9
|
import SlideContainer from './SlideContainer.vue'
|
|
10
10
|
import NavControls from './NavControls.vue'
|
|
11
11
|
import SlidesShow from './SlidesShow.vue'
|
|
12
|
+
import PrintStyle from './PrintStyle.vue'
|
|
12
13
|
|
|
13
14
|
registerShortcuts()
|
|
14
15
|
|
|
@@ -40,6 +41,7 @@ if (__SLIDEV_FEATURE_DRAWINGS__)
|
|
|
40
41
|
</script>
|
|
41
42
|
|
|
42
43
|
<template>
|
|
44
|
+
<PrintStyle v-if="isPrintMode" />
|
|
43
45
|
<div id="page-root" ref="root" class="grid grid-cols-[1fr_max-content]" :style="themeVars">
|
|
44
46
|
<SlideContainer
|
|
45
47
|
class="w-full h-full"
|
package/internals/Print.vue
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import
|
|
3
|
-
import { h, watchEffect } from 'vue'
|
|
2
|
+
import { watchEffect } from 'vue'
|
|
4
3
|
import { windowSize } from '../state'
|
|
5
4
|
import { isPrintMode } from '../logic/nav'
|
|
6
|
-
import {
|
|
5
|
+
import { themeVars } from '../env'
|
|
7
6
|
import PrintContainer from './PrintContainer.vue'
|
|
8
|
-
|
|
9
|
-
function vStyle<Props>(props: Props, { slots }: { slots: Slots }) {
|
|
10
|
-
if (slots.default)
|
|
11
|
-
return h('style', slots.default())
|
|
12
|
-
}
|
|
7
|
+
import PrintStyle from './PrintStyle.vue'
|
|
13
8
|
|
|
14
9
|
watchEffect(() => {
|
|
15
10
|
if (isPrintMode)
|
|
@@ -20,9 +15,7 @@ watchEffect(() => {
|
|
|
20
15
|
</script>
|
|
21
16
|
|
|
22
17
|
<template>
|
|
23
|
-
<
|
|
24
|
-
@page { size: {{ slideWidth }}px {{ slideHeight }}px; margin: 0px; }
|
|
25
|
-
</vStyle>
|
|
18
|
+
<PrintStyle v-if="isPrintMode" />
|
|
26
19
|
<div id="page-root" class="grid grid-cols-[1fr_max-content]" :style="themeVars">
|
|
27
20
|
<PrintContainer
|
|
28
21
|
class="w-full h-full"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { Slots } from 'vue'
|
|
3
|
+
import { h } from 'vue'
|
|
4
|
+
import { slideHeight, slideWidth } from '../env'
|
|
5
|
+
|
|
6
|
+
function vStyle<Props>(props: Props, { slots }: { slots: Slots }) {
|
|
7
|
+
if (slots.default)
|
|
8
|
+
return h('style', slots.default())
|
|
9
|
+
}
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<vStyle>
|
|
14
|
+
@page { size: {{ slideWidth }}px {{ slideHeight }}px; margin: 0px; }
|
|
15
|
+
</vStyle>
|
|
16
|
+
</template>
|
|
@@ -3,6 +3,7 @@ import { useElementSize } from '@vueuse/core'
|
|
|
3
3
|
import { computed, provide, ref, watchEffect } from 'vue'
|
|
4
4
|
import { configs, slideAspect, slideHeight, slideWidth } from '../env'
|
|
5
5
|
import { injectionSlideScale } from '../constants'
|
|
6
|
+
import { isPrintMode } from '../logic/nav'
|
|
6
7
|
|
|
7
8
|
const props = defineProps({
|
|
8
9
|
width: {
|
|
@@ -34,7 +35,7 @@ if (props.width) {
|
|
|
34
35
|
const screenAspect = computed(() => width.value / height.value)
|
|
35
36
|
|
|
36
37
|
const scale = computed(() => {
|
|
37
|
-
if (props.scale)
|
|
38
|
+
if (props.scale && !isPrintMode.value)
|
|
38
39
|
return props.scale
|
|
39
40
|
if (screenAspect.value < slideAspect)
|
|
40
41
|
return width.value / slideWidth
|
|
@@ -66,7 +67,7 @@ provide(injectionSlideScale, scale)
|
|
|
66
67
|
|
|
67
68
|
<style lang="postcss">
|
|
68
69
|
#slide-container {
|
|
69
|
-
@apply relative overflow-hidden;
|
|
70
|
+
@apply relative overflow-hidden break-after-page;
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
#slide-content {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.8",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"vue-router": "^4.1.6",
|
|
41
41
|
"vue-starport": "^0.3.0",
|
|
42
42
|
"windicss": "^3.5.6",
|
|
43
|
-
"@slidev/parser": "0.38.
|
|
44
|
-
"@slidev/types": "0.38.
|
|
43
|
+
"@slidev/parser": "0.38.8",
|
|
44
|
+
"@slidev/types": "0.38.8"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"vite": "^4.0.4"
|