@myoc/excalidraw 0.18.12 → 0.18.14
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-NRI6YOHF.js → chunk-4MUT22YZ.js} +2 -2
- package/dist/dev/{chunk-MF2N5437.js → chunk-BVQKKPYJ.js} +7 -3
- package/dist/dev/{chunk-MF2N5437.js.map → chunk-BVQKKPYJ.js.map} +2 -2
- package/dist/dev/data/{image-ZQGM5FUR.js → image-5CKNIDBA.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-4YIANO7O.js → chunk-5P7BZ5EW.js} +1 -1
- package/dist/prod/{chunk-4B5SYMA3.js → chunk-UXVBAUYA.js} +14 -14
- package/dist/prod/data/image-55FCGPA5.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/actions/actionAddToLibrary.d.ts +3 -0
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +2 -0
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +12 -0
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +6 -0
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +3 -0
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +2 -0
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionExport.d.ts +9 -0
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +2 -0
- package/dist/types/excalidraw/actions/actionFrame.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionGroup.d.ts +2 -0
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionLink.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionMenu.d.ts +3 -0
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +2 -0
- package/dist/types/excalidraw/actions/actionProperties.d.ts +15 -0
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionStyles.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +2 -0
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +1 -0
- package/dist/types/excalidraw/appState.d.ts +1 -0
- package/dist/types/excalidraw/types.d.ts +3 -0
- package/package.json +1 -1
- package/dist/prod/data/image-HCQSRANY.js +0 -1
- /package/dist/dev/{chunk-NRI6YOHF.js.map → chunk-4MUT22YZ.js.map} +0 -0
- /package/dist/dev/data/{image-ZQGM5FUR.js.map → image-5CKNIDBA.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-BVQKKPYJ.js";
|
|
6
|
+
import "../chunk-4MUT22YZ.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-5CKNIDBA.js.map
|
package/dist/dev/index.js
CHANGED
|
@@ -56,6 +56,7 @@ import {
|
|
|
56
56
|
DEFAULT_FONT_SIZE,
|
|
57
57
|
DEFAULT_GRID_SIZE,
|
|
58
58
|
DEFAULT_LASER_COLOR,
|
|
59
|
+
DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT,
|
|
59
60
|
DEFAULT_REDUCED_GLOBAL_ALPHA,
|
|
60
61
|
DEFAULT_SIDEBAR,
|
|
61
62
|
DEFAULT_TEXT_ALIGN,
|
|
@@ -617,10 +618,10 @@ import {
|
|
|
617
618
|
wrapEvent,
|
|
618
619
|
wrapText,
|
|
619
620
|
zoomAreaIcon
|
|
620
|
-
} from "./chunk-
|
|
621
|
+
} from "./chunk-BVQKKPYJ.js";
|
|
621
622
|
import {
|
|
622
623
|
define_import_meta_env_default
|
|
623
|
-
} from "./chunk-
|
|
624
|
+
} from "./chunk-4MUT22YZ.js";
|
|
624
625
|
import {
|
|
625
626
|
en_default
|
|
626
627
|
} from "./chunk-PEI7EPYO.js";
|
|
@@ -10906,7 +10907,7 @@ var exportCanvas = async (type, elements, appState, files, {
|
|
|
10906
10907
|
let blob = canvasToBlob(tempCanvas);
|
|
10907
10908
|
if (appState.exportEmbedScene) {
|
|
10908
10909
|
blob = blob.then(
|
|
10909
|
-
(blob2) => import("./data/image-
|
|
10910
|
+
(blob2) => import("./data/image-5CKNIDBA.js").then(
|
|
10910
10911
|
({ encodePngMetadata: encodePngMetadata2 }) => encodePngMetadata2({
|
|
10911
10912
|
blob: blob2,
|
|
10912
10913
|
metadata: serializeAsJSON(elements, appState, files, "local")
|
|
@@ -34113,6 +34114,19 @@ var App = class _App extends React42.Component {
|
|
|
34113
34114
|
}
|
|
34114
34115
|
const existingFileData = this.files[fileId];
|
|
34115
34116
|
if (!existingFileData?.dataURL) {
|
|
34117
|
+
const sizeLimitInKBs = this.state.dontResizeLimitMBs * 1024 * 1024;
|
|
34118
|
+
if (imageFile.size >= sizeLimitInKBs) {
|
|
34119
|
+
try {
|
|
34120
|
+
imageFile = await resizeImageFile(imageFile, {
|
|
34121
|
+
maxWidthOrHeight: DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT
|
|
34122
|
+
});
|
|
34123
|
+
} catch (error) {
|
|
34124
|
+
console.error(
|
|
34125
|
+
"Error trying to resizing image file on insertion",
|
|
34126
|
+
error
|
|
34127
|
+
);
|
|
34128
|
+
}
|
|
34129
|
+
}
|
|
34116
34130
|
if (imageFile.size > MAX_ALLOWED_FILE_BYTES) {
|
|
34117
34131
|
throw new Error(
|
|
34118
34132
|
t("errors.fileTooBig", {
|
|
@@ -35114,7 +35128,8 @@ var App = class _App extends React42.Component {
|
|
|
35114
35128
|
objectsSnapModeEnabled = false,
|
|
35115
35129
|
theme = defaultAppState.theme,
|
|
35116
35130
|
name = `${t("labels.untitled")}-${getDateTime()}`,
|
|
35117
|
-
wheelZoomsOnDefault = false
|
|
35131
|
+
wheelZoomsOnDefault = false,
|
|
35132
|
+
dontResizeLimitMBs
|
|
35118
35133
|
} = props;
|
|
35119
35134
|
this.state = {
|
|
35120
35135
|
...defaultAppState,
|
|
@@ -35128,7 +35143,8 @@ var App = class _App extends React42.Component {
|
|
|
35128
35143
|
name,
|
|
35129
35144
|
width: window.innerWidth,
|
|
35130
35145
|
height: window.innerHeight,
|
|
35131
|
-
wheelZoomsOnDefault
|
|
35146
|
+
wheelZoomsOnDefault,
|
|
35147
|
+
dontResizeLimitMBs
|
|
35132
35148
|
};
|
|
35133
35149
|
this.id = nanoid();
|
|
35134
35150
|
this.library = new library_default(this);
|
|
@@ -38739,6 +38755,7 @@ var ExcalidrawBase = (props) => {
|
|
|
38739
38755
|
renderEmbeddable,
|
|
38740
38756
|
showDeprecatedFonts,
|
|
38741
38757
|
wheelZoomsOnDefault,
|
|
38758
|
+
dontResizeLimitMBs,
|
|
38742
38759
|
strokeColorTopPicks,
|
|
38743
38760
|
backgroundColorTopPicks,
|
|
38744
38761
|
renderScrollbars
|
|
@@ -38812,6 +38829,7 @@ var ExcalidrawBase = (props) => {
|
|
|
38812
38829
|
aiEnabled: false,
|
|
38813
38830
|
showDeprecatedFonts,
|
|
38814
38831
|
wheelZoomsOnDefault,
|
|
38832
|
+
dontResizeLimitMBs,
|
|
38815
38833
|
strokeColorTopPicks,
|
|
38816
38834
|
backgroundColorTopPicks,
|
|
38817
38835
|
renderScrollbars,
|