Skip to content

Commit

Permalink
Merge pull request #1 from jakeisnt/main
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyzha0 committed Feb 25, 2022
2 parents 2174557 + 46bc8ef commit d8480cb
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 40 deletions.
20 changes: 16 additions & 4 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,20 @@ interface TelescopeNode {
depth: number;
telescopicOut: TelescopicOutput;
}
declare function _hydrate(line: Content, node: any): void;
declare function _createTelescopicText(content: Content[]): HTMLDivElement;
interface Config {
/**
* Character used to separate entries on the same level. Defaults to a single space (" ")
*/
separator?: string;
/**
* If true, allows sections to expand automatically on mouse over rather than requiring a click.
*/
shouldExpandOnMouseOver?: boolean;
}
declare const DefaultConfig: Config;
declare let _lastHoveredTime: number;
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 @@ -28,7 +40,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, shouldExpandOnMouseOver }?: 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.

0 comments on commit d8480cb

Please sign in to comment.