UNPKG

vue-highlight-words

Version:

Vue component to highlight words within a larger body of text

49 lines (43 loc) 1.42 kB
import type { AllowedComponentProps } from 'vue'; import type { App } from 'vue'; import type { Chunk } from 'highlight-words-core'; import type { ComponentCustomProps } from 'vue'; import type { FindChunksArgs } from 'highlight-words-core'; import type { VNode } from 'vue'; import type { VNodeProps } from 'vue'; export declare function install(app: App, options?: { name: string; }): void; export declare interface TextChunk { chunk: Chunk; text: string; attrs?: { class: string; key: number; highlightIndex: number; style: Partial<CSSStyleDeclaration>; }; } declare const VueHighlightWords: new () => { $props: AllowedComponentProps & ComponentCustomProps & VNodeProps & VueHighlightWordsProps; $slots: { default: (arg: TextChunk[]) => VNode[]; }; }; export { VueHighlightWords } export default VueHighlightWords; export declare interface VueHighlightWordsProps { activeClassName?: string; activeIndex?: number; activeStyle?: Partial<CSSStyleDeclaration>; autoEscape?: boolean; caseSensitive?: boolean; findChunks?: (args: FindChunksArgs) => Chunk[]; custom?: boolean; highlightClassName?: string; highlightStyle?: Partial<CSSStyleDeclaration>; sanitize?: (text: string) => string; searchWords: string[]; textToHighlight: string; } export { }