/** * @module component-one-file.mts contains all the types, helpers, constants and * classes for the **shell** ui component system. the differentiating factor * between this system and other front end ui frameworks is that this is * ibgib-driven, with especially ibgib addresses driving components' backing * model/data. * * this is not to be confused with "components" that may be dynamically * generated within a blank-canvas environment that the canvas agents will * build. this is for the old-school html shell. * * the ui component system is being built piecemeal as we go. * * ## approach * * there are two basic pieces to a component: the component metadata declaration * and the concrete component instance that that declaration instantiates. these * will be tightly coupled per use-case, with the intention that the meta object * will not need to be a descendant class, whereas the component instance will * most likely be the class that is extended from an abstract base class. * * @see {@link IbGibDynamicComponentMeta} * @see {@link IbGibDynamicComponentInstance} */ import { IbGibAddr } from "@ibgib/ts-gib/dist/types.mjs"; import { IbGibDynamicComponentInstance, IbGibDynamicComponentMeta } from "./component-types.mjs"; /** * Service for managing dynamic ibgib-aware components via web components. */ export declare class IbGibComponentService { protected lc: string; /** * @internal references to component meta's registered with the service. */ private _registeredComponentsMeta; initialized: Promise; constructor(); private initialize; /** * Registers a dynamic ibgib-aware component META object with the service. * @param {IbGibDynamicComponentMeta} componentMeta - The component meta object to register. */ registerComponentMeta(componentMeta: IbGibDynamicComponentMeta): void; /** * Unregisters a dynamic ibgib-aware component META object from the service. * @param {IbGibDynamicComponentMeta} componentMeta - The component meta object to unregister. */ unregisterComponentMeta(componentMeta: IbGibDynamicComponentMeta): void; getComponentInstance({ useRegExpPrefilter, path, ibGibAddr, }: { useRegExpPrefilter: boolean; path: string; ibGibAddr: IbGibAddr; }): Promise; /** * Injects a dynamic ibgib-aware component into a parent HTML element based on the route path. * * @param {object} arg - Arguments object. * @param {HTMLElement} arg.parentEl - The parent HTML element where the component should be injected. * @param {string} arg.path - The route path to determine which component to load. * @param {IbGibAddr} [arg.ibGibAddr] - Optional ibGib address parsed from the route path. * @returns {Promise} - Promise that resolves when the component is injected and created. */ inject({ parentEl, componentToInject, }: { parentEl: HTMLElement; componentToInject: IbGibDynamicComponentInstance; }): Promise; getRegisteredComponentsMeta(): readonly IbGibDynamicComponentMeta[]; } export declare function getComponentSvc(): Promise; //# sourceMappingURL=ibgib-component-service.d.mts.map