@@ -5,18 +5,34 @@ import type { ShikijiTransformerContext, ShikijiTransformerContextCommon } from
5
5
import { gfmFromMarkdown } from 'mdast-util-gfm'
6
6
import { fromMarkdown } from 'mdast-util-from-markdown'
7
7
import { defaultHandlers , toHast } from 'mdast-util-to-hast'
8
- import type { VitePressPluginTwoslashOptions } from 'vitepress-plugin-twoslash'
9
8
10
9
export { defaultHoverInfoProcessor }
11
10
12
- export function rendererFloatingVue ( options : VitePressPluginTwoslashOptions & RendererRichOptions = { } ) : TwoslashRenderer {
13
- const classCopyIgnore = 'vp-copy-ignore'
14
- const classFloatingPanel = 'twoslash-floating'
15
- const classCode = 'vp-code'
16
- const classMarkdown = 'vp-doc'
17
- const floatingVueTheme = 'twoslash'
18
- const floatingVueThemeQuery = 'twoslash-query'
19
- const floatingVueThemeCompletion = 'twoslash-completion'
11
+ export interface TwoslashFloatingVueOptions {
12
+ classCopyIgnore ?: string
13
+ classFloatingPanel ?: string
14
+ classCode ?: string
15
+ classMarkdown ?: string
16
+
17
+ floatingVueTheme ?: string
18
+ floatingVueThemeQuery ?: string
19
+ floatingVueThemeCompletion ?: string
20
+ }
21
+
22
+ export interface TwoslashFloatingVueRendererOptions extends RendererRichOptions , TwoslashFloatingVueOptions {
23
+ floatingVue ?: TwoslashFloatingVueOptions
24
+ }
25
+
26
+ export function rendererFloatingVue ( options : TwoslashFloatingVueRendererOptions = { } ) : TwoslashRenderer {
27
+ const {
28
+ classCopyIgnore = 'vp-copy-ignore' ,
29
+ classFloatingPanel = 'twoslash-floating' ,
30
+ classCode = 'vp-code' ,
31
+ classMarkdown = 'vp-doc' ,
32
+ floatingVueTheme = 'twoslash' ,
33
+ floatingVueThemeQuery = 'twoslash-query' ,
34
+ floatingVueThemeCompletion = 'twoslash-completion' ,
35
+ } = options . floatingVue || { }
20
36
21
37
const hoverBasicProps = {
22
38
'class' : 'twoslash-hover' ,
0 commit comments