@slidev/client 0.40.2 → 0.40.3

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/Link.vue CHANGED
@@ -10,8 +10,6 @@ Usage:
10
10
  <script setup lang="ts">
11
11
  import { isPrintMode } from '../logic/nav'
12
12
 
13
- /* eslint-disable vue/no-v-text-v-html-on-component */
14
-
15
13
  defineProps<{
16
14
  to: number | string
17
15
  title?: string
@@ -28,12 +28,14 @@ watchEffect(() => {
28
28
  <style lang="postcss">
29
29
  html.print,
30
30
  html.print body,
31
- html.print #app,
32
- html.print #page-root {
31
+ html.print #app {
33
32
  height: auto;
34
33
  overflow: auto;
35
34
  }
36
-
35
+ html.print #page-root {
36
+ height: auto;
37
+ overflow: hidden;
38
+ }
37
39
  html.print * {
38
40
  -webkit-print-color-adjust: exact;
39
41
  }
@@ -31,7 +31,7 @@ const loadedRoutes = computed(() => rawRoutes.filter(r => r.meta?.__preloaded ||
31
31
  <GlobalBottom />
32
32
 
33
33
  <!-- Slides -->
34
- <TransitionGroup v-bind="transition">
34
+ <TransitionGroup v-bind="transition" id="slideshow" tag="div">
35
35
  <template v-for="route of loadedRoutes" :key="route.path">
36
36
  <SlideWrapper
37
37
  :is="route?.component as any"
@@ -54,3 +54,13 @@ const loadedRoutes = computed(() => rawRoutes.filter(r => r.meta?.__preloaded ||
54
54
  </template>
55
55
  <PresenterMouse v-if="!isPresenter" />
56
56
  </template>
57
+
58
+ <style scoped>
59
+ #slideshow {
60
+ @apply h-full;
61
+ }
62
+
63
+ #slideshow > div {
64
+ @apply h-full w-full absolute;
65
+ }
66
+ </style>
package/layoutHelper.ts CHANGED
@@ -10,7 +10,7 @@ export function resolveAssetUrl(url: string) {
10
10
  }
11
11
 
12
12
  export function handleBackground(background?: string, dim = false): CSSProperties {
13
- const isColor = background && background[0] === '#' && background.startsWith('rgb')
13
+ const isColor = background && (background[0] === '#' || background.startsWith('rgb'))
14
14
 
15
15
  const style = {
16
16
  background: isColor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
- "version": "0.40.2",
3
+ "version": "0.40.3",
4
4
  "description": "Presentation slides for developers",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -18,20 +18,20 @@
18
18
  "@antfu/utils": "^0.7.2",
19
19
  "@unocss/reset": "^0.49.4",
20
20
  "@vueuse/core": "^9.12.0",
21
- "@vueuse/head": "^1.0.24",
21
+ "@vueuse/head": "^1.0.25",
22
22
  "@vueuse/math": "^9.12.0",
23
23
  "@vueuse/motion": "^2.0.0-beta.27",
24
24
  "codemirror": "^5.65.5",
25
25
  "defu": "^6.1.2",
26
26
  "drauu": "^0.3.2",
27
27
  "file-saver": "^2.0.5",
28
- "js-base64": "^3.7.4",
28
+ "js-base64": "^3.7.5",
29
29
  "js-yaml": "^4.1.0",
30
30
  "katex": "^0.16.4",
31
31
  "mermaid": "^9.3.0",
32
32
  "monaco-editor": "^0.33.0",
33
- "nanoid": "^4.0.0",
34
- "prettier": "^2.8.3",
33
+ "nanoid": "^4.0.1",
34
+ "prettier": "^2.8.4",
35
35
  "recordrtc": "^5.6.2",
36
36
  "resolve": "^1.22.1",
37
37
  "unocss": "^0.49.4",
@@ -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.40.2",
44
- "@slidev/types": "0.40.2"
43
+ "@slidev/parser": "0.40.3",
44
+ "@slidev/types": "0.40.3"
45
45
  },
46
46
  "devDependencies": {
47
47
  "vite": "^4.1.1"
package/setup/root.ts CHANGED
@@ -11,7 +11,7 @@ import { TRUST_ORIGINS } from '../constants'
11
11
 
12
12
  export default function setupRoot() {
13
13
  // @ts-expect-error injected in runtime
14
-
14
+ // eslint-disable-next-line unused-imports/no-unused-vars
15
15
  const injection_arg = undefined
16
16
 
17
17
  /* __injections__ */
@@ -54,7 +54,7 @@ export default function setupRoot() {
54
54
  const routePath = router.currentRoute.value.path
55
55
  if (!routePath.match(/^\/(\d+|presenter)\/?/))
56
56
  return
57
- if (+state.page !== +currentPage.value || +clicks.value !== +state.clicks) {
57
+ if (state.lastUpdate?.type === 'presenter' && (+state.page !== +currentPage.value || +clicks.value !== +state.clicks)) {
58
58
  router.replace({
59
59
  path: getPath(state.page),
60
60
  query: {
@@ -1,7 +1,3 @@
1
- #slide-content > div {
2
- @apply h-full w-full absolute;
3
- }
4
-
5
1
  .slidev-layout {
6
2
  @apply px-14 py-10 text-[1.1rem] h-full;
7
3