element-book
Version:
An [`element-vir`](https://npmjs.com/package/element-vir) drop-in element for building, testing, and demonstrating a collection of elements (or, in other words, a design system).
35 lines (34 loc) • 903 B
TypeScript
import { type FullSpaRoute } from 'spa-router-vir';
/**
* Top level routes supported by the element-book app.
*
* @category Internal
*/
export declare enum BookMainRoute {
Search = "search",
Book = "book"
}
/**
* Valid route paths for the element-book app.
*
* @category Internal
*/
export type ValidBookPaths = [BookMainRoute.Search, string] | [BookMainRoute.Book, ...string[]];
/**
* A full element-book app route. Only paths are supported.
*
* @category Internal
*/
export type BookFullRoute = Readonly<FullSpaRoute<ValidBookPaths, undefined, undefined>>;
/**
* Extract the current search query from the current route paths.
*
* @category Internal
*/
export declare function extractSearchQuery(paths: Readonly<ValidBookPaths>): string;
/**
* The default element-book app route.
*
* @category Internal
*/
export declare const defaultBookFullRoute: Readonly<BookFullRoute>;