@nous-excalidraw/excalidraw 0.18.2 → 0.18.3
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/dist/dev/{chunk-VTFWC67S.js → chunk-4Q2BPT5H.js} +3 -3
- package/dist/dev/{chunk-UFTMCXXK.js → chunk-GDIPPJNS.js} +2 -2
- package/dist/dev/{chunk-UFTMCXXK.js.map → chunk-GDIPPJNS.js.map} +1 -1
- package/dist/dev/components/TTDDialog/{CodeMirrorEditor-TCVBULR7.js → CodeMirrorEditor-R36AGSC4.js} +2 -2
- package/dist/dev/data/{image-R33I73P5.js → image-X4CDE7NB.js} +3 -3
- package/dist/dev/index.css +2 -1
- package/dist/dev/index.css.map +2 -2
- package/dist/dev/index.js +17 -35
- 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-EB5FYFLH.js → chunk-CB2MQ4HV.js} +1 -1
- package/dist/prod/{chunk-73RUUKWR.js → chunk-J2BPLTM2.js} +2 -2
- package/dist/prod/components/TTDDialog/{CodeMirrorEditor-IKE5EWSB.js → CodeMirrorEditor-G35LGI2J.js} +1 -1
- package/dist/prod/data/image-D2WHTCDO.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +23 -23
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/package.json +1 -1
- package/dist/prod/data/image-5THRS7YK.js +0 -1
- /package/dist/dev/{chunk-VTFWC67S.js.map → chunk-4Q2BPT5H.js.map} +0 -0
- /package/dist/dev/components/TTDDialog/{CodeMirrorEditor-TCVBULR7.js.map → CodeMirrorEditor-R36AGSC4.js.map} +0 -0
- /package/dist/dev/data/{image-R33I73P5.js.map → image-X4CDE7NB.js.map} +0 -0
package/dist/dev/index.js
CHANGED
|
@@ -65,10 +65,10 @@ import {
|
|
|
65
65
|
serializeAsJSON,
|
|
66
66
|
serializeLibraryAsJSON,
|
|
67
67
|
strokeRectWithRotation_simple
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-4Q2BPT5H.js";
|
|
69
69
|
import {
|
|
70
70
|
define_import_meta_env_default
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-GDIPPJNS.js";
|
|
72
72
|
import {
|
|
73
73
|
en_default
|
|
74
74
|
} from "./chunk-4JOINNOK.js";
|
|
@@ -9630,7 +9630,7 @@ var exportCanvas = async (type, elements, appState, files, {
|
|
|
9630
9630
|
let blob = canvasToBlob(tempCanvas);
|
|
9631
9631
|
if (appState.exportEmbedScene) {
|
|
9632
9632
|
blob = blob.then(
|
|
9633
|
-
(blob2) => import("./data/image-
|
|
9633
|
+
(blob2) => import("./data/image-X4CDE7NB.js").then(
|
|
9634
9634
|
({ encodePngMetadata: encodePngMetadata2 }) => encodePngMetadata2({
|
|
9635
9635
|
blob: blob2,
|
|
9636
9636
|
metadata: serializeAsJSON(elements, appState, files, "local")
|
|
@@ -28481,7 +28481,7 @@ var TTDDialogInput = ({
|
|
|
28481
28481
|
setShowSpinner(true);
|
|
28482
28482
|
}
|
|
28483
28483
|
}, SPINNER_DELAY_MS);
|
|
28484
|
-
import("./components/TTDDialog/CodeMirrorEditor-
|
|
28484
|
+
import("./components/TTDDialog/CodeMirrorEditor-R36AGSC4.js").then((mod) => {
|
|
28485
28485
|
if (!cancelled) {
|
|
28486
28486
|
setEditorState({ type: "ready", component: mod.default });
|
|
28487
28487
|
}
|
|
@@ -39743,6 +39743,16 @@ var App = class _App extends React46.Component {
|
|
|
39743
39743
|
this.startImageCropping(selectedElements[0]);
|
|
39744
39744
|
return;
|
|
39745
39745
|
}
|
|
39746
|
+
if (selectedElements.length === 1 && isFrameLikeElement15(selectedElements[0])) {
|
|
39747
|
+
this.scrollToContent(selectedElements[0], {
|
|
39748
|
+
animate: true,
|
|
39749
|
+
duration: 500,
|
|
39750
|
+
viewportZoomFactor: 0.6,
|
|
39751
|
+
fitToViewport: true,
|
|
39752
|
+
canvasOffsets: this.getEditorUIOffsets()
|
|
39753
|
+
});
|
|
39754
|
+
return;
|
|
39755
|
+
}
|
|
39746
39756
|
resetCursor(this.interactiveCanvas);
|
|
39747
39757
|
const selectedGroupIds = getSelectedGroupIds4(this.state);
|
|
39748
39758
|
if (selectedGroupIds.length > 0) {
|
|
@@ -41981,41 +41991,13 @@ var App = class _App extends React46.Component {
|
|
|
41981
41991
|
const hasSupportedImage = files.some(
|
|
41982
41992
|
(file2) => isSupportedImageFile(file2)
|
|
41983
41993
|
);
|
|
41984
|
-
if (
|
|
41994
|
+
if (hasSupportedImage) {
|
|
41985
41995
|
return;
|
|
41986
41996
|
}
|
|
41987
|
-
|
|
41988
|
-
|
|
41989
|
-
const { file: file2, fileHandle } = fileItems[0];
|
|
41990
|
-
if (file2 && (file2.type === MIME_TYPES9.png || file2.type === MIME_TYPES9.svg)) {
|
|
41991
|
-
try {
|
|
41992
|
-
const scene = await loadFromBlob(
|
|
41993
|
-
file2,
|
|
41994
|
-
this.state,
|
|
41995
|
-
this.scene.getElementsIncludingDeleted(),
|
|
41996
|
-
fileHandle
|
|
41997
|
-
);
|
|
41998
|
-
this.syncActionResult({
|
|
41999
|
-
...scene,
|
|
42000
|
-
appState: {
|
|
42001
|
-
...scene.appState || this.state,
|
|
42002
|
-
isLoading: false
|
|
42003
|
-
},
|
|
42004
|
-
replaceFiles: true,
|
|
42005
|
-
captureUpdate: CaptureUpdateAction40.IMMEDIATELY
|
|
42006
|
-
});
|
|
42007
|
-
return;
|
|
42008
|
-
} catch (error) {
|
|
42009
|
-
if (error.name !== "EncodingError") {
|
|
42010
|
-
throw new Error(t("alerts.couldNotLoadInvalidFile"));
|
|
42011
|
-
}
|
|
42012
|
-
}
|
|
41997
|
+
if (!isSinglePngOrSvgSceneCandidate && !hasSupportedImage) {
|
|
41998
|
+
return;
|
|
42013
41999
|
}
|
|
42014
42000
|
}
|
|
42015
|
-
const imageFiles = fileItems.map((data) => data.file).filter((file2) => isSupportedImageFile(file2));
|
|
42016
|
-
if (imageFiles.length > 0 && this.isToolSupported("image")) {
|
|
42017
|
-
return this.insertImages(imageFiles, sceneX, sceneY);
|
|
42018
|
-
}
|
|
42019
42001
|
const excalidrawLibrary_ids = dataTransferList.getData(
|
|
42020
42002
|
MIME_TYPES9.excalidrawlibIds
|
|
42021
42003
|
);
|