UNPKG

vitepress-theme-demoblock

Version:
34 lines (29 loc) 1.11 kB
import MarkdownIt from 'markdown-it'; import { Plugin } from 'vite'; interface Locale { 'view-source': string; 'hide-source': string; 'edit-in-editor': string; 'edit-on-github': string; 'copy-code': string; 'copy-success': string; 'copy-error': string; } interface Locales { [key: string]: Locale; } interface DemoblockPluginOptions { customClass?: string; onCopySuccess?: Function; onCopyError?: Function; } declare const blockPlugin: (md: MarkdownIt, options: DemoblockPluginOptions) => void; declare const codePlugin: (md: MarkdownIt, options: DemoblockPluginOptions) => void; declare const demoblock: (md: MarkdownIt, options?: DemoblockPluginOptions) => void; interface DemoblockOptions { env: 'vite' | 'vitepress'; root: string; } declare function VitePluginDemoblock(): Plugin; export { VitePluginDemoblock, blockPlugin, codePlugin, demoblock as default, demoblock as demoBlockPlugin, demoblock, demoblock as demoblockPlugin, VitePluginDemoblock as demoblockVitePlugin }; export type { DemoblockOptions, DemoblockPluginOptions, Locale, Locales };