|
|
@ -1,6 +1,13 @@
|
|
|
|
import { inBrowser, onContentUpdated, useRoute } from 'vitepress'
|
|
|
|
import { inBrowser, onContentUpdated, useRoute } from 'vitepress'
|
|
|
|
import type { DefaultTheme, useLayout as expected } from 'vitepress/theme'
|
|
|
|
import type { DefaultTheme, useLayout as expected } from 'vitepress/theme'
|
|
|
|
import { computed, shallowReadonly, shallowRef, watch } from 'vue'
|
|
|
|
import {
|
|
|
|
|
|
|
|
computed,
|
|
|
|
|
|
|
|
shallowReadonly,
|
|
|
|
|
|
|
|
shallowRef,
|
|
|
|
|
|
|
|
watch,
|
|
|
|
|
|
|
|
type ComputedRef,
|
|
|
|
|
|
|
|
type InjectionKey
|
|
|
|
|
|
|
|
} from 'vue'
|
|
|
|
import { getSidebar, getSidebarGroups } from '../support/sidebar'
|
|
|
|
import { getSidebar, getSidebarGroups } from '../support/sidebar'
|
|
|
|
import { useData } from './data'
|
|
|
|
import { useData } from './data'
|
|
|
|
import { getHeaders } from './outline'
|
|
|
|
import { getHeaders } from './outline'
|
|
|
@ -102,3 +109,10 @@ export function registerWatchers({ closeSidebar }: RegisterWatchersOptions) {
|
|
|
|
|
|
|
|
|
|
|
|
useCloseSidebarOnEscape(closeSidebar)
|
|
|
|
useCloseSidebarOnEscape(closeSidebar)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export interface LayoutInfo {
|
|
|
|
|
|
|
|
heroImageSlotExists: ComputedRef<boolean>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const layoutInfoInjectionKey: InjectionKey<LayoutInfo> =
|
|
|
|
|
|
|
|
Symbol('layout-info')
|
|
|
|