@inkandswitch/patchwork-pkg-base 0.0.84 → 0.0.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3211,12 +3211,11 @@ function TldrawInner(props) {
3211
3211
  const bytes = new Uint8Array(await file.arrayBuffer());
3212
3212
  const ext = extensionForMimeType(file.type);
3213
3213
  const name = file.name && file.name !== "image.png" ? file.name : `Pasted image on ${(/* @__PURE__ */ new Date()).toLocaleDateString()}.${ext}`;
3214
- const fileHandle = repo.create();
3215
- fileHandle.change((doc) => {
3216
- doc.content = bytes;
3217
- doc.extension = ext;
3218
- doc.mimeType = file.type;
3219
- doc.name = name;
3214
+ const fileHandle = await repo.create2({
3215
+ content: bytes,
3216
+ extension: ext,
3217
+ mimeType: file.type,
3218
+ name
3220
3219
  });
3221
3220
  const asset = await getAssetInfo(editor, file, id);
3222
3221
  if (!asset) throw new Error(`unsupported asset type: ${file.type}`);