@excalidraw/excalidraw 0.18.0-6d75c4b34 → 0.18.0-6d870b1c8
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-CBGOW5JB.js → chunk-D5WIFFIO.js} +17 -8
- package/dist/dev/chunk-D5WIFFIO.js.map +7 -0
- package/dist/dev/data/{image-SURZSZNX.js → image-WMAXQLTI.js} +2 -2
- package/dist/dev/index.css +4 -0
- package/dist/dev/index.css.map +2 -2
- package/dist/dev/index.js +1257 -1206
- package/dist/dev/index.js.map +4 -4
- package/dist/prod/chunk-KK52DCS3.js +4 -0
- package/dist/prod/data/{image-HXEZYJPQ.js → image-U3WTNYT7.js} +1 -1
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +19 -19
- package/dist/types/common/src/constants.d.ts +1 -0
- package/dist/types/element/src/align.d.ts +2 -1
- package/dist/types/element/src/delta.d.ts +12 -2
- package/dist/types/element/src/distribute.d.ts +2 -1
- package/dist/types/element/src/groups.d.ts +1 -0
- package/dist/types/element/src/linearElementEditor.d.ts +2 -1
- 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 -13
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +3 -8
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +3 -6
- 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 -9
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +2 -3
- 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 +33 -3
- package/dist/types/excalidraw/actions/actionLink.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionMenu.d.ts +0 -3
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +0 -2
- package/dist/types/excalidraw/actions/actionProperties.d.ts +0 -15
- 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/actionToggleGridMode.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/Actions.d.ts +0 -4
- package/dist/types/excalidraw/components/Ellipsify.d.ts +4 -0
- package/dist/types/excalidraw/data/reconcile.d.ts +1 -0
- package/dist/types/excalidraw/data/restore.d.ts +6 -1
- package/dist/types/excalidraw/index.d.ts +2 -1
- package/dist/types/excalidraw/renderer/staticScene.d.ts +4 -1
- package/dist/types/excalidraw/types.d.ts +4 -4
- package/package.json +4 -4
- package/dist/dev/chunk-CBGOW5JB.js.map +0 -7
- package/dist/prod/chunk-IRHK23LL.js +0 -4
- /package/dist/dev/data/{image-SURZSZNX.js.map → image-WMAXQLTI.js.map} +0 -0
|
@@ -63,7 +63,6 @@ var getDefaultAppState = () => {
|
|
|
63
63
|
newElement: null,
|
|
64
64
|
editingTextElement: null,
|
|
65
65
|
editingGroupId: null,
|
|
66
|
-
editingLinearElement: null,
|
|
67
66
|
activeTool: {
|
|
68
67
|
type: "selection",
|
|
69
68
|
customType: null,
|
|
@@ -174,7 +173,6 @@ var APP_STATE_STORAGE_CONF = /* @__PURE__ */ ((config) => config)({
|
|
|
174
173
|
newElement: { browser: false, export: false, server: false },
|
|
175
174
|
editingTextElement: { browser: false, export: false, server: false },
|
|
176
175
|
editingGroupId: { browser: true, export: false, server: false },
|
|
177
|
-
editingLinearElement: { browser: false, export: false, server: false },
|
|
178
176
|
activeTool: { browser: true, export: false, server: false },
|
|
179
177
|
penMode: { browser: true, export: false, server: false },
|
|
180
178
|
penDetected: { browser: true, export: false, server: false },
|
|
@@ -4817,7 +4815,7 @@ var restoreElementWithProperties = (element, extra) => {
|
|
|
4817
4815
|
delete ret.boundElementIds;
|
|
4818
4816
|
return ret;
|
|
4819
4817
|
};
|
|
4820
|
-
var restoreElement = (element) => {
|
|
4818
|
+
var restoreElement = (element, opts) => {
|
|
4821
4819
|
element = { ...element };
|
|
4822
4820
|
switch (element.type) {
|
|
4823
4821
|
case "text":
|
|
@@ -4849,7 +4847,7 @@ var restoreElement = (element) => {
|
|
|
4849
4847
|
autoResize: element.autoResize ?? true,
|
|
4850
4848
|
lineHeight
|
|
4851
4849
|
});
|
|
4852
|
-
if (!text && !element.isDeleted) {
|
|
4850
|
+
if (opts?.deleteEmptyTextElements && !text && !element.isDeleted) {
|
|
4853
4851
|
element = { ...element, originalText: text, isDeleted: true };
|
|
4854
4852
|
element = bumpVersion(element);
|
|
4855
4853
|
}
|
|
@@ -4999,7 +4997,12 @@ var restoreElements = (elements, localElements, opts) => {
|
|
|
4999
4997
|
const restoredElements = syncInvalidIndices2(
|
|
5000
4998
|
(elements || []).reduce((elements2, element) => {
|
|
5001
4999
|
if (element.type !== "selection" && !isInvisiblySmallElement(element)) {
|
|
5002
|
-
let migratedElement = restoreElement(
|
|
5000
|
+
let migratedElement = restoreElement(
|
|
5001
|
+
element,
|
|
5002
|
+
{
|
|
5003
|
+
deleteEmptyTextElements: opts?.deleteEmptyTextElements
|
|
5004
|
+
}
|
|
5005
|
+
);
|
|
5003
5006
|
if (migratedElement) {
|
|
5004
5007
|
const localElement = localElementsMap?.get(element.id);
|
|
5005
5008
|
if (localElement && localElement.version > migratedElement.version) {
|
|
@@ -5217,7 +5220,7 @@ var parseFileContents = async (blob) => {
|
|
|
5217
5220
|
let contents;
|
|
5218
5221
|
if (blob.type === MIME_TYPES6.png) {
|
|
5219
5222
|
try {
|
|
5220
|
-
return await (await import("./data/image-
|
|
5223
|
+
return await (await import("./data/image-WMAXQLTI.js")).decodePngMetadata(blob);
|
|
5221
5224
|
} catch (error) {
|
|
5222
5225
|
if (error.message === "INVALID") {
|
|
5223
5226
|
throw new ImageSceneDataError(
|
|
@@ -5312,7 +5315,11 @@ var loadSceneOrLibraryFromBlob = async (blob, localAppState, localElements, file
|
|
|
5312
5315
|
},
|
|
5313
5316
|
localAppState,
|
|
5314
5317
|
localElements,
|
|
5315
|
-
{
|
|
5318
|
+
{
|
|
5319
|
+
repairBindings: true,
|
|
5320
|
+
refreshDimensions: false,
|
|
5321
|
+
deleteEmptyTextElements: true
|
|
5322
|
+
}
|
|
5316
5323
|
)
|
|
5317
5324
|
};
|
|
5318
5325
|
} else if (isValidLibrary(data)) {
|
|
@@ -5633,11 +5640,13 @@ export {
|
|
|
5633
5640
|
strokeEllipseWithRotation,
|
|
5634
5641
|
strokeRectWithRotation,
|
|
5635
5642
|
drawHighlightForDiamondWithRotation,
|
|
5643
|
+
frameClip,
|
|
5636
5644
|
renderStaticSceneThrottled,
|
|
5637
5645
|
renderStaticScene,
|
|
5638
5646
|
exportToCanvas,
|
|
5639
5647
|
exportToSvg,
|
|
5640
5648
|
getExportSize,
|
|
5649
|
+
restoreElement,
|
|
5641
5650
|
restoreElements,
|
|
5642
5651
|
restoreAppState,
|
|
5643
5652
|
restore,
|
|
@@ -5666,4 +5675,4 @@ export {
|
|
|
5666
5675
|
createFile,
|
|
5667
5676
|
normalizeFile
|
|
5668
5677
|
};
|
|
5669
|
-
//# sourceMappingURL=chunk-
|
|
5678
|
+
//# sourceMappingURL=chunk-D5WIFFIO.js.map
|