@slidev/client 0.30.0 → 0.30.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.
@@ -11,10 +11,6 @@ const your_code = 'here'
11
11
  Learn more: https://sli.dev/guide/syntax.html#monaco-editor
12
12
  -->
13
13
 
14
- <template>
15
- <iframe ref="iframe" class="text-base w-full rounded" :style="{ height }" />
16
- </template>
17
-
18
14
  <script setup lang="ts">
19
15
  import { computed, onMounted, ref, watchEffect } from 'vue'
20
16
  import { useEventListener } from '@vueuse/core'
@@ -135,3 +131,7 @@ watchEffect(() => {
135
131
  postStyle()
136
132
  })
137
133
  </script>
134
+
135
+ <template>
136
+ <iframe ref="iframe" class="text-base w-full rounded" :style="{ height }" />
137
+ </template>
@@ -10,10 +10,6 @@ Alice -> Bob : Hello!
10
10
  @enduml
11
11
  ```
12
12
  -->
13
- <template>
14
- <img alt="PlantUML diagram" :src="uri" :style="{scale}">
15
- </template>
16
-
17
13
  <script setup lang="ts">
18
14
 
19
15
  import { computed } from 'vue'
@@ -27,3 +23,7 @@ const props = defineProps<{
27
23
  const uri = computed(() => `${props.server}/svg/${props.code}`)
28
24
 
29
25
  </script>
26
+
27
+ <template>
28
+ <img alt="PlantUML diagram" :src="uri" :style="{scale}">
29
+ </template>
@@ -15,7 +15,8 @@ const height = computed(() => props.width / slideAspect)
15
15
  const screenAspect = computed(() => width.value / height.value)
16
16
 
17
17
  const scale = computed(() => {
18
- if (screenAspect.value < slideAspect) return width.value / slideWidth
18
+ if (screenAspect.value < slideAspect)
19
+ return width.value / slideWidth
19
20
  return (height.value * slideAspect) / slideWidth
20
21
  })
21
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
- "version": "0.30.0",
3
+ "version": "0.30.1",
4
4
  "description": "Presentation slides for developers",
5
5
  "homepage": "https://sli.dev",
6
6
  "bugs": "https://github.com/slidevjs/slidev/issues",
@@ -13,8 +13,8 @@
13
13
  "funding": "https://github.com/sponsors/antfu",
14
14
  "dependencies": {
15
15
  "@antfu/utils": "^0.5.1",
16
- "@slidev/parser": "0.30.0",
17
- "@slidev/types": "0.30.0",
16
+ "@slidev/parser": "0.30.1",
17
+ "@slidev/types": "0.30.1",
18
18
  "@vueuse/core": "^8.2.5",
19
19
  "@vueuse/head": "^0.7.5",
20
20
  "@vueuse/motion": "^2.0.0-beta.18",
package/setup/prettier.ts CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  import { format } from 'prettier'
3
2
 
4
3
  export async function formatCode(code: string, lang: string) {