Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
autoreleaser committed Jan 26, 2024
1 parent fa44db8 commit a2eafa3
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export declare class RootNavigation extends LitElement {
private handleKeyDown;
private handleKeyUp;
private handleNavigationToggle;
protected renderItem(element: Parsed.Element): TemplateResult;
protected renderItem({ name, link }: Parsed.GroupedElement): TemplateResult;
protected renderItems(items: Parsed.GroupedElements, nested?: boolean): TemplateResult | undefined;
protected render(): TemplateResult;
}
Expand Down
4 changes: 2 additions & 2 deletions latest/custom-elements.json
Original file line number Diff line number Diff line change
Expand Up @@ -3796,9 +3796,9 @@
},
"parameters": [
{
"name": "element",
"name": "{ name, link }",
"type": {
"text": "Parsed.Element"
"text": "Parsed.GroupedElement"
}
}
]
Expand Down
100 changes: 50 additions & 50 deletions latest/index.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions latest/index.js.map

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions latest/utils/navigation.utils.d.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import type { Config } from '../utils/config.utils.js';
import type * as Parsed from '../utils/parser.types.js';
export declare const ROUTE_ELEMENTS = "/element";
export declare const ROUTE_READMES = "/readme";
type GroupedNavigationItem = {
name: string;
link: string;
};
/**
* Creates a navigation item for a given readme.
*/
export declare function prepareReadmeNavigationItem(name: string, url: string): GroupedNavigationItem;
export declare function prepareReadmeLink(url: string): string;
/**
* Creates a navigation item for a given element.
*/
export declare function prepareElementNavigationItem(element: Parsed.Element): GroupedNavigationItem;
export declare function prepareElementLink(element: Parsed.Element): string;
/**
* Prepares a grouped navigation structure of readmes and elements.
*/
export declare function prepareNavigation(manifest: Parsed.Manifest, config: Config): Parsed.GroupedElements;
/**
* Predicate function to match a given content against a list of search terms.
*/
Expand All @@ -21,4 +22,3 @@ export declare function matchesSearch(content: string, terms: string[], minSearc
* Filters the given navigation items by the given search terms recursively.
*/
export declare function filterItems(items: Parsed.GroupedElements, terms: string[], minSearchLength?: number): Parsed.GroupedElements;
export {};
7 changes: 6 additions & 1 deletion latest/utils/parser.types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,12 @@ export type Element = {
* Grouped elements, even nested.
* The key is either the group or element name.
*/
export type GroupedElements = Map<string, Element | GroupedElements>;
export type GroupedElements = Map<string, GroupedElement | GroupedElements>;
export type GroupedElement = {
link: string;
name: string;
element: Element;
};
/**
* Wraps a manifest to provide additional meta data.
*/
Expand Down

0 comments on commit a2eafa3

Please sign in to comment.