File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
- import { ref , shallowRef , toRef } from 'vue'
1
+ import { shallowRef , toRef } from 'vue'
2
2
import { injectLocal , objectOmit , provideLocal } from '@vueuse/core'
3
3
import { useFixedClicks } from './composables/useClicks'
4
4
import {
@@ -23,7 +23,7 @@ export function useSlideContext() {
23
23
const $clicksContext = injectLocal ( injectionClicksContext , clicksContextFallback ) ! . value
24
24
const $clicks = toRef ( $clicksContext , 'current' )
25
25
const $page = injectLocal ( injectionCurrentPage ) !
26
- const $renderContext = injectLocal ( injectionRenderContext , ref ( 'slide' ) )
26
+ const $renderContext = injectLocal ( injectionRenderContext ) !
27
27
const $frontmatter = injectLocal ( injectionFrontmatter , { } )
28
28
const $route = injectLocal ( injectionRoute , undefined )
29
29
Original file line number Diff line number Diff line change 1
1
import type { App } from 'vue'
2
- import { computed , reactive } from 'vue'
2
+ import { computed , reactive , ref } from 'vue'
3
3
import type { RouteLocationNormalizedLoaded , RouteRecordRaw } from 'vue-router'
4
4
import type { ComputedRef } from '@vue/reactivity'
5
5
import type { configs } from '../env'
6
6
import * as nav from '../logic/nav'
7
7
import { route } from '../logic/nav'
8
8
import { isDark } from '../logic/dark'
9
- import { injectionCurrentPage , injectionSlidevContext } from '../constants'
9
+ import { injectionCurrentPage , injectionRenderContext , injectionSlidevContext } from '../constants'
10
10
import { useContext } from '../composables/useContext'
11
11
12
12
export type SlidevContextNavKey = 'path' | 'total' | 'clicksContext' | 'clicks' | 'clicksTotal' | 'currentPage' | 'currentPath' | 'currentRoute' | 'currentSlideId' | 'currentLayout' | 'nextRoute' | 'rawTree' | 'treeWithActiveStatuses' | 'tree' | 'downloadPDF' | 'next' | 'nextSlide' | 'openInEditor' | 'prev' | 'prevSlide' | 'rawRoutes' | 'go'
@@ -25,6 +25,7 @@ export default function createSlidevContext() {
25
25
return {
26
26
install ( app : App ) {
27
27
const context = reactive ( useContext ( route ) )
28
+ app . provide ( injectionRenderContext , ref ( 'none' ) )
28
29
app . provide ( injectionSlidevContext , context )
29
30
app . provide ( injectionCurrentPage , computed ( ( ) => context . nav . currentPage ) )
30
31
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ export interface SlidevPreparserExtension {
89
89
90
90
export type PreparserExtensionLoader = ( headmatter ?: Record < string , unknown > , filepath ?: string ) => Promise < SlidevPreparserExtension [ ] >
91
91
92
- export type RenderContext = 'slide' | 'overview' | 'presenter' | 'previewNext'
92
+ export type RenderContext = 'none' | ' slide' | 'overview' | 'presenter' | 'previewNext'
93
93
94
94
export type LoadedSnippets = Record < string , string >
95
95
You can’t perform that action at this time.
0 commit comments