test/node_modules/@vuepress/plugin-active-header-links/lib/node/activeHeaderLinksPlugin.d.ts
2024-08-13 09:27:52 +08:00

36 lines
987 B
TypeScript

import type { Plugin } from 'vuepress/core';
/**
* Options for @vuepress/plugin-active-header-links
*/
export interface ActiveHeaderLinksPluginOptions {
/**
* Selector of header link
*
* If a header anchor does not have a corresponding header link,
* this plugin won't change the route hash to that anchor when
* scrolling to it.
*
* @default 'a.sidebar-item'
*/
headerLinkSelector?: string;
/**
* Selector of header anchor
*
* @default '.header-anchor'
*/
headerAnchorSelector?: string;
/**
* The delay of the debounced scroll event listener (in millisecond)
*
* @default 200
*/
delay?: number;
/**
* Pixel offset when a header anchor to be determined as active
*
* @default 5
*/
offset?: number;
}
export declare const activeHeaderLinksPlugin: ({ headerLinkSelector, headerAnchorSelector, delay, offset, }?: ActiveHeaderLinksPluginOptions) => Plugin;