/** * VTD Overlay Feature * * Displays destination content in a fullscreen iframe overlay when vtd= URL parameter is present. * Used for tracking links that redirect to specific content (video, page, etc.). * * Example: https://example.com/?vt=person_id&vtd=https://youtube.com/watch?v=abc123 * * @see docs/architecture/proposals/vt-vtd-tracking-links.md */ import type { VTilt } from "../vtilt"; import type { VTiltConfig } from "../types"; import type { Feature } from "../feature"; export interface VtdOverlayConfig { /** Whether the overlay feature is enabled */ enabled?: boolean; } export declare class VtdOverlay implements Feature { readonly name = "VtdOverlay"; private _instance; private _config; private _isStarted; private _destinationUrl; private _originalUrl; private _isLoading; private _container; private _iframe; private _loadingEl; constructor(instance: VTilt, config?: VtdOverlayConfig); static extractConfig(config: VTiltConfig): VtdOverlayConfig; get isEnabled(): boolean; get isStarted(): boolean; startIfEnabled(): void; stop(): void; onConfigUpdate(config: VTiltConfig): void; /** * Set the destination URL and show the overlay. * Called by vtilt.ts when vtd= parameter is detected. * * @param url - The destination URL (can be URL-encoded) */ setDestinationUrl(url: string): void; /** * Get the current destination URL. */ getDestinationUrl(): string | null; /** * Close the overlay with animation. */ close(): void; private _isValidUrl; /** * Transform URLs to embeddable format for known platforms. * Many sites block iframe embedding but provide dedicated embed URLs. */ private _toEmbedUrl; private _getHostname; private _getFaviconUrl; private _showOverlay; private _destroyOverlay; private _attachEventListeners; private _getBackdropStyles; private _getModalStyles; private _getHeaderStyles; private _getHeaderHTML; private _getIframeWrapperStyles; private _getLoadingStyles; private _getLoadingHTML; private _getIframeStyles; private _getGlobalStyles; private _truncateUrl; private _escapeHtml; }