import { RootCssInjectorController } from '@a11d/root-css-injector'; import { NonInertableComponent } from '@a11d/non-inertable-component'; import { HookSet, RouterController } from './index.js'; /** Appends an instance of the decorated `Application` subclass to the document body, unless one is already there. */ export declare const application: () => (ApplicationConstructor: Constructor) => void; /** * The base class of an application, which renders the page matching the URL and hosts dialogs and notifications in its top layer. * * It renders into its light DOM and injects its static `styles` into the document. It connects once its `connectingHooks` have run, * renders `pageLoadingTemplate` until its `beforeRouteHooks` have run, and then the page matching the URL, dispatching the * `Application.connected`, `Application.initialized` and `Application.routed` window events in that order. Pages and dialogs * render into page and dialog elements provided by an implementation such as `@a11d/lit-application-native`. * * @example * ```ts * import { component, html } from '@a11d/lit' * import { application, Application, DialogComponent, PageComponent, route } from '@a11d/lit-application' * import '@a11d/lit-application-native' * * @component('app-dialog-greeting') * export class DialogGreeting extends DialogComponent<{ readonly name: string }> { * protected override get template() { * return html`Hello, ${this.parameters.name}!` * } * * protected override primaryAction() { } * } * * @component('app-page-home') * @route('/') * export class PageHome extends PageComponent { * protected override get template() { * return html` * * * * ` * } * } * * @application() * @component('app-application') * export class App extends Application { } * ``` */ export declare abstract class Application extends NonInertableComponent { /** Hooks awaited before the application connects, such as to load configuration. */ static readonly connectingHooks: HookSet; /** Hooks awaited after the application first renders and before its router renders the first page. */ static readonly beforeRouteHooks: HookSet; /** The most recently connected top layer, or `document.body` without one, where dialogs and notifications are appended. */ static get topLayer(): HTMLElement; /** The application element in the document, if any. */ static readonly instance?: Application; static get styles(): import("@a11d/lit").CSSResult; /** The heading of the current page, kept in the document title. */ pageHeading?: string; /** The router rendering the page whose route matches the URL, or `PageError` with `NotFound` when none does. */ readonly router: RouterController; protected readonly rootCssInjector: RootCssInjectorController; private shallRenderRouter; protected createRenderRoot(): this; connectedCallback(): Promise; protected initialized(): Promise; /** The document title, joining the page heading and the manifest's `short_name`. */ protected get documentTitle(): string; protected get template(): import("lit-html").HTMLTemplateResult; /** The page host followed by the top layer; override it to render navigation or a footer around them. */ protected get bodyTemplate(): import("lit-html").HTMLTemplateResult; protected get pageHostTemplate(): import("lit-html").HTMLTemplateResult; /** Rendered in place of the page until the `beforeRouteHooks` have run; nothing by default. */ protected get pageLoadingTemplate(): import("lit-html").HTMLTemplateResult; protected get topLayerTemplate(): import("lit-html").HTMLTemplateResult; } //# sourceMappingURL=Application.d.ts.map