{
  "version": 3,
  "sources": ["../../../../../src/lib/ui/hooks/clipboard/putPastedContent.ts"],
  "sourcesContent": ["import { Editor, TLExternalContent, VecLike } from '@tldraw/editor'\n\n/** @internal */\nexport interface PutPastedExternalContentMeta {\n\tsource: 'native-event' | 'clipboard-read'\n\tpoint?: VecLike\n}\n\n/** @internal */\nexport async function putPastedExternalContent(\n\teditor: Editor,\n\tcontent: TLExternalContent<unknown>,\n\tmeta: PutPastedExternalContentMeta\n) {\n\tconst point =\n\t\tmeta.point ??\n\t\t('point' in content ? (content as { point?: VecLike | undefined }).point : undefined)\n\n\tif (editor.options.onBeforePasteFromClipboard) {\n\t\tconst result = await editor.options.onBeforePasteFromClipboard({\n\t\t\teditor,\n\t\t\tcontent,\n\t\t\tsource: meta.source,\n\t\t\tpoint,\n\t\t})\n\t\tif (result === false) return\n\t\tif (result != null) content = result\n\t}\n\treturn editor.putExternalContent(content)\n}\n"],
  "mappings": "AASA,eAAsB,yBACrB,QACA,SACA,MACC;AACD,QAAM,QACL,KAAK,UACJ,WAAW,UAAW,QAA4C,QAAQ;AAE5E,MAAI,OAAO,QAAQ,4BAA4B;AAC9C,UAAM,SAAS,MAAM,OAAO,QAAQ,2BAA2B;AAAA,MAC9D;AAAA,MACA;AAAA,MACA,QAAQ,KAAK;AAAA,MACb;AAAA,IACD,CAAC;AACD,QAAI,WAAW,MAAO;AACtB,QAAI,UAAU,KAAM,WAAU;AAAA,EAC/B;AACA,SAAO,OAAO,mBAAmB,OAAO;AACzC;",
  "names": []
}
