@slidev/client 0.43.0-beta.4 → 0.43.0-beta.5
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 +3 -1
- package/internals/SlideWrapper.ts +8 -2
- package/package.json +5 -5
package/constants.ts
CHANGED
|
@@ -5,12 +5,14 @@ import type { SlidevContext } from './modules/context'
|
|
|
5
5
|
|
|
6
6
|
export const injectionClicks: InjectionKey<Ref<number>> = Symbol('v-click-clicks')
|
|
7
7
|
export const injectionClicksElements: InjectionKey<Ref<(Element | string)[]>> = Symbol('v-click-clicks-elements')
|
|
8
|
-
export const injectionOrderMap: InjectionKey<Ref<Map<number, HTMLElement[]>>> = Symbol('v-click-clicks-order-map')
|
|
9
8
|
export const injectionClicksDisabled: InjectionKey<Ref<boolean>> = Symbol('v-click-clicks-disabled')
|
|
9
|
+
export const injectionOrderMap: InjectionKey<Ref<Map<number, HTMLElement[]>>> = Symbol('v-click-clicks-order-map')
|
|
10
|
+
export const injectionCurrentPage: InjectionKey<number> = Symbol('slidev-page')
|
|
10
11
|
export const injectionSlideScale: InjectionKey<ComputedRef<number>> = Symbol('slidev-slide-scale')
|
|
11
12
|
export const injectionSlidevContext: InjectionKey<UnwrapNestedRefs<SlidevContext>> = Symbol('slidev-slidev-context')
|
|
12
13
|
export const injectionRoute: InjectionKey<RouteRecordRaw> = Symbol('slidev-route')
|
|
13
14
|
export const injectionSlideContext: InjectionKey<RenderContext> = Symbol('slidev-slide-context')
|
|
15
|
+
export const injectionActive: InjectionKey<Ref<boolean>> = Symbol('slidev-active')
|
|
14
16
|
|
|
15
17
|
export const CLASS_VCLICK_TARGET = 'slidev-vclick-target'
|
|
16
18
|
export const CLASS_VCLICK_HIDDEN = 'slidev-vclick-hidden'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useVModel } from '@vueuse/core'
|
|
2
2
|
import type { Ref } from 'vue'
|
|
3
|
-
import { defineComponent, h, provide } from 'vue'
|
|
3
|
+
import { defineComponent, h, provide, toRef } from 'vue'
|
|
4
4
|
import type { RenderContext } from '@slidev/types'
|
|
5
|
-
import { injectionClicks, injectionClicksDisabled, injectionClicksElements, injectionOrderMap, injectionRoute, injectionSlideContext } from '../constants'
|
|
5
|
+
import { injectionActive, injectionClicks, injectionClicksDisabled, injectionClicksElements, injectionCurrentPage, injectionOrderMap, injectionRoute, injectionSlideContext } from '../constants'
|
|
6
6
|
|
|
7
7
|
export default defineComponent({
|
|
8
8
|
name: 'SlideWrapper',
|
|
@@ -27,6 +27,10 @@ export default defineComponent({
|
|
|
27
27
|
type: String,
|
|
28
28
|
default: 'main',
|
|
29
29
|
},
|
|
30
|
+
active: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false,
|
|
33
|
+
},
|
|
30
34
|
is: {
|
|
31
35
|
type: Object,
|
|
32
36
|
default: undefined,
|
|
@@ -45,7 +49,9 @@ export default defineComponent({
|
|
|
45
49
|
clicksElements.value.length = 0
|
|
46
50
|
|
|
47
51
|
provide(injectionRoute, props.route as any)
|
|
52
|
+
provide(injectionCurrentPage, +props.route?.path)
|
|
48
53
|
provide(injectionSlideContext, props.context as RenderContext)
|
|
54
|
+
provide(injectionActive, toRef(props, 'active'))
|
|
49
55
|
provide(injectionClicks, clicks as Ref<number>)
|
|
50
56
|
provide(injectionClicksDisabled, clicksDisabled)
|
|
51
57
|
provide(injectionClicksElements, clicksElements as any)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
|
-
"version": "0.43.0-beta.
|
|
3
|
+
"version": "0.43.0-beta.5",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@antfu/utils": "^0.7.6",
|
|
19
|
-
"@unocss/reset": "^0.55.
|
|
19
|
+
"@unocss/reset": "^0.55.6",
|
|
20
20
|
"@vueuse/core": "^10.4.1",
|
|
21
21
|
"@vueuse/head": "^1.3.1",
|
|
22
22
|
"@vueuse/math": "^10.4.1",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"prettier": "^3.0.3",
|
|
36
36
|
"recordrtc": "^5.6.2",
|
|
37
37
|
"resolve": "^1.22.4",
|
|
38
|
-
"unocss": "^0.55.
|
|
38
|
+
"unocss": "^0.55.6",
|
|
39
39
|
"vite-plugin-windicss": "^1.9.1",
|
|
40
40
|
"vue": "^3.3.4",
|
|
41
41
|
"vue-router": "^4.2.4",
|
|
42
42
|
"vue-starport": "^0.3.0",
|
|
43
43
|
"windicss": "^3.5.6",
|
|
44
|
-
"@slidev/parser": "0.43.0-beta.
|
|
45
|
-
"@slidev/types": "0.43.0-beta.
|
|
44
|
+
"@slidev/parser": "0.43.0-beta.5",
|
|
45
|
+
"@slidev/types": "0.43.0-beta.5"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"vite": "^4.4.9"
|