import { OnChanges, OnDestroy, AfterViewInit, SimpleChanges } from '@angular/core'; import { type AparteUiHandle } from '@aparte/core'; import * as i0 from "@angular/core"; /** * The imperative surface of the `AparteUi` proxy — one declaration in `@aparte/core`, * re-exported by all four wrappers. It used to be four hand-written copies, each * promising "the same contract on all four", and it had already drifted. */ export type { AparteUiHandle } from '@aparte/core'; /** * The proxy's inputs, named for parity with React/Vue/Svelte, which all export an * `AparteUiProps`. Angular's are `@Input`s on the component rather than an object, so * this is the shape a caller building `[props]` programmatically writes against. */ export interface AparteUiProps { /** The custom element tag name (e.g. 'aparte-model-selector'). */ name: string; /** Props to apply. Keys starting with `--` become CSS variables. */ props?: Record; /** * Which custom events to forward through `elementEvent`. Defaults to the * interactive aparté surface ({@link APARTE_DEFAULT_UI_EVENTS}). */ events?: string[]; } /** * AparteUiComponent - Universal UI Proxy * * A pass-through proxy component that dynamically injects any aparté * Web Component, so you don't need a dedicated Angular wrapper per element. * * `name` can be any custom element, including one of yours. `aparte-model-selector` * below is defined by `@aparte/plugin-model-selector`, not by core — until that * package is imported the tag mounts empty and inert with no error, and upgrades on * its own once the definition arrives, which is what makes `provideAparte`'s lazy * `plugins` loaders work. * * A PLUGIN's event is not in the default forward list — that default is core's, and a * third-party plugin's author cannot add to it, so listing ours would privilege our * packages over theirs. Name it in `events` and it arrives; leave it out and the handler * silently never fires, which is what this example used to do. * * @example * ```html * * ``` * * @description * - Keys starting with `--` are applied as CSS Variables * - Other keys are set as DOM properties on the element * - The events in `events` (default: {@link APARTE_DEFAULT_UI_EVENTS}) bubble up via `elementEvent` */ export declare class AparteUiComponent implements AfterViewInit, OnChanges, OnDestroy, AparteUiHandle { private readonly renderer; private readonly hostEl; /** The custom element tag name (e.g., 'aparte-model-selector') */ name: string; /** Properties to pass to the element. Keys starting with '--' are CSS vars */ props: Record; /** * Which custom events to forward through `elementEvent`. Defaults to the * interactive aparté surface ({@link APARTE_DEFAULT_UI_EVENTS}); pass your own list to * listen to other events (e.g. `['aparte-composer-change']` for attachments). */ events?: string[]; /** Emits a forwarded custom event from the underlying Web Component */ readonly elementEvent: import("@angular/core").OutputEmitterRef>; /** The dynamically created Web Component element */ private element; /** Cleanup functions for event listeners */ private eventCleanups; /** Joined key of the bound event set, so a fresh inline `[events]` array * doesn't thrash the element — only a real change rebinds. */ private lastEventsKey; ngAfterViewInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; private eventsKey; private createElement; private destroyElement; /** * aparté elements are **attribute-driven** (`observedAttributes`): assigning a * property is either a silent no-op (nothing observes it) or throws outright on * a getter-only accessor — ``'s `placeholder`/`disabled` are * exactly that. So primitives go through `setAttribute`; only values an * attribute cannot carry (objects, functions) are handed over as properties. */ private applyProps; private setupEventListeners; /** Get the underlying Web Component element */ getElement(): T | null; /** Call a method on the underlying element */ callMethod(methodName: string, ...args: unknown[]): T | undefined; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }