@nous-excalidraw/excalidraw 0.18.9-beta.22 → 0.18.9-beta.24
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-5ERE5TTW.js → chunk-GS6CFMFL.js} +2 -2
- package/dist/dev/{chunk-DRBGEADH.js → chunk-GWBWDZAV.js} +3 -3
- package/dist/dev/components/TTDDialog/{CodeMirrorEditor-ZR77XBIT.js → CodeMirrorEditor-6L6DTYD2.js} +2 -2
- package/dist/dev/data/{image-QGE3DJEP.js → image-S7DRX2GL.js} +3 -3
- package/dist/dev/index.js +53 -29
- package/dist/dev/index.js.map +3 -3
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/{chunk-MW6O7B5J.js → chunk-DBLEU2IN.js} +1 -1
- package/dist/prod/{chunk-JWDEJ6N5.js → chunk-MDQTWR7U.js} +2 -2
- package/dist/prod/components/TTDDialog/{CodeMirrorEditor-PQAT7WNN.js → CodeMirrorEditor-RESQCCWR.js} +1 -1
- package/dist/prod/data/image-EJJZHE7P.js +1 -0
- package/dist/prod/index.js +26 -26
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/excalidraw/actions/actionFrame.d.ts +1 -471
- package/dist/types/excalidraw/index.d.ts +1 -0
- package/dist/types/excalidraw/types.d.ts +2 -0
- package/package.json +1 -1
- package/dist/prod/data/image-F5QONZ27.js +0 -1
- /package/dist/dev/{chunk-5ERE5TTW.js.map → chunk-GS6CFMFL.js.map} +0 -0
- /package/dist/dev/{chunk-DRBGEADH.js.map → chunk-GWBWDZAV.js.map} +0 -0
- /package/dist/dev/components/TTDDialog/{CodeMirrorEditor-ZR77XBIT.js.map → CodeMirrorEditor-6L6DTYD2.js.map} +0 -0
- /package/dist/dev/data/{image-QGE3DJEP.js.map → image-S7DRX2GL.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// <define:import.meta.env>
|
|
2
|
-
var define_import_meta_env_default = { MODE: "development", VITE_APP_BACKEND_V2_GET_URL: "https://json-dev.excalidraw.com/api/v2/", VITE_APP_BACKEND_V2_POST_URL: "https://json-dev.excalidraw.com/api/v2/post/", VITE_APP_LIBRARY_URL: "https://libraries.excalidraw.com", VITE_APP_LIBRARY_BACKEND: "https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries", VITE_APP_WS_SERVER_URL: "http://localhost:3002", VITE_APP_PLUS_LP: "https://plus.excalidraw.com", VITE_APP_PLUS_APP: "http://localhost:3000", VITE_APP_AI_BACKEND: "http://localhost:3016", VITE_APP_FIREBASE_CONFIG: '{"apiKey":"AIzaSyCMkxA60XIW8KbqMYL7edC4qT5l4qHX2h8","authDomain":"excalidraw-oss-dev.firebaseapp.com","projectId":"excalidraw-oss-dev","storageBucket":"excalidraw-oss-dev.appspot.com","messagingSenderId":"664559512677","appId":"1:664559512677:web:a385181f2928d328a7aa8c"}', VITE_APP_DEV_DISABLE_LIVE_RELOAD: "", VITE_APP_ENABLE_TRACKING: "true", FAST_REFRESH: "false", VITE_APP_PORT: "3001", VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX: "", VITE_APP_COLLAPSE_OVERLAY: "true", VITE_APP_ENABLE_ESLINT: "true", VITE_APP_ENABLE_PWA: "false", VITE_APP_PLUS_EXPORT_PUBLIC_KEY: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm2g5T+Rub6Kbf1Mf57t0\n7r2zeHuVg4dla3r5ryXMswtzz6x767octl6oLThn33mQsPSy3GKglFZoCTXJR4ij\nba8SxB04sL/N8eRrKja7TFWjCVtRwTTfyy771NYYNFVJclkxHyE5qw4m27crHF1y\nUNWEjuqNMi/lwAErS9fFa2oJlWyT8U7zzv/5kQREkxZI6y9v0AF3qcbsy2731FnD\ns9ChJvOUW9toIab2gsIdrKW8ZNpu084ZFVKb6LNjvIXI1Se4oMTHeszXzNptzlot\nkdxxjOoaQMAyfljFSot1F1FlU6MQlag7UnFGvFjRHN1JI5q4K+n3a67DX+TMyRqS\nHQIDAQAB", VITE_APP_DISABLE_PREVENT_UNLOAD: "", PKG_NAME: "@nous-excalidraw/excalidraw", PKG_VERSION: "0.18.9-beta.
|
|
2
|
+
var define_import_meta_env_default = { MODE: "development", VITE_APP_BACKEND_V2_GET_URL: "https://json-dev.excalidraw.com/api/v2/", VITE_APP_BACKEND_V2_POST_URL: "https://json-dev.excalidraw.com/api/v2/post/", VITE_APP_LIBRARY_URL: "https://libraries.excalidraw.com", VITE_APP_LIBRARY_BACKEND: "https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries", VITE_APP_WS_SERVER_URL: "http://localhost:3002", VITE_APP_PLUS_LP: "https://plus.excalidraw.com", VITE_APP_PLUS_APP: "http://localhost:3000", VITE_APP_AI_BACKEND: "http://localhost:3016", VITE_APP_FIREBASE_CONFIG: '{"apiKey":"AIzaSyCMkxA60XIW8KbqMYL7edC4qT5l4qHX2h8","authDomain":"excalidraw-oss-dev.firebaseapp.com","projectId":"excalidraw-oss-dev","storageBucket":"excalidraw-oss-dev.appspot.com","messagingSenderId":"664559512677","appId":"1:664559512677:web:a385181f2928d328a7aa8c"}', VITE_APP_DEV_DISABLE_LIVE_RELOAD: "", VITE_APP_ENABLE_TRACKING: "true", FAST_REFRESH: "false", VITE_APP_PORT: "3001", VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX: "", VITE_APP_COLLAPSE_OVERLAY: "true", VITE_APP_ENABLE_ESLINT: "true", VITE_APP_ENABLE_PWA: "false", VITE_APP_PLUS_EXPORT_PUBLIC_KEY: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm2g5T+Rub6Kbf1Mf57t0\n7r2zeHuVg4dla3r5ryXMswtzz6x767octl6oLThn33mQsPSy3GKglFZoCTXJR4ij\nba8SxB04sL/N8eRrKja7TFWjCVtRwTTfyy771NYYNFVJclkxHyE5qw4m27crHF1y\nUNWEjuqNMi/lwAErS9fFa2oJlWyT8U7zzv/5kQREkxZI6y9v0AF3qcbsy2731FnD\ns9ChJvOUW9toIab2gsIdrKW8ZNpu084ZFVKb6LNjvIXI1Se4oMTHeszXzNptzlot\nkdxxjOoaQMAyfljFSot1F1FlU6MQlag7UnFGvFjRHN1JI5q4K+n3a67DX+TMyRqS\nHQIDAQAB", VITE_APP_DISABLE_PREVENT_UNLOAD: "", PKG_NAME: "@nous-excalidraw/excalidraw", PKG_VERSION: "0.18.9-beta.24", DEV: true };
|
|
3
3
|
|
|
4
4
|
export {
|
|
5
5
|
define_import_meta_env_default
|
|
6
6
|
};
|
|
7
|
-
//# sourceMappingURL=chunk-
|
|
7
|
+
//# sourceMappingURL=chunk-GS6CFMFL.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
define_import_meta_env_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GS6CFMFL.js";
|
|
4
4
|
import {
|
|
5
5
|
__publicField
|
|
6
6
|
} from "./chunk-XDFCUUT6.js";
|
|
@@ -5112,7 +5112,7 @@ var parseFileContents = async (blob) => {
|
|
|
5112
5112
|
let contents;
|
|
5113
5113
|
if (blob.type === MIME_TYPES6.png) {
|
|
5114
5114
|
try {
|
|
5115
|
-
return await (await import("./data/image-
|
|
5115
|
+
return await (await import("./data/image-S7DRX2GL.js")).decodePngMetadata(blob);
|
|
5116
5116
|
} catch (error) {
|
|
5117
5117
|
if (error.message === "INVALID") {
|
|
5118
5118
|
throw new ImageSceneDataError(
|
|
@@ -5546,4 +5546,4 @@ export {
|
|
|
5546
5546
|
createFile,
|
|
5547
5547
|
normalizeFile
|
|
5548
5548
|
};
|
|
5549
|
-
//# sourceMappingURL=chunk-
|
|
5549
|
+
//# sourceMappingURL=chunk-GWBWDZAV.js.map
|
package/dist/dev/components/TTDDialog/{CodeMirrorEditor-ZR77XBIT.js → CodeMirrorEditor-6L6DTYD2.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-GS6CFMFL.js";
|
|
2
2
|
import "../../chunk-XDFCUUT6.js";
|
|
3
3
|
|
|
4
4
|
// components/TTDDialog/CodeMirrorEditor.tsx
|
|
@@ -256,4 +256,4 @@ var CodeMirrorEditor_default = CodeMirrorEditor;
|
|
|
256
256
|
export {
|
|
257
257
|
CodeMirrorEditor_default as default
|
|
258
258
|
};
|
|
259
|
-
//# sourceMappingURL=CodeMirrorEditor-
|
|
259
|
+
//# sourceMappingURL=CodeMirrorEditor-6L6DTYD2.js.map
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
decodePngMetadata,
|
|
3
3
|
encodePngMetadata,
|
|
4
4
|
getTEXtChunk
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-GWBWDZAV.js";
|
|
6
|
+
import "../chunk-GS6CFMFL.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-S7DRX2GL.js.map
|
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-GWBWDZAV.js";
|
|
69
69
|
import {
|
|
70
70
|
define_import_meta_env_default
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-GS6CFMFL.js";
|
|
72
72
|
import {
|
|
73
73
|
en_default
|
|
74
74
|
} from "./chunk-IXBA2ET3.js";
|
|
@@ -186,7 +186,7 @@ import {
|
|
|
186
186
|
normalizeEOL as normalizeEOL2,
|
|
187
187
|
getDateTime,
|
|
188
188
|
isShallowEqual as isShallowEqual9,
|
|
189
|
-
arrayToMap as
|
|
189
|
+
arrayToMap as arrayToMap28,
|
|
190
190
|
applyDarkModeFilter as applyDarkModeFilter4,
|
|
191
191
|
AppEventBus,
|
|
192
192
|
randomInteger as randomInteger4,
|
|
@@ -315,7 +315,7 @@ import {
|
|
|
315
315
|
isSelectedViaGroup as isSelectedViaGroup2,
|
|
316
316
|
selectGroupsForSelectedElements as selectGroupsForSelectedElements7,
|
|
317
317
|
syncInvalidIndices,
|
|
318
|
-
syncMovedIndices as
|
|
318
|
+
syncMovedIndices as syncMovedIndices5,
|
|
319
319
|
excludeElementsInFramesFromSelection,
|
|
320
320
|
getSelectionStateForElements as getSelectionStateForElements2,
|
|
321
321
|
makeNextSelectedElementIds as makeNextSelectedElementIds3,
|
|
@@ -9725,7 +9725,7 @@ var exportCanvas = async (type, elements, appState, files, {
|
|
|
9725
9725
|
let blob = canvasToBlob(tempCanvas);
|
|
9726
9726
|
if (appState.exportEmbedScene) {
|
|
9727
9727
|
blob = blob.then(
|
|
9728
|
-
(blob2) => import("./data/image-
|
|
9728
|
+
(blob2) => import("./data/image-S7DRX2GL.js").then(
|
|
9729
9729
|
({ encodePngMetadata: encodePngMetadata2 }) => encodePngMetadata2({
|
|
9730
9730
|
blob: blob2,
|
|
9731
9731
|
metadata: serializeAsJSON(elements, appState, files, "local")
|
|
@@ -20745,10 +20745,11 @@ import {
|
|
|
20745
20745
|
removeAllElementsFromFrame
|
|
20746
20746
|
} from "@nous-excalidraw/element";
|
|
20747
20747
|
import { getFrameChildren as getFrameChildren3 } from "@nous-excalidraw/element";
|
|
20748
|
-
import { KEYS as KEYS41, updateActiveTool as updateActiveTool7 } from "@nous-excalidraw/common";
|
|
20748
|
+
import { KEYS as KEYS41, updateActiveTool as updateActiveTool7, arrayToMap as arrayToMap21 } from "@nous-excalidraw/common";
|
|
20749
20749
|
import { getElementsInGroup as getElementsInGroup5 } from "@nous-excalidraw/element";
|
|
20750
20750
|
import { getCommonBounds as getCommonBounds3 } from "@nous-excalidraw/element";
|
|
20751
20751
|
import { CaptureUpdateAction as CaptureUpdateAction35 } from "@nous-excalidraw/element";
|
|
20752
|
+
import { syncMovedIndices as syncMovedIndices4 } from "@nous-excalidraw/element";
|
|
20752
20753
|
var isSingleFrameSelected = (appState, app) => {
|
|
20753
20754
|
const selectedElements = app.scene.getSelectedElements(appState);
|
|
20754
20755
|
return selectedElements.length === 1 && isFrameLikeElement8(selectedElements[0]);
|
|
@@ -20888,14 +20889,33 @@ var actionWrapSelectionInFrame = register({
|
|
|
20888
20889
|
});
|
|
20889
20890
|
}
|
|
20890
20891
|
}
|
|
20892
|
+
const allElements = app.scene.getElementsIncludingDeleted();
|
|
20893
|
+
const selectedElementIds = new Set(
|
|
20894
|
+
selectedElements.map((element) => element.id)
|
|
20895
|
+
);
|
|
20896
|
+
let minIndex = allElements.length;
|
|
20897
|
+
for (let i = 0; i < allElements.length; i++) {
|
|
20898
|
+
if (selectedElementIds.has(allElements[i].id)) {
|
|
20899
|
+
minIndex = Math.min(minIndex, i);
|
|
20900
|
+
}
|
|
20901
|
+
}
|
|
20902
|
+
const elementsWithFrame = [
|
|
20903
|
+
...allElements.slice(0, minIndex),
|
|
20904
|
+
frame,
|
|
20905
|
+
...allElements.slice(minIndex)
|
|
20906
|
+
];
|
|
20891
20907
|
const nextElements = addElementsToFrame(
|
|
20892
|
-
|
|
20908
|
+
elementsWithFrame,
|
|
20893
20909
|
selectedElements,
|
|
20894
20910
|
frame,
|
|
20895
20911
|
appState
|
|
20896
20912
|
);
|
|
20913
|
+
const frameChildren = getFrameChildren3(nextElements, frame.id);
|
|
20897
20914
|
return {
|
|
20898
|
-
elements:
|
|
20915
|
+
elements: syncMovedIndices4(
|
|
20916
|
+
nextElements,
|
|
20917
|
+
arrayToMap21([frame, ...frameChildren])
|
|
20918
|
+
),
|
|
20899
20919
|
appState: {
|
|
20900
20920
|
selectedElementIds: { [frame.id]: true }
|
|
20901
20921
|
},
|
|
@@ -20909,7 +20929,7 @@ import {
|
|
|
20909
20929
|
isWindows,
|
|
20910
20930
|
KEYS as KEYS42,
|
|
20911
20931
|
matchKey,
|
|
20912
|
-
arrayToMap as
|
|
20932
|
+
arrayToMap as arrayToMap22,
|
|
20913
20933
|
MOBILE_ACTION_BUTTON_BG as MOBILE_ACTION_BUTTON_BG4
|
|
20914
20934
|
} from "@nous-excalidraw/common";
|
|
20915
20935
|
import { CaptureUpdateAction as CaptureUpdateAction37 } from "@nous-excalidraw/element";
|
|
@@ -21136,7 +21156,7 @@ var createUndoAction = (history) => ({
|
|
|
21136
21156
|
perform: (elements, appState, value, app) => executeHistoryAction(
|
|
21137
21157
|
app,
|
|
21138
21158
|
appState,
|
|
21139
|
-
() => history.undo(
|
|
21159
|
+
() => history.undo(arrayToMap22(elements), appState)
|
|
21140
21160
|
),
|
|
21141
21161
|
keyTest: (event) => event[KEYS42.CTRL_OR_CMD] && matchKey(event, KEYS42.Z) && !event.shiftKey,
|
|
21142
21162
|
PanelComponent: ({ appState, updateData, data, app }) => {
|
|
@@ -21174,7 +21194,7 @@ var createRedoAction = (history) => ({
|
|
|
21174
21194
|
perform: (elements, appState, __, app) => executeHistoryAction(
|
|
21175
21195
|
app,
|
|
21176
21196
|
appState,
|
|
21177
|
-
() => history.redo(
|
|
21197
|
+
() => history.redo(arrayToMap22(elements), appState)
|
|
21178
21198
|
),
|
|
21179
21199
|
keyTest: (event) => event[KEYS42.CTRL_OR_CMD] && event.shiftKey && matchKey(event, KEYS42.Z) || isWindows && event.ctrlKey && !event.shiftKey && matchKey(event, KEYS42.Y),
|
|
21180
21200
|
PanelComponent: ({ appState, updateData, data, app }) => {
|
|
@@ -23711,7 +23731,7 @@ import {
|
|
|
23711
23731
|
import { getFrameChildren as getFrameChildren4 } from "@nous-excalidraw/element";
|
|
23712
23732
|
import { selectGroupsForSelectedElements as selectGroupsForSelectedElements6 } from "@nous-excalidraw/element";
|
|
23713
23733
|
import { getContainerElement as getContainerElement4 } from "@nous-excalidraw/element";
|
|
23714
|
-
import { arrayToMap as
|
|
23734
|
+
import { arrayToMap as arrayToMap23, easeOut as easeOut2, isShallowEqual as isShallowEqual4 } from "@nous-excalidraw/common";
|
|
23715
23735
|
|
|
23716
23736
|
// lasso/utils.ts
|
|
23717
23737
|
import { simplify as simplify2 } from "points-on-curve";
|
|
@@ -23907,7 +23927,7 @@ var LassoTrail = class extends AnimatedTrail {
|
|
|
23907
23927
|
if (!this.elementsSegments || !isShallowEqual4(currentCanvasTranslate, this.canvasTranslate ?? {})) {
|
|
23908
23928
|
this.canvasTranslate = currentCanvasTranslate;
|
|
23909
23929
|
this.elementsSegments = /* @__PURE__ */ new Map();
|
|
23910
|
-
const visibleElementsMap =
|
|
23930
|
+
const visibleElementsMap = arrayToMap23(this.app.visibleElements);
|
|
23911
23931
|
for (const element of this.app.visibleElements) {
|
|
23912
23932
|
const segments = getElementLineSegments2(element, visibleElementsMap);
|
|
23913
23933
|
this.elementsSegments.set(element.id, segments);
|
|
@@ -23951,7 +23971,7 @@ var LassoTrail = class extends AnimatedTrail {
|
|
|
23951
23971
|
};
|
|
23952
23972
|
|
|
23953
23973
|
// eraser/index.ts
|
|
23954
|
-
import { arrayToMap as
|
|
23974
|
+
import { arrayToMap as arrayToMap24, easeOut as easeOut3, THEME as THEME12 } from "@nous-excalidraw/common";
|
|
23955
23975
|
import {
|
|
23956
23976
|
computeBoundTextPosition as computeBoundTextPosition4,
|
|
23957
23977
|
doBoundsIntersect as doBoundsIntersect3,
|
|
@@ -24021,7 +24041,7 @@ var EraserTrail = class extends AnimatedTrail {
|
|
|
24021
24041
|
const candidateElements = this.app.visibleElements.filter(
|
|
24022
24042
|
(el) => !el.locked
|
|
24023
24043
|
);
|
|
24024
|
-
const candidateElementsMap =
|
|
24044
|
+
const candidateElementsMap = arrayToMap24(candidateElements);
|
|
24025
24045
|
for (const element of candidateElements) {
|
|
24026
24046
|
if (restoreToErase && this.elementsToErase.has(element.id)) {
|
|
24027
24047
|
const intersects = eraserTest(
|
|
@@ -25496,7 +25516,7 @@ import {
|
|
|
25496
25516
|
CLASSES as CLASSES10,
|
|
25497
25517
|
DEFAULT_SIDEBAR as DEFAULT_SIDEBAR6,
|
|
25498
25518
|
TOOL_TYPE as TOOL_TYPE2,
|
|
25499
|
-
arrayToMap as
|
|
25519
|
+
arrayToMap as arrayToMap26,
|
|
25500
25520
|
capitalizeString as capitalizeString5,
|
|
25501
25521
|
isShallowEqual as isShallowEqual6
|
|
25502
25522
|
} from "@nous-excalidraw/common";
|
|
@@ -26141,7 +26161,7 @@ import React31, { useLayoutEffect as useLayoutEffect5, useRef as useRef26, useSt
|
|
|
26141
26161
|
import { newTextElement as newTextElement3 } from "@nous-excalidraw/element";
|
|
26142
26162
|
|
|
26143
26163
|
// ../utils/src/withinBounds.ts
|
|
26144
|
-
import { arrayToMap as
|
|
26164
|
+
import { arrayToMap as arrayToMap25 } from "@nous-excalidraw/common";
|
|
26145
26165
|
import { getElementBounds as getElementBounds4 } from "@nous-excalidraw/element";
|
|
26146
26166
|
import {
|
|
26147
26167
|
isArrowElement as isArrowElement10,
|
|
@@ -26250,7 +26270,7 @@ var elementsOverlappingBBox = ({
|
|
|
26250
26270
|
errorMargin = 0
|
|
26251
26271
|
}) => {
|
|
26252
26272
|
if (isExcalidrawElement3(bounds)) {
|
|
26253
|
-
bounds = getElementBounds4(bounds,
|
|
26273
|
+
bounds = getElementBounds4(bounds, arrayToMap25(elements));
|
|
26254
26274
|
}
|
|
26255
26275
|
const adjustedBBox = [
|
|
26256
26276
|
bounds[0] - errorMargin,
|
|
@@ -28781,7 +28801,7 @@ var TTDDialogInput = ({
|
|
|
28781
28801
|
setShowSpinner(true);
|
|
28782
28802
|
}
|
|
28783
28803
|
}, SPINNER_DELAY_MS);
|
|
28784
|
-
import("./components/TTDDialog/CodeMirrorEditor-
|
|
28804
|
+
import("./components/TTDDialog/CodeMirrorEditor-6L6DTYD2.js").then((mod) => {
|
|
28785
28805
|
if (!cancelled) {
|
|
28786
28806
|
setEditorState({ type: "ready", component: mod.default });
|
|
28787
28807
|
}
|
|
@@ -35256,7 +35276,7 @@ var LayerUI = ({
|
|
|
35256
35276
|
}
|
|
35257
35277
|
if (selectedElements.length) {
|
|
35258
35278
|
for (const element of selectedElements) {
|
|
35259
|
-
mutateElement5(element,
|
|
35279
|
+
mutateElement5(element, arrayToMap26(elements), {
|
|
35260
35280
|
[altKey && eyeDropperState.swapPreviewOnAlt ? colorPickerType === "elementBackground" ? "strokeColor" : "backgroundColor" : colorPickerType === "elementBackground" ? "backgroundColor" : "strokeColor"]: color
|
|
35261
35281
|
});
|
|
35262
35282
|
ShapeCache3.delete(element);
|
|
@@ -35478,7 +35498,7 @@ import {
|
|
|
35478
35498
|
pointDistance as pointDistance8
|
|
35479
35499
|
} from "@nous-excalidraw/math";
|
|
35480
35500
|
import {
|
|
35481
|
-
arrayToMap as
|
|
35501
|
+
arrayToMap as arrayToMap27,
|
|
35482
35502
|
BIND_MODE_TIMEOUT,
|
|
35483
35503
|
DEFAULT_TRANSFORM_HANDLE_SPACING as DEFAULT_TRANSFORM_HANDLE_SPACING2,
|
|
35484
35504
|
FRAME_STYLE as FRAME_STYLE3,
|
|
@@ -36558,7 +36578,7 @@ var buildElementSelectionBorders = ({
|
|
|
36558
36578
|
editorInterface,
|
|
36559
36579
|
renderConfig
|
|
36560
36580
|
}) => {
|
|
36561
|
-
const locallySelectedIds =
|
|
36581
|
+
const locallySelectedIds = arrayToMap27(selectedElements);
|
|
36562
36582
|
const selections = [];
|
|
36563
36583
|
const isSingleLinearElementSelected = selectedElements.length === 1 && isLinearElement11(selectedElements[0]);
|
|
36564
36584
|
for (const element of elementsMap.values()) {
|
|
@@ -39228,7 +39248,7 @@ var _App = class _App extends React46.Component {
|
|
|
39228
39248
|
prevElements
|
|
39229
39249
|
);
|
|
39230
39250
|
nextElements = mappedNewSceneElements || nextElements;
|
|
39231
|
-
|
|
39251
|
+
syncMovedIndices5(nextElements, arrayToMap28(duplicatedElements));
|
|
39232
39252
|
const topLayerFrame = this.getTopLayerFrameAtSceneCoords({ x, y });
|
|
39233
39253
|
if (topLayerFrame) {
|
|
39234
39254
|
const eligibleElements = filterElementsEligibleAsFrameChildren(
|
|
@@ -43004,14 +43024,14 @@ var _App = class _App extends React46.Component {
|
|
|
43004
43024
|
}
|
|
43005
43025
|
})
|
|
43006
43026
|
);
|
|
43007
|
-
const initializedMap =
|
|
43027
|
+
const initializedMap = arrayToMap28(initialized);
|
|
43008
43028
|
const positioned = positionElementsOnGrid(
|
|
43009
43029
|
initialized.filter((el) => !el.isDeleted),
|
|
43010
43030
|
sceneX,
|
|
43011
43031
|
sceneY,
|
|
43012
43032
|
gridPadding
|
|
43013
43033
|
);
|
|
43014
|
-
const positionedMap =
|
|
43034
|
+
const positionedMap = arrayToMap28(positioned);
|
|
43015
43035
|
const nextElements = this.scene.getElementsIncludingDeleted().map((el) => positionedMap.get(el.id) ?? initializedMap.get(el.id) ?? el);
|
|
43016
43036
|
this.updateScene({
|
|
43017
43037
|
appState: {
|
|
@@ -43726,6 +43746,9 @@ var _App = class _App extends React46.Component {
|
|
|
43726
43746
|
registerAction: (action) => {
|
|
43727
43747
|
this.actionManager.registerAction(action);
|
|
43728
43748
|
},
|
|
43749
|
+
executeAction: (action, value = null) => {
|
|
43750
|
+
this.actionManager.executeAction(action, "api", value);
|
|
43751
|
+
},
|
|
43729
43752
|
refresh: this.refresh,
|
|
43730
43753
|
setToast: this.setToast,
|
|
43731
43754
|
id: this.id,
|
|
@@ -46367,9 +46390,9 @@ var _App = class _App extends React46.Component {
|
|
|
46367
46390
|
mappedClonedElements,
|
|
46368
46391
|
elements
|
|
46369
46392
|
);
|
|
46370
|
-
const elementsWithIndices =
|
|
46393
|
+
const elementsWithIndices = syncMovedIndices5(
|
|
46371
46394
|
mappedNewSceneElements || mappedClonedElements,
|
|
46372
|
-
|
|
46395
|
+
arrayToMap28(duplicatedElements)
|
|
46373
46396
|
);
|
|
46374
46397
|
flushSync3(() => {
|
|
46375
46398
|
if (pointerDownState.hit.element) {
|
|
@@ -47842,7 +47865,7 @@ import { isInvisiblySmallElement as isInvisiblySmallElement4 } from "@nous-excal
|
|
|
47842
47865
|
|
|
47843
47866
|
// data/reconcile.ts
|
|
47844
47867
|
import throttle4 from "lodash.throttle";
|
|
47845
|
-
import { arrayToMap as
|
|
47868
|
+
import { arrayToMap as arrayToMap29, isDevEnv as isDevEnv11, isTestEnv as isTestEnv6 } from "@nous-excalidraw/common";
|
|
47846
47869
|
import {
|
|
47847
47870
|
orderByFractionalIndex as orderByFractionalIndex2,
|
|
47848
47871
|
syncInvalidIndices as syncInvalidIndices2,
|
|
@@ -47879,7 +47902,7 @@ var validateIndicesThrottled = throttle4(
|
|
|
47879
47902
|
{ leading: true, trailing: false }
|
|
47880
47903
|
);
|
|
47881
47904
|
var reconcileElements = (localElements, remoteElements, localAppState) => {
|
|
47882
|
-
const localElementsMap =
|
|
47905
|
+
const localElementsMap = arrayToMap29(localElements);
|
|
47883
47906
|
const reconciledElements = [];
|
|
47884
47907
|
const added = /* @__PURE__ */ new Set();
|
|
47885
47908
|
for (const remoteElement of remoteElements) {
|
|
@@ -48348,6 +48371,7 @@ export {
|
|
|
48348
48371
|
TTDStreamFetch,
|
|
48349
48372
|
UserIdleState2 as UserIdleState,
|
|
48350
48373
|
WelcomeScreen_default as WelcomeScreen,
|
|
48374
|
+
actionWrapSelectionInFrame,
|
|
48351
48375
|
bumpVersion3 as bumpVersion,
|
|
48352
48376
|
convertToExcalidrawElements3 as convertToExcalidrawElements,
|
|
48353
48377
|
defaultLang,
|