export const MAKELORE_PLAYBACK_PROGRESS_EVENT = 'makelore:playback-progress'; export type MakelorePlaybackProgress = { sceneId: string; sceneOrder: number; actionIndex: number | null; completed: boolean; }; /** Publish playback detail only inside the verified offline player surface. */ export function emitMakelorePlaybackProgress(detail: MakelorePlaybackProgress): void { if (typeof window === 'undefined' || !window.__MAKELORE_OFFLINE_PLAYER__) return; window.dispatchEvent(new CustomEvent( MAKELORE_PLAYBACK_PROGRESS_EVENT, { detail }, )); }