/** * External Scripts Loader * * Dynamically loads external scripts (like rrweb) from the configured host. * Based on PostHog's implementation. */ import type { VTilt } from "../vtilt"; import { VTiltExtensionKind } from "../utils/globals"; /** * Load a script dynamically */ declare const loadScript: (vtilt: VTilt, url: string, callback: (error?: string | Event, event?: Event) => void) => void; /** * Get the URL for an extension script * * Priority: * 1. script_host config (if set) - loads from {script_host}/{kind}.js (CDN path) * 2. api_host config - loads from {api_host}/dist/{kind}.js (self-hosted) * * Note: * - script_host: CDN URL without /dist/ (e.g., "https://cdn.vtilt.com") * - api_host: App URL, /dist/ is appended (e.g., "https://app.vtilt.com") */ declare const getExtensionUrl: (vtilt: VTilt, kind: VTiltExtensionKind) => string; export { loadScript, getExtensionUrl };