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
14 changes: 10 additions & 4 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ interface TelescopeNode {
depth: number;
telescopicOut: TelescopicOutput;
}
declare function _hydrate(line: Content, node: any): void;
declare function _createTelescopicText(content: Content[]): HTMLDivElement;
interface Config {
separator?: string;
hoverable?: boolean;
}
declare const _DEFAULT_CONFIG: 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 _parseMarkdown(mdContent: string): TelescopicOutput;
Expand All @@ -28,7 +34,7 @@ declare function _parseMarkdownIntoContent(mdContent: string, separator?: string
* Parses a markdown-compatible bulleted list into an HTML div that contains the telescoping text specified by the bullet list content.
*
* @param listContent - Content in the form of a bulleted list where items on the same level are combined using the `separator` parameter.
* @param separator - character to divide items on the same indentation level.
* @param config - Configuration options provided to create interactive, telescopic text.
* @returns HTML div containing the telescoping text.
*/
declare function createTelescopicTextFromBulletedList(listContent: string, separator?: string): HTMLDivElement;
declare function createTelescopicTextFromBulletedList(listContent: string, { separator, hoverable }?: Config): HTMLDivElement;
35 changes: 27 additions & 8 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.

20 changes: 0 additions & 20 deletions package-lock.json

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