@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.
@@ -1 +1 @@
1
- automerge:X1t4YsLJTr9aK6HwEW5rbRNs7se
1
+ automerge:4Ei7rBH7cvsYb6rzApLynkvPfyyo
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkandswitch/patchwork-pkg-base",
3
- "version": "0.0.84",
3
+ "version": "0.0.85",
4
4
  "type": "module",
5
5
  "description": "Base packages for the Patchwork system",
6
6
  "repository": {
@@ -2573,12 +2573,11 @@ function TldrawInner(props) {
2573
2573
  const bytes = new Uint8Array(await file.arrayBuffer());
2574
2574
  const ext = extensionForMimeType(file.type);
2575
2575
  const name = file.name && file.name !== "image.png" ? file.name : `Pasted image on ${(/* @__PURE__ */ new Date()).toLocaleDateString()}.${ext}`;
2576
- const fileHandle = repo.create();
2577
- fileHandle.change((doc) => {
2578
- doc.content = bytes;
2579
- doc.extension = ext;
2580
- doc.mimeType = file.type;
2581
- doc.name = name;
2576
+ const fileHandle = await repo.create2({
2577
+ content: bytes,
2578
+ extension: ext,
2579
+ mimeType: file.type,
2580
+ name
2582
2581
  });
2583
2582
  const asset = await getMediaAssetInfoPartial(file, id, isImage, isVideo);
2584
2583
  asset.props.src = automergeUrlToServiceWorkerUrl2(fileHandle.url);