Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add optional text expansion on mouseover #1

Merged
merged 10 commits into from
Feb 25, 2022
19 changes: 14 additions & 5 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,22 @@ interface TelescopeNode {
telescopicOut: TelescopicOutput;
}
interface Config {
/**
* Character used to separate entries on the same level. Defaults to a single space (" ")
*/
/**
* Character used to separate entries on the same level. Defaults to a single space (" ")
*/
separator?: string;
hoverable?: boolean;
/**
* If true, allows sections to expand automatically on mouse over rather than requiring a click.
*/
shouldExpandOnMouseOver?: boolean;
}
declare const _DEFAULT_CONFIG: Config;
declare const DefaultConfig: Config;
declare let _lastHoveredTime: number;
declare function _hydrate(line: Content, node: any, hoverable?: boolean): void;
declare function _createTelescopicText(content: Content[], hoverable?: boolean): HTMLDivElement;
declare function _hydrate(line: Content, node: any, shouldExpandOnMouseOver?: boolean): void;
declare function _createTelescopicText(content: Content[], shouldExpandOnMouseOver?: boolean): HTMLDivElement;
/*****************/
/*****************/
declare function _parseMarkdown(mdContent: string): TelescopicOutput;
Expand All @@ -37,4 +46,4 @@ declare function _parseMarkdownIntoContent(mdContent: string, separator?: string
* @param config - Configuration options provided to create interactive, telescopic text.
* @returns HTML div containing the telescoping text.
*/
declare function createTelescopicTextFromBulletedList(listContent: string, { separator, hoverable }?: Config): HTMLDivElement;
declare function createTelescopicTextFromBulletedList(listContent: string, { separator, shouldExpandOnMouseOver }?: Config): HTMLDivElement;
24 changes: 12 additions & 12 deletions lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.