@myoc/excalidraw 0.19.531 → 0.19.532

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.
@@ -2,7 +2,7 @@ import {
2
2
  decodePngMetadata,
3
3
  encodePngMetadata,
4
4
  getTEXtChunk
5
- } from "../chunk-6NFVXSAY.js";
5
+ } from "../chunk-ITMOGRAW.js";
6
6
  import "../chunk-ASAPRLCW.js";
7
7
  import "../chunk-XDFCUUT6.js";
8
8
  export {
@@ -10,4 +10,4 @@ export {
10
10
  encodePngMetadata,
11
11
  getTEXtChunk
12
12
  };
13
- //# sourceMappingURL=image-PZBZVE3P.js.map
13
+ //# sourceMappingURL=image-S7APFFV6.js.map
package/dist/dev/index.js CHANGED
@@ -63,7 +63,7 @@ import {
63
63
  serializeAsJSON,
64
64
  strokeRectWithRotation_simple,
65
65
  zoomToFitBounds
66
- } from "./chunk-6NFVXSAY.js";
66
+ } from "./chunk-ITMOGRAW.js";
67
67
  import {
68
68
  define_import_meta_env_default
69
69
  } from "./chunk-ASAPRLCW.js";
@@ -10937,7 +10937,7 @@ var exportCanvas = async (type, elements, appState, files, {
10937
10937
  let blob = canvasToBlob(tempCanvas);
10938
10938
  if (appState.exportEmbedScene) {
10939
10939
  blob = blob.then(
10940
- (blob2) => import("./data/image-PZBZVE3P.js").then(
10940
+ (blob2) => import("./data/image-S7APFFV6.js").then(
10941
10941
  ({ encodePngMetadata: encodePngMetadata2 }) => encodePngMetadata2({
10942
10942
  blob: blob2,
10943
10943
  metadata: serializeAsJSON(elements, appState, files, "local")
@@ -37007,7 +37007,13 @@ var App = class _App extends React40.Component {
37007
37007
  }
37008
37008
  ));
37009
37009
  __publicField(this, "addImageElementsToScene", async (imageFiles, sceneX, sceneY) => {
37010
- const unsupportedImage = imageFiles.find(
37010
+ const normalizedImageFiles = await Promise.all(
37011
+ imageFiles.map(async ({ file: file2, customData }) => ({
37012
+ file: await normalizeFile(file2),
37013
+ customData: customData ?? {}
37014
+ }))
37015
+ );
37016
+ const unsupportedImage = normalizedImageFiles.find(
37011
37017
  ({ file: file2 }) => !isSupportedImageFile(file2)
37012
37018
  );
37013
37019
  if (unsupportedImage) {
@@ -37017,10 +37023,10 @@ var App = class _App extends React40.Component {
37017
37023
  );
37018
37024
  }
37019
37025
  await this.insertImages(
37020
- imageFiles.map(({ file: file2 }) => file2),
37026
+ normalizedImageFiles.map(({ file: file2 }) => file2),
37021
37027
  sceneX,
37022
37028
  sceneY,
37023
- imageFiles.map(({ customData }) => customData ?? {})
37029
+ normalizedImageFiles.map(({ customData }) => customData)
37024
37030
  );
37025
37031
  });
37026
37032
  __publicField(this, "addImagePlaceholder", async (fileId, file2) => {