@ribajs/router
Version:
Routing extension for Riba.js inspired by Barba.js
33 lines (32 loc) • 1.64 kB
TypeScript
import { Component, View, TemplateFunction, ScopeBase } from "@ribajs/core";
import { EventDispatcher } from "@ribajs/events";
import { State } from "@ribajs/history";
import { Pjax, Prefetch } from "../../services/index.js";
import type { RouterViewOptions, JsxRouterViewProps } from "../../types/index.js";
interface RouterViewScope extends RouterViewOptions, ScopeBase {
}
export declare class RouterViewComponent extends Component {
static tagName: string;
protected events: EventDispatcher;
protected nested: View | null;
protected wrapper: HTMLElement | null;
protected pjax: Pjax | null;
protected prefetch: Prefetch | null;
static get observedAttributes(): (keyof JsxRouterViewProps)[];
scope: RouterViewScope;
constructor();
protected connectedCallback(): void;
protected addEventListeners(): void;
protected removeEventListeners(): void;
protected getContainerSelector(): string;
protected initAndStartPjax(): void;
protected onPageReady(viewId: string, currentStatus: State, prevStatus: State, container: HTMLElement, newPageRawHTML: string, dataset: any, isInit: boolean): void;
protected onTransitionInit(viewId: string): Promise<void>;
protected onTransitionCompleted(viewId: string): Promise<void>;
protected setTransitionClass(state: "init" | "complete"): void;
protected requiredAttributes(): string[];
protected parsedAttributeChangedCallback(attributeName: string, oldValue: any, newValue: any, namespace: string | null): void;
protected beforeBind(): Promise<void>;
protected template(): ReturnType<TemplateFunction>;
}
export {};