diff --git a/plugins/plugin-md-power/src/client/index.ts b/plugins/plugin-md-power/src/client/index.ts index 72593733..e2068e30 100644 --- a/plugins/plugin-md-power/src/client/index.ts +++ b/plugins/plugin-md-power/src/client/index.ts @@ -1 +1,3 @@ export * from '../shared/index.js' + +export { default as VPFadeInExpandTransition } from './components/VPFadeInExpandTransition.vue' diff --git a/plugins/plugin-md-power/src/client/shim.d.ts b/plugins/plugin-md-power/src/client/shim.d.ts index 16ffdc92..336bb25d 100644 --- a/plugins/plugin-md-power/src/client/shim.d.ts +++ b/plugins/plugin-md-power/src/client/shim.d.ts @@ -1,5 +1,12 @@ import type { ReplEditorData } from '../shared/repl.js' +declare module '*.vue' { + import type { ComponentOptions } from 'vue' + + const comp: ComponentOptions + export default comp +} + declare module '@internal/md-power/replEditorData' { const res: ReplEditorData diff --git a/plugins/plugin-md-power/tsup.config.ts b/plugins/plugin-md-power/tsup.config.ts index 32f833c7..96bc85f6 100644 --- a/plugins/plugin-md-power/tsup.config.ts +++ b/plugins/plugin-md-power/tsup.config.ts @@ -9,6 +9,7 @@ const config = [ ] const clientExternal = [ + /.*\.vue$/, /composables\/.*\.js$/, /utils\/.*\.js$/, /.*\/options\.js$/, diff --git a/theme/src/client/components/VPSidebarItem.vue b/theme/src/client/components/VPSidebarItem.vue index 7da0f378..f6d79c7e 100644 --- a/theme/src/client/components/VPSidebarItem.vue +++ b/theme/src/client/components/VPSidebarItem.vue @@ -2,9 +2,12 @@ import type { ResolvedSidebarItem } from '../../shared/index.js' import VPIcon from '@theme/VPIcon.vue' import VPLink from '@theme/VPLink.vue' +import { FadeInExpandTransition } from '@vuepress/helper/client' import { computed } from 'vue' import { useSidebarControl } from '../composables/index.js' +import '@vuepress/helper/transition/fade-in-height-expand.css' + const props = defineProps<{ item: ResolvedSidebarItem depth: number @@ -101,16 +104,20 @@ function onCaretClick() { -