@myoc/excalidraw 0.19.530 → 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.
- package/CHANGELOG.md +158 -0
- package/dist/dev/{chunk-XSA46KXZ.js → chunk-ASAPRLCW.js} +2 -2
- package/dist/dev/{chunk-ROEGCKS3.js → chunk-ITMOGRAW.js} +17 -4
- package/dist/dev/chunk-ITMOGRAW.js.map +7 -0
- package/dist/dev/data/{image-AYT4E6ZF.js → image-S7APFFV6.js} +3 -3
- package/dist/dev/index.js +23 -5
- package/dist/dev/index.js.map +2 -2
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/{chunk-MDZUVLV6.js → chunk-GSRXJLOQ.js} +1 -1
- package/dist/prod/chunk-U3WBDUKM.js +4 -0
- package/dist/prod/data/image-MWFLMJV7.js +1 -0
- package/dist/prod/index.js +13 -13
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/excalidraw/errors.d.ts +7 -0
- package/dist/types/excalidraw/index.d.ts +1 -0
- package/package.json +4 -4
- package/dist/dev/chunk-ROEGCKS3.js.map +0 -7
- package/dist/prod/chunk-6OYCXZJM.js +0 -4
- package/dist/prod/data/image-EAYKVQSH.js +0 -1
- /package/dist/dev/{chunk-XSA46KXZ.js.map → chunk-ASAPRLCW.js.map} +0 -0
- /package/dist/dev/data/{image-AYT4E6ZF.js.map → image-S7APFFV6.js.map} +0 -0
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
decodePngMetadata,
|
|
3
3
|
encodePngMetadata,
|
|
4
4
|
getTEXtChunk
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-ITMOGRAW.js";
|
|
6
|
+
import "../chunk-ASAPRLCW.js";
|
|
7
7
|
import "../chunk-XDFCUUT6.js";
|
|
8
8
|
export {
|
|
9
9
|
decodePngMetadata,
|
|
10
10
|
encodePngMetadata,
|
|
11
11
|
getTEXtChunk
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=image-
|
|
13
|
+
//# sourceMappingURL=image-S7APFFV6.js.map
|
package/dist/dev/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
ImageSceneDataError,
|
|
7
7
|
ImageURLToFile,
|
|
8
8
|
SVGStringToFile,
|
|
9
|
+
UnsupportedImageFileTypeError,
|
|
9
10
|
bootstrapCanvas,
|
|
10
11
|
canChangeRoundness,
|
|
11
12
|
canHaveArrowheads,
|
|
@@ -62,10 +63,10 @@ import {
|
|
|
62
63
|
serializeAsJSON,
|
|
63
64
|
strokeRectWithRotation_simple,
|
|
64
65
|
zoomToFitBounds
|
|
65
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-ITMOGRAW.js";
|
|
66
67
|
import {
|
|
67
68
|
define_import_meta_env_default
|
|
68
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-ASAPRLCW.js";
|
|
69
70
|
import {
|
|
70
71
|
en_default
|
|
71
72
|
} from "./chunk-SKCAT7JG.js";
|
|
@@ -10936,7 +10937,7 @@ var exportCanvas = async (type, elements, appState, files, {
|
|
|
10936
10937
|
let blob = canvasToBlob(tempCanvas);
|
|
10937
10938
|
if (appState.exportEmbedScene) {
|
|
10938
10939
|
blob = blob.then(
|
|
10939
|
-
(blob2) => import("./data/image-
|
|
10940
|
+
(blob2) => import("./data/image-S7APFFV6.js").then(
|
|
10940
10941
|
({ encodePngMetadata: encodePngMetadata2 }) => encodePngMetadata2({
|
|
10941
10942
|
blob: blob2,
|
|
10942
10943
|
metadata: serializeAsJSON(elements, appState, files, "local")
|
|
@@ -37006,10 +37007,26 @@ var App = class _App extends React40.Component {
|
|
|
37006
37007
|
}
|
|
37007
37008
|
));
|
|
37008
37009
|
__publicField(this, "addImageElementsToScene", async (imageFiles, sceneX, sceneY) => {
|
|
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(
|
|
37017
|
+
({ file: file2 }) => !isSupportedImageFile(file2)
|
|
37018
|
+
);
|
|
37019
|
+
if (unsupportedImage) {
|
|
37020
|
+
throw new UnsupportedImageFileTypeError(
|
|
37021
|
+
unsupportedImage.file,
|
|
37022
|
+
t("errors.unsupportedFileType")
|
|
37023
|
+
);
|
|
37024
|
+
}
|
|
37009
37025
|
await this.insertImages(
|
|
37010
|
-
|
|
37026
|
+
normalizedImageFiles.map(({ file: file2 }) => file2),
|
|
37011
37027
|
sceneX,
|
|
37012
|
-
sceneY
|
|
37028
|
+
sceneY,
|
|
37029
|
+
normalizedImageFiles.map(({ customData }) => customData)
|
|
37013
37030
|
);
|
|
37014
37031
|
});
|
|
37015
37032
|
__publicField(this, "addImagePlaceholder", async (fileId, file2) => {
|
|
@@ -45957,6 +45974,7 @@ export {
|
|
|
45957
45974
|
Sidebar,
|
|
45958
45975
|
Stats,
|
|
45959
45976
|
THEME26 as THEME,
|
|
45977
|
+
UnsupportedImageFileTypeError,
|
|
45960
45978
|
UserIdleState2 as UserIdleState,
|
|
45961
45979
|
WelcomeScreen_default as WelcomeScreen,
|
|
45962
45980
|
applyDarkModeFilter11 as applyDarkModeFilter,
|