@v-tilt/browser 1.10.2 → 1.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1441,6 +1441,78 @@ declare class ChatWrapper implements Feature {
1441
1441
  private _onScriptLoaded;
1442
1442
  }
1443
1443
 
1444
+ /**
1445
+ * VTD Overlay Feature
1446
+ *
1447
+ * Displays destination content in a fullscreen iframe overlay when vtd= URL parameter is present.
1448
+ * Used for tracking links that redirect to specific content (video, page, etc.).
1449
+ *
1450
+ * Example: https://example.com/?vt=person_id&vtd=https://youtube.com/watch?v=abc123
1451
+ *
1452
+ * @see docs/architecture/proposals/vt-vtd-tracking-links.md
1453
+ */
1454
+
1455
+ interface VtdOverlayConfig {
1456
+ /** Whether the overlay feature is enabled */
1457
+ enabled?: boolean;
1458
+ }
1459
+ declare class VtdOverlay implements Feature {
1460
+ readonly name = "VtdOverlay";
1461
+ private _instance;
1462
+ private _config;
1463
+ private _isStarted;
1464
+ private _destinationUrl;
1465
+ private _originalUrl;
1466
+ private _isLoading;
1467
+ private _container;
1468
+ private _iframe;
1469
+ private _loadingEl;
1470
+ constructor(instance: VTilt, config?: VtdOverlayConfig);
1471
+ static extractConfig(config: VTiltConfig): VtdOverlayConfig;
1472
+ get isEnabled(): boolean;
1473
+ get isStarted(): boolean;
1474
+ startIfEnabled(): void;
1475
+ stop(): void;
1476
+ onConfigUpdate(config: VTiltConfig): void;
1477
+ /**
1478
+ * Set the destination URL and show the overlay.
1479
+ * Called by vtilt.ts when vtd= parameter is detected.
1480
+ *
1481
+ * @param url - The destination URL (can be URL-encoded)
1482
+ */
1483
+ setDestinationUrl(url: string): void;
1484
+ /**
1485
+ * Get the current destination URL.
1486
+ */
1487
+ getDestinationUrl(): string | null;
1488
+ /**
1489
+ * Close the overlay with animation.
1490
+ */
1491
+ close(): void;
1492
+ private _isValidUrl;
1493
+ /**
1494
+ * Transform URLs to embeddable format for known platforms.
1495
+ * Many sites block iframe embedding but provide dedicated embed URLs.
1496
+ */
1497
+ private _toEmbedUrl;
1498
+ private _getHostname;
1499
+ private _getFaviconUrl;
1500
+ private _showOverlay;
1501
+ private _destroyOverlay;
1502
+ private _attachEventListeners;
1503
+ private _getBackdropStyles;
1504
+ private _getModalStyles;
1505
+ private _getHeaderStyles;
1506
+ private _getHeaderHTML;
1507
+ private _getIframeWrapperStyles;
1508
+ private _getLoadingStyles;
1509
+ private _getLoadingHTML;
1510
+ private _getIframeStyles;
1511
+ private _getGlobalStyles;
1512
+ private _truncateUrl;
1513
+ private _escapeHtml;
1514
+ }
1515
+
1444
1516
  /**
1445
1517
  * Request Queue - Event Batching (PostHog-style)
1446
1518
  *
@@ -1609,6 +1681,7 @@ declare class VTilt {
1609
1681
  sessionRecording?: SessionRecordingWrapper;
1610
1682
  chat?: ChatWrapper;
1611
1683
  webVitals?: WebVitalsManager;
1684
+ vtdOverlay?: VtdOverlay;
1612
1685
  private configManager;
1613
1686
  sessionManager: SessionManager;
1614
1687
  userManager: UserManager;
@@ -1665,6 +1738,7 @@ declare class VTilt {
1665
1738
  private _setup_unload_handler;
1666
1739
  private _start_queue_if_opted_in;
1667
1740
  private _read_vt_param_from_url;
1741
+ private _initVtdOverlay;
1668
1742
  _execute_array(array: any[]): void;
1669
1743
  _dom_loaded(): void;
1670
1744
  }