UNPKG

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).

41 lines (40 loc) 923 B
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>;