/** * @typedef ChangeViewObject * @property {string} [path] * @property {string} [name] * @property {string} [hash] * */ /** * @typedef SimplrRouterNavigationDataProps * * @property { string } [realPath] The original determined path of the route * @property { string[] } [parts] String parts of the parsed route * @property { Object. } [params] Dynamic parts of the route mapped * @property { boolean } backwards If the navigation is being done backwards in history * @property { boolean } initialView If this is the initial view loaded first on load instead of navigation * @property { SimplrRouterBreadcrumb[] } crumbs The breadcrumbs to the current path * @property { SimplrRouterNavigationData } [nestedParent] The parent view of a nested route * @property { Object. } [properties] Properties to be passed to the view component * * @typedef { import("./SimplrRoute").SimplrRoute & SimplrRouterNavigationDataProps } SimplrRouterNavigationData * */ /** * @typedef SimplrRouterBreadcrumb * @property {string} path * @property {string} [name] * @property {Object.} [params] * */ /** * @typedef ObserverFunctions * @property { Function } findViewForRoute * @property { Function } changeView * @property { Function } getViewFromUrl * */ export const _shared: {}; export type ChangeViewObject = { path?: string; name?: string; hash?: string; }; export type SimplrRouterNavigationDataProps = { /** * The original determined path of the route */ realPath?: string; /** * String parts of the parsed route */ parts?: string[]; /** * Dynamic parts of the route mapped */ params?: { [x: string]: string; }; /** * If the navigation is being done backwards in history */ backwards: boolean; /** * If this is the initial view loaded first on load instead of navigation */ initialView: boolean; /** * The breadcrumbs to the current path */ crumbs: SimplrRouterBreadcrumb[]; /** * The parent view of a nested route */ nestedParent?: SimplrRouterNavigationData; /** * Properties to be passed to the view component */ properties?: { [x: string]: string; }; }; export type SimplrRouterNavigationData = import("./SimplrRoute").SimplrRoute & SimplrRouterNavigationDataProps; export type SimplrRouterBreadcrumb = { path: string; name?: string; params?: { [x: string]: string; }; }; export type ObserverFunctions = { findViewForRoute: Function; changeView: Function; getViewFromUrl: Function; };