UNPKG

v-regexp

Version:

JavaScript Regular Expression Parser and Visualizer.

19 lines (18 loc) 886 B
/** * 通用方法 */ import { RaphaelElement, RaphaelPaper } from 'raphael'; import { Theme, GetCharSizeParams, CharSizeCacheItem, HighlightText, GetHighlightTextParams } from '../types'; /** * 获取 rapheal 文本模版 * @param paper * @param theme 主题 */ export declare function getTemplateText(paper: RaphaelPaper, theme: Theme): RaphaelElement; export declare function getCharSize({ fontSize, fontBold, templateText }: GetCharSizeParams): CharSizeCacheItem; export declare function charsetEscape(str: string, isRaw?: boolean): any; export declare function onlyCharClass(node: any): boolean; export declare function getHighlightText({ str, color, theme }: GetHighlightTextParams): HighlightText; export declare function elideOK(node: any): boolean; export declare function translate(items: any, dx: any, dy: any): void; export declare function plural(n: number): string;