@excalidraw/excalidraw 0.18.0-b1c6bfc → 0.18.0-b2b2815
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-FZXBOFJP.js → chunk-S4XMSDLZ.js} +24 -7
- package/dist/dev/chunk-S4XMSDLZ.js.map +7 -0
- package/dist/dev/data/{image-E6NJP7SZ.js → image-LMVPVXQ6.js} +2 -2
- package/dist/dev/index.css +7 -1
- package/dist/dev/index.css.map +2 -2
- package/dist/dev/index.js +455 -214
- package/dist/dev/index.js.map +4 -4
- package/dist/prod/chunk-I5ONMJC5.js +4 -0
- package/dist/prod/data/{image-J2CAS7OM.js → image-RS36QCH6.js} +1 -1
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +32 -32
- package/dist/types/element/src/Scene.d.ts +5 -3
- package/dist/types/element/src/duplicate.d.ts +1 -0
- package/dist/types/element/src/frame.d.ts +6 -5
- package/dist/types/element/src/typeChecks.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +0 -3
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +0 -2
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +0 -12
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +0 -2
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +0 -3
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +1 -2
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +0 -2
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionExport.d.ts +0 -2
- package/dist/types/excalidraw/actions/actionFrame.d.ts +0 -4
- package/dist/types/excalidraw/actions/actionGroup.d.ts +0 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionLink.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionMenu.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionProperties.d.ts +0 -2
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionStyles.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +0 -1
- package/dist/types/excalidraw/components/App.d.ts +9 -0
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -1
- package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
- package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
- package/dist/types/excalidraw/components/shapes.d.ts +7 -0
- package/dist/types/excalidraw/data/blob.d.ts +0 -2
- package/dist/types/excalidraw/data/json.d.ts +0 -1
- package/dist/types/excalidraw/scene/Renderer.d.ts +425 -19
- package/dist/types/excalidraw/types.d.ts +5 -2
- package/dist/types/fractional-indexing/src/index.d.ts +29 -0
- package/dist/types/math/src/constants.d.ts +0 -1
- package/package.json +4 -5
- package/dist/dev/chunk-FZXBOFJP.js.map +0 -7
- package/dist/prod/chunk-YKPWT25G.js +0 -4
- /package/dist/dev/data/{image-E6NJP7SZ.js.map → image-LMVPVXQ6.js.map} +0 -0
|
@@ -113,7 +113,6 @@ var getDefaultAppState = () => {
|
|
|
113
113
|
open: false,
|
|
114
114
|
panels: STATS_PANELS.generalStats | STATS_PANELS.elementProperties
|
|
115
115
|
},
|
|
116
|
-
startBoundElement: null,
|
|
117
116
|
suggestedBinding: null,
|
|
118
117
|
frameRendering: { enabled: true, clip: true, name: true, outline: true },
|
|
119
118
|
frameToHighlight: null,
|
|
@@ -229,7 +228,6 @@ var APP_STATE_STORAGE_CONF = /* @__PURE__ */ ((config) => config)({
|
|
|
229
228
|
selectionElement: { browser: false, export: false, server: false },
|
|
230
229
|
shouldCacheIgnoreZoom: { browser: true, export: false, server: false },
|
|
231
230
|
stats: { browser: true, export: false, server: false },
|
|
232
|
-
startBoundElement: { browser: false, export: false, server: false },
|
|
233
231
|
suggestedBinding: { browser: false, export: false, server: false },
|
|
234
232
|
frameRendering: { browser: false, export: false, server: false },
|
|
235
233
|
frameToHighlight: { browser: false, export: false, server: false },
|
|
@@ -4513,6 +4511,7 @@ import { syncInvalidIndices as syncInvalidIndices2 } from "@excalidraw/element";
|
|
|
4513
4511
|
import { refreshTextDimensions } from "@excalidraw/element";
|
|
4514
4512
|
import { getNormalizedDimensions } from "@excalidraw/element";
|
|
4515
4513
|
import { isInvisiblySmallElement } from "@excalidraw/element";
|
|
4514
|
+
var MAX_ARROW_PX = 75e3;
|
|
4516
4515
|
var AllowedExcalidrawActiveTools = {
|
|
4517
4516
|
selection: true,
|
|
4518
4517
|
lasso: true,
|
|
@@ -4770,8 +4769,8 @@ var restoreElement = (element, targetElementsMap, existingElementsMap, opts) =>
|
|
|
4770
4769
|
startArrowhead: startArrowhead2,
|
|
4771
4770
|
endArrowhead: endArrowhead2,
|
|
4772
4771
|
points: points2,
|
|
4773
|
-
x: x2,
|
|
4774
|
-
y: y2,
|
|
4772
|
+
x: x2 ?? 0,
|
|
4773
|
+
y: y2 ?? 0,
|
|
4775
4774
|
elbowed: element.elbowed,
|
|
4776
4775
|
...getSizeFromPoints(points2)
|
|
4777
4776
|
};
|
|
@@ -4782,12 +4781,30 @@ var restoreElement = (element, targetElementsMap, existingElementsMap, opts) =>
|
|
|
4782
4781
|
startIsSpecial: element.startIsSpecial,
|
|
4783
4782
|
endIsSpecial: element.endIsSpecial
|
|
4784
4783
|
}) : restoreElementWithProperties(element, base);
|
|
4785
|
-
|
|
4784
|
+
const normalizedRestoredElement = {
|
|
4786
4785
|
...restoredElement,
|
|
4787
4786
|
...LinearElementEditor2.getNormalizeElementPointsAndCoords(
|
|
4788
4787
|
restoredElement
|
|
4789
4788
|
)
|
|
4790
4789
|
};
|
|
4790
|
+
if (normalizedRestoredElement.width > MAX_ARROW_PX || normalizedRestoredElement.height > MAX_ARROW_PX) {
|
|
4791
|
+
console.error(
|
|
4792
|
+
`Removing extremely large arrow ${normalizedRestoredElement.id} (type: ${isElbowArrow(normalizedRestoredElement) ? "elbow" : "simple"}, width: ${normalizedRestoredElement.width}, height: ${normalizedRestoredElement.height}, x: ${normalizedRestoredElement.x}, y: ${normalizedRestoredElement.y})`
|
|
4793
|
+
);
|
|
4794
|
+
return {
|
|
4795
|
+
...normalizedRestoredElement,
|
|
4796
|
+
x: 0,
|
|
4797
|
+
y: 0,
|
|
4798
|
+
width: 100,
|
|
4799
|
+
height: 100,
|
|
4800
|
+
points: [
|
|
4801
|
+
pointFrom2(0, 0),
|
|
4802
|
+
pointFrom2(100, 100)
|
|
4803
|
+
],
|
|
4804
|
+
isDeleted: true
|
|
4805
|
+
};
|
|
4806
|
+
}
|
|
4807
|
+
return normalizedRestoredElement;
|
|
4791
4808
|
}
|
|
4792
4809
|
case "ellipse":
|
|
4793
4810
|
case "rectangle":
|
|
@@ -5089,7 +5106,7 @@ var parseFileContents = async (blob) => {
|
|
|
5089
5106
|
let contents;
|
|
5090
5107
|
if (blob.type === MIME_TYPES6.png) {
|
|
5091
5108
|
try {
|
|
5092
|
-
return await (await import("./data/image-
|
|
5109
|
+
return await (await import("./data/image-LMVPVXQ6.js")).decodePngMetadata(blob);
|
|
5093
5110
|
} catch (error) {
|
|
5094
5111
|
if (error.message === "INVALID") {
|
|
5095
5112
|
throw new ImageSceneDataError(
|
|
@@ -5523,4 +5540,4 @@ export {
|
|
|
5523
5540
|
createFile,
|
|
5524
5541
|
normalizeFile
|
|
5525
5542
|
};
|
|
5526
|
-
//# sourceMappingURL=chunk-
|
|
5543
|
+
//# sourceMappingURL=chunk-S4XMSDLZ.js.map
|