import type { ObservedProperty, Effect } from 'dry-suite'; import type { Observable, BehaviorSubject } from 'rxjs'; import type { DSCustomElement } from 'dry-suite'; import type { TectonMessageBus } from './message-bus'; /** * Configuration options for creating a platform outlet custom element. * * @see makeTectonElement - Factory function that accepts these options */ export interface PlatformOutletOptions { messageBus: TectonMessageBus; moduleId: string; props: ObservedProperty[]; tectonOutletAdaptor: tectonOutletAdaptor; resize?: () => void; } /** * Cleanup function returned by outlet setup operations. * Call this function to properly dispose of resources and subscriptions. */ export type Teardown = () => void; /** * Response object returned by a tecton outlet adaptor containing reactive streams * for managing the outlet's DOM, lifecycle, and side effects. * * @see tectonOutletAdaptor - Function type that returns this response */ export interface TectonOutletAdaptorResponse { DOM$: BehaviorSubject; teardown$: BehaviorSubject; settled$: BehaviorSubject; effect$: Observable; } /** * Adaptor function type that connects an outlet to the message bus and manages its lifecycle. * * @param messageBus - Message bus for platform/feature communication * @param outletPath - Full path identifier for the outlet (e.g., "moduleId.outletName") * @param customElement - The custom element instance being adapted * @param props$ - Observable stream of the element's current properties * @param resize - Optional callback to invoke when the outlet resizes * @returns Response object containing reactive streams for DOM, teardown, settled state, and effects * * @see tectonFeatureOutlet - SDK implementation * @see platformOutlet - Platform implementation */ export type tectonOutletAdaptor = (messageBus: TectonMessageBus, outletPath: string, customElement: DSCustomElement, props$: BehaviorSubject>, resize?: () => void) => TectonOutletAdaptorResponse; /** * Result object returned when creating an iframe wrapper for an outlet. * * @see setupOutletIFrameWrapper - Function that returns this result */ export interface FrameWrapperResult { element: HTMLDivElement; cleanup: () => void; } /** * Base custom element interface for outlet components. * Extends DSCustomElement with an optional name property for outlet identification. */ export interface OutletElement extends DSCustomElement { name?: string; } /** * Platform outlet element type alias for backwards compatibility. */ export type PlatformOutletElement = OutletElement; /** * Feature outlet element type alias for backwards compatibility. */ export type FeatureOutletElement = OutletElement; //# sourceMappingURL=outlet.d.ts.map