{
  "version": 3,
  "sources": ["../../../../../src/lib/ui/hooks/clipboard/pasteFiles.ts"],
  "sourcesContent": ["import { Editor, TLExternalContentSource, VecLike } from '@tldraw/editor'\nimport { putPastedExternalContent } from './putPastedContent'\n\n/**\n * When the clipboard has a file, create an image/video shape from the file and paste it into the scene.\n *\n * @param editor - The editor instance.\n * @param urls - The file urls.\n * @param point - The point at which to paste the file.\n * @internal\n */\nexport async function pasteFiles(\n\teditor: Editor,\n\tblobs: (File | Blob)[],\n\tpoint?: VecLike,\n\tsources?: TLExternalContentSource[],\n\tclipboardPasteSource: 'native-event' | 'clipboard-read' = 'native-event'\n) {\n\tconst files = blobs.map((blob) =>\n\t\tblob instanceof File ? blob : new File([blob], 'tldrawFile', { type: blob.type })\n\t)\n\n\teditor.markHistoryStoppingPoint('paste')\n\n\tawait putPastedExternalContent(\n\t\teditor,\n\t\t{\n\t\t\ttype: 'files',\n\t\t\tfiles,\n\t\t\tpoint,\n\t\t\tsources,\n\t\t},\n\t\t{ source: clipboardPasteSource, point }\n\t)\n}\n"],
  "mappings": "AACA,SAAS,gCAAgC;AAUzC,eAAsB,WACrB,QACA,OACA,OACA,SACA,uBAA0D,gBACzD;AACD,QAAM,QAAQ,MAAM;AAAA,IAAI,CAAC,SACxB,gBAAgB,OAAO,OAAO,IAAI,KAAK,CAAC,IAAI,GAAG,cAAc,EAAE,MAAM,KAAK,KAAK,CAAC;AAAA,EACjF;AAEA,SAAO,yBAAyB,OAAO;AAEvC,QAAM;AAAA,IACL;AAAA,IACA;AAAA,MACC,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACA,EAAE,QAAQ,sBAAsB,MAAM;AAAA,EACvC;AACD;",
  "names": []
}
