{"version":3,"file":"clipboard-handler.cjs","sources":["../../../app/extensions/clipboard-handler.ts"],"sourcesContent":["import { EditorView } from \"@codemirror/view\"\n\n/**\n * Extension to handle clipboard events and prevent them from bubbling to window.\n * This prevents window-level event listeners from capturing copy/cut/paste events\n * that should be handled only by the editor.\n */\nexport const clipboardHandler = EditorView.domEventHandlers({\n  copy(event: ClipboardEvent) {\n    // Stop event from bubbling to window\n    event.stopPropagation()\n    // Let CodeMirror handle the copy operation normally\n    return false\n  },\n  \n  cut(event: ClipboardEvent) {\n    // Stop event from bubbling to window\n    event.stopPropagation()\n    // Let CodeMirror handle the cut operation normally\n    return false\n  },\n  \n  paste(event: ClipboardEvent) {\n    // Stop event from bubbling to window\n    event.stopPropagation()\n    // Let CodeMirror handle the paste operation normally\n    return false\n  },\n})\n\n"],"names":["EditorView"],"mappings":";;;AAOO,MAAM,mBAAmBA,MAAAA,WAAW,iBAAiB;AAAA,EAC1D,KAAK,OAAuB;AAE1B,UAAM,gBAAA;AAEN,WAAO;AAAA,EACT;AAAA,EAEA,IAAI,OAAuB;AAEzB,UAAM,gBAAA;AAEN,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,OAAuB;AAE3B,UAAM,gBAAA;AAEN,WAAO;AAAA,EACT;AACF,CAAC;;"}