@@ -67,11 +67,11 @@ declare global {
6767
6868let wrappedEmit ! : ( e : eventWithTime , isCheckout ?: boolean ) => void ;
6969
70- let takeFullSnapshot ! : ( isCheckout ?: boolean ) => void ;
70+ let _takeFullSnapshot ! : ( isCheckout ?: boolean ) => void ;
7171let canvasManager : CanvasManagerInterface ;
7272let recording = false ;
7373
74- const mirror = createMirror ( ) ;
74+ export const mirror = createMirror ( ) ;
7575function record < T = eventWithTime > (
7676 options : recordOptions < T > = { } ,
7777) : listenerHandler | undefined {
@@ -256,7 +256,7 @@ function record<T = eventWithTime>(
256256 checkoutEveryNms &&
257257 e . timestamp - lastFullSnapshotEvent . timestamp > checkoutEveryNms ;
258258 if ( exceedCount || exceedTime ) {
259- takeFullSnapshot ( true ) ;
259+ _takeFullSnapshot ( true ) ;
260260 }
261261 }
262262 } ;
@@ -386,7 +386,7 @@ function record<T = eventWithTime>(
386386 mirror,
387387 } ) ;
388388
389- takeFullSnapshot = ( isCheckout = false ) => {
389+ _takeFullSnapshot = ( isCheckout = false ) => {
390390 wrappedEmit (
391391 wrapEvent ( {
392392 type : EventType . Meta ,
@@ -644,7 +644,7 @@ function record<T = eventWithTime>(
644644 } ) ;
645645
646646 const init = ( ) => {
647- takeFullSnapshot ( ) ;
647+ _takeFullSnapshot ( ) ;
648648 handlers . push ( observe ( document ) ) ;
649649 recording = true ;
650650 } ;
@@ -712,12 +712,14 @@ record.freezePage = () => {
712712 mutationBuffers . forEach ( ( buf ) => buf . freeze ( ) ) ;
713713} ;
714714
715- record . takeFullSnapshot = ( isCheckout ?: boolean ) => {
715+ export function takeFullSnapshot ( isCheckout ?: boolean ) {
716716 if ( ! recording ) {
717717 throw new Error ( 'please take full snapshot after start recording' ) ;
718718 }
719- takeFullSnapshot ( isCheckout ) ;
720- } ;
719+ _takeFullSnapshot ( isCheckout ) ;
720+ }
721+
722+ record . takeFullSnapshot = takeFullSnapshot ;
721723
722724record . mirror = mirror ;
723725
0 commit comments