@slidev/client 0.25.2 → 0.25.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/constants.ts CHANGED
@@ -1,10 +1,9 @@
1
- import { ComputedRef, InjectionKey, Ref } from 'vue'
1
+ import { InjectionKey, Ref } from 'vue'
2
2
 
3
3
  export const injectionClicks: InjectionKey<Ref<number>> = Symbol('v-click-clicks')
4
4
  export const injectionClicksElements: InjectionKey<Ref<(Element | string)[]>> = Symbol('v-click-clicks-elements')
5
5
  export const injectionOrderMap: InjectionKey<Ref<Map<number, HTMLElement[]>>> = Symbol('v-click-clicks-order-map')
6
6
  export const injectionClicksDisabled: InjectionKey<Ref<boolean>> = Symbol('v-click-clicks-disabled')
7
- export const injectionSlideScale: InjectionKey<ComputedRef<number>> = Symbol('slidev-slide-scale')
8
7
 
9
8
  export const CLASS_VCLICK_TARGET = 'slidev-vclick-target'
10
9
  export const CLASS_VCLICK_HIDDEN = 'slidev-vclick-hidden'
@@ -1,14 +1,11 @@
1
1
  <script setup lang="ts">
2
- import { onMounted, ref, watch, inject, onBeforeUnmount } from 'vue'
2
+ import { onMounted, ref, onBeforeUnmount } from 'vue'
3
3
  import { drauu, loadCanvas } from '../logic/drawings'
4
- import { injectionSlideScale } from '../constants'
5
4
 
6
- const scale = inject(injectionSlideScale)!
7
5
  const svg = ref<SVGSVGElement>()
8
6
 
9
7
  onMounted(() => {
10
8
  drauu.mount(svg.value!, svg.value!.parentElement!)
11
- watch(scale, scale => drauu.options.coordinateScale = 1 / scale, { immediate: true })
12
9
  loadCanvas()
13
10
  })
14
11
 
@@ -2,7 +2,6 @@
2
2
  import { useElementSize } from '@vueuse/core'
3
3
  import { computed, provide, ref, watchEffect } from 'vue'
4
4
  import { slideAspect, slideWidth, slideHeight, configs } from '../env'
5
- import { injectionSlideScale } from '../constants'
6
5
 
7
6
  const props = defineProps({
8
7
  width: {
@@ -51,8 +50,6 @@ const className = computed(() => ({
51
50
  'select-none': !configs.selectable,
52
51
  'slidev-code-line-numbers': configs.lineNumbers,
53
52
  }))
54
-
55
- provide(injectionSlideScale, scale)
56
53
  </script>
57
54
 
58
55
  <template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
- "version": "0.25.2",
3
+ "version": "0.25.3",
4
4
  "description": "Presentation slides for developers",
5
5
  "homepage": "https://sli.dev",
6
6
  "bugs": "https://github.com/slidevjs/slidev/issues",
@@ -13,13 +13,13 @@
13
13
  "author": "antfu <anthonyfu117@hotmail.com>",
14
14
  "dependencies": {
15
15
  "@antfu/utils": "^0.3.0",
16
- "@slidev/parser": "0.25.2",
17
- "@slidev/types": "0.25.2",
16
+ "@slidev/parser": "0.25.3",
17
+ "@slidev/types": "0.25.3",
18
18
  "@vueuse/core": "^6.4.0",
19
19
  "@vueuse/head": "^0.6.0",
20
20
  "@vueuse/motion": "^1.6.0",
21
21
  "codemirror": "^5.62.3",
22
- "drauu": "0.1.0",
22
+ "drauu": "^0.1.2",
23
23
  "file-saver": "^2.0.5",
24
24
  "js-base64": "^3.7.1",
25
25
  "js-yaml": "^4.1.0",