@@ -27,42 +27,42 @@ interface YBlockChange {
2727 * @param events - Array of Yjs events to process
2828 */
2929export function translateYEvents ( editor : YjsEditor , events : Array < YEvent > ) {
30- console . debug ( '=== Translating Yjs events to Slate operations ===' , {
30+ Log . debug ( '=== Translating Yjs events to Slate operations ===' , {
3131 eventCount : events . length ,
3232 eventTypes : events . map ( ( e ) => e . path . join ( '.' ) ) ,
3333 timestamp : new Date ( ) . toISOString ( ) ,
3434 } ) ;
3535
3636 events . forEach ( ( event , index ) => {
37- console . debug ( `Processing event ${ index + 1 } /${ events . length } :` , {
37+ Log . debug ( `Processing event ${ index + 1 } /${ events . length } :` , {
3838 path : event . path ,
3939 type : event . constructor . name ,
4040 } ) ;
4141
4242 // Handle block-level changes (document.blocks)
4343 if ( isEqual ( event . path , [ 'document' , 'blocks' ] ) ) {
44- console . debug ( '→ Applying block map changes' ) ;
44+ Log . debug ( '→ Applying block map changes' ) ;
4545 applyBlocksYEvent ( editor , event as BlockMapEvent ) ;
4646 }
4747
4848 // Handle individual block updates (document.blocks[blockId])
4949 if ( isEqual ( event . path , [ 'document' , 'blocks' , event . path [ 2 ] ] ) ) {
5050 const blockId = event . path [ 2 ] as string ;
5151
52- console . debug ( `→ Applying block update for blockId: ${ blockId } ` ) ;
52+ Log . debug ( `→ Applying block update for blockId: ${ blockId } ` ) ;
5353 applyUpdateBlockYEvent ( editor , blockId , event as YMapEvent < unknown > ) ;
5454 }
5555
5656 // Handle text content changes (document.meta.text_map[textId])
5757 if ( isEqual ( event . path , [ 'document' , 'meta' , 'text_map' , event . path [ 3 ] ] ) ) {
5858 const textId = event . path [ 3 ] as string ;
5959
60- console . debug ( `→ Applying text content changes for textId: ${ textId } ` ) ;
60+ Log . debug ( `→ Applying text content changes for textId: ${ textId } ` ) ;
6161 applyTextYEvent ( editor , textId , event as YTextEvent ) ;
6262 }
6363 } ) ;
6464
65- console . debug ( '=== Yjs events translation completed ===' ) ;
65+ Log . debug ( '=== Yjs events translation completed ===' ) ;
6666}
6767
6868/**
@@ -91,7 +91,7 @@ function applyUpdateBlockYEvent(editor: YjsEditor, blockId: string, event: YMapE
9191 const [ node , path ] = entry ;
9292 const oldData = node . data as Record < string , unknown > ;
9393
94- console . debug ( `✅ Updating block data for blockId: ${ blockId } ` , {
94+ Log . debug ( `✅ Updating block data for blockId: ${ blockId } ` , {
9595 path,
9696 oldDataKeys : Object . keys ( oldData ) ,
9797 newDataKeys : Object . keys ( newData ) ,
@@ -121,7 +121,7 @@ function applyBlocksYEvent(editor: YjsEditor, event: BlockMapEvent) {
121121 const { changes, keysChanged } = event ;
122122 const { keys } = changes ;
123123
124- console . debug ( '🔄 Processing block map changes:' , {
124+ Log . debug ( '🔄 Processing block map changes:' , {
125125 keysChangedCount : keysChanged ?. size ?? 0 ,
126126 keysChanged : Array . from ( keysChanged ?? [ ] ) ,
127127 changes : Array . from ( keys . entries ( ) ) . map ( ( [ key , value ] ) => ( {
0 commit comments