Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

521 B
Raw Blame
import type { CaptureSnapshot, CaptureStateValue, PauseReason } from './machine';

export interface CaptureStateUpdate {
  state: CaptureStateValue;
  stepCount: number;
  currentGuideId: string | null;
  pauseReason: PauseReason | null;
}

export function captureStateUpdate(snapshot: CaptureSnapshot): CaptureStateUpdate {
  return {
    state: snapshot.value,
    stepCount: snapshot.context.stepCount,
    currentGuideId: snapshot.context.currentGuideId,
    pauseReason: snapshot.context.pauseReason ?? null,
  };
}