@nous-excalidraw/excalidraw 0.18.9-beta.22 → 0.18.9-beta.23
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-DRBGEADH.js → chunk-NJT6NRP4.js} +3 -3
- package/dist/dev/{chunk-5ERE5TTW.js → chunk-NLSPUT7I.js} +2 -2
- package/dist/dev/components/TTDDialog/{CodeMirrorEditor-ZR77XBIT.js → CodeMirrorEditor-FWL3IAFT.js} +2 -2
- package/dist/dev/data/{image-QGE3DJEP.js → image-PPDUIIUO.js} +3 -3
- package/dist/dev/index.js +78 -31
- 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-JWDEJ6N5.js → chunk-NVZF4XB3.js} +2 -2
- package/dist/prod/{chunk-MW6O7B5J.js → chunk-XN6AQKMR.js} +1 -1
- package/dist/prod/components/TTDDialog/{CodeMirrorEditor-PQAT7WNN.js → CodeMirrorEditor-7VTRX6DQ.js} +1 -1
- package/dist/prod/data/image-S4BV24I2.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-DRBGEADH.js.map → chunk-NJT6NRP4.js.map} +0 -0
- /package/dist/dev/{chunk-5ERE5TTW.js.map → chunk-NLSPUT7I.js.map} +0 -0
- /package/dist/dev/components/TTDDialog/{CodeMirrorEditor-ZR77XBIT.js.map → CodeMirrorEditor-FWL3IAFT.js.map} +0 -0
- /package/dist/dev/data/{image-QGE3DJEP.js.map → image-PPDUIIUO.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
define_import_meta_env_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NLSPUT7I.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-PPDUIIUO.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-NJT6NRP4.js.map
|
|
@@ -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.22", DEV: true };
|
|
3
3
|
|
|
4
4
|
export {
|
|
5
5
|
define_import_meta_env_default
|
|
6
6
|
};
|
|
7
|
-
//# sourceMappingURL=chunk-
|
|
7
|
+
//# sourceMappingURL=chunk-NLSPUT7I.js.map
|
package/dist/dev/components/TTDDialog/{CodeMirrorEditor-ZR77XBIT.js → CodeMirrorEditor-FWL3IAFT.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-NLSPUT7I.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-FWL3IAFT.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-NJT6NRP4.js";
|
|
6
|
+
import "../chunk-NLSPUT7I.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-PPDUIIUO.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-NJT6NRP4.js";
|
|
69
69
|
import {
|
|
70
70
|
define_import_meta_env_default
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-NLSPUT7I.js";
|
|
72
72
|
import {
|
|
73
73
|
en_default
|
|
74
74
|
} from "./chunk-IXBA2ET3.js";
|
|
@@ -175,7 +175,7 @@ import {
|
|
|
175
175
|
wrapEvent as wrapEvent2,
|
|
176
176
|
updateObject as updateObject2,
|
|
177
177
|
updateActiveTool as updateActiveTool8,
|
|
178
|
-
isTransparent as
|
|
178
|
+
isTransparent as isTransparent8,
|
|
179
179
|
easeToValuesRAF,
|
|
180
180
|
muteFSAbortError as muteFSAbortError2,
|
|
181
181
|
isTestEnv as isTestEnv5,
|
|
@@ -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-PPDUIIUO.js").then(
|
|
9729
9729
|
({ encodePngMetadata: encodePngMetadata2 }) => encodePngMetadata2({
|
|
9730
9730
|
blob: blob2,
|
|
9731
9731
|
metadata: serializeAsJSON(elements, appState, files, "local")
|
|
@@ -20745,10 +20745,33 @@ import {
|
|
|
20745
20745
|
removeAllElementsFromFrame
|
|
20746
20746
|
} from "@nous-excalidraw/element";
|
|
20747
20747
|
import { getFrameChildren as getFrameChildren3 } from "@nous-excalidraw/element";
|
|
20748
|
-
import {
|
|
20748
|
+
import {
|
|
20749
|
+
KEYS as KEYS41,
|
|
20750
|
+
updateActiveTool as updateActiveTool7,
|
|
20751
|
+
arrayToMap as arrayToMap21,
|
|
20752
|
+
isTransparent as isTransparent7
|
|
20753
|
+
} from "@nous-excalidraw/common";
|
|
20749
20754
|
import { getElementsInGroup as getElementsInGroup5 } from "@nous-excalidraw/element";
|
|
20755
|
+
import { hasBackground as hasBackground2 } from "@nous-excalidraw/element";
|
|
20750
20756
|
import { getCommonBounds as getCommonBounds3 } from "@nous-excalidraw/element";
|
|
20751
20757
|
import { CaptureUpdateAction as CaptureUpdateAction35 } from "@nous-excalidraw/element";
|
|
20758
|
+
import { syncMovedIndices as syncMovedIndices4 } from "@nous-excalidraw/element";
|
|
20759
|
+
var FRAME_CHILD_DEFAULT_COLOR = "#373737";
|
|
20760
|
+
var ensureFrameChildrenAreVisible = (elements, frameChildren) => {
|
|
20761
|
+
const elementsMap = arrayToMap21(elements);
|
|
20762
|
+
for (const child of frameChildren) {
|
|
20763
|
+
if (hasBackground2(child.type) && isTransparent7(child.backgroundColor)) {
|
|
20764
|
+
mutateElement4(child, elementsMap, {
|
|
20765
|
+
backgroundColor: FRAME_CHILD_DEFAULT_COLOR
|
|
20766
|
+
});
|
|
20767
|
+
}
|
|
20768
|
+
if ((child.type === "line" || child.type === "arrow") && isTransparent7(child.strokeColor)) {
|
|
20769
|
+
mutateElement4(child, elementsMap, {
|
|
20770
|
+
strokeColor: FRAME_CHILD_DEFAULT_COLOR
|
|
20771
|
+
});
|
|
20772
|
+
}
|
|
20773
|
+
}
|
|
20774
|
+
};
|
|
20752
20775
|
var isSingleFrameSelected = (appState, app) => {
|
|
20753
20776
|
const selectedElements = app.scene.getSelectedElements(appState);
|
|
20754
20777
|
return selectedElements.length === 1 && isFrameLikeElement8(selectedElements[0]);
|
|
@@ -20888,14 +20911,34 @@ var actionWrapSelectionInFrame = register({
|
|
|
20888
20911
|
});
|
|
20889
20912
|
}
|
|
20890
20913
|
}
|
|
20914
|
+
const allElements = app.scene.getElementsIncludingDeleted();
|
|
20915
|
+
const selectedElementIds = new Set(
|
|
20916
|
+
selectedElements.map((element) => element.id)
|
|
20917
|
+
);
|
|
20918
|
+
let minIndex = allElements.length;
|
|
20919
|
+
for (let i = 0; i < allElements.length; i++) {
|
|
20920
|
+
if (selectedElementIds.has(allElements[i].id)) {
|
|
20921
|
+
minIndex = Math.min(minIndex, i);
|
|
20922
|
+
}
|
|
20923
|
+
}
|
|
20924
|
+
const elementsWithFrame = [
|
|
20925
|
+
...allElements.slice(0, minIndex),
|
|
20926
|
+
frame,
|
|
20927
|
+
...allElements.slice(minIndex)
|
|
20928
|
+
];
|
|
20891
20929
|
const nextElements = addElementsToFrame(
|
|
20892
|
-
|
|
20930
|
+
elementsWithFrame,
|
|
20893
20931
|
selectedElements,
|
|
20894
20932
|
frame,
|
|
20895
20933
|
appState
|
|
20896
20934
|
);
|
|
20935
|
+
const frameChildren = getFrameChildren3(nextElements, frame.id);
|
|
20936
|
+
ensureFrameChildrenAreVisible(nextElements, frameChildren);
|
|
20897
20937
|
return {
|
|
20898
|
-
elements:
|
|
20938
|
+
elements: syncMovedIndices4(
|
|
20939
|
+
nextElements,
|
|
20940
|
+
arrayToMap21([frame, ...frameChildren])
|
|
20941
|
+
),
|
|
20899
20942
|
appState: {
|
|
20900
20943
|
selectedElementIds: { [frame.id]: true }
|
|
20901
20944
|
},
|
|
@@ -20909,7 +20952,7 @@ import {
|
|
|
20909
20952
|
isWindows,
|
|
20910
20953
|
KEYS as KEYS42,
|
|
20911
20954
|
matchKey,
|
|
20912
|
-
arrayToMap as
|
|
20955
|
+
arrayToMap as arrayToMap22,
|
|
20913
20956
|
MOBILE_ACTION_BUTTON_BG as MOBILE_ACTION_BUTTON_BG4
|
|
20914
20957
|
} from "@nous-excalidraw/common";
|
|
20915
20958
|
import { CaptureUpdateAction as CaptureUpdateAction37 } from "@nous-excalidraw/element";
|
|
@@ -21136,7 +21179,7 @@ var createUndoAction = (history) => ({
|
|
|
21136
21179
|
perform: (elements, appState, value, app) => executeHistoryAction(
|
|
21137
21180
|
app,
|
|
21138
21181
|
appState,
|
|
21139
|
-
() => history.undo(
|
|
21182
|
+
() => history.undo(arrayToMap22(elements), appState)
|
|
21140
21183
|
),
|
|
21141
21184
|
keyTest: (event) => event[KEYS42.CTRL_OR_CMD] && matchKey(event, KEYS42.Z) && !event.shiftKey,
|
|
21142
21185
|
PanelComponent: ({ appState, updateData, data, app }) => {
|
|
@@ -21174,7 +21217,7 @@ var createRedoAction = (history) => ({
|
|
|
21174
21217
|
perform: (elements, appState, __, app) => executeHistoryAction(
|
|
21175
21218
|
app,
|
|
21176
21219
|
appState,
|
|
21177
|
-
() => history.redo(
|
|
21220
|
+
() => history.redo(arrayToMap22(elements), appState)
|
|
21178
21221
|
),
|
|
21179
21222
|
keyTest: (event) => event[KEYS42.CTRL_OR_CMD] && event.shiftKey && matchKey(event, KEYS42.Z) || isWindows && event.ctrlKey && !event.shiftKey && matchKey(event, KEYS42.Y),
|
|
21180
21223
|
PanelComponent: ({ appState, updateData, data, app }) => {
|
|
@@ -23711,7 +23754,7 @@ import {
|
|
|
23711
23754
|
import { getFrameChildren as getFrameChildren4 } from "@nous-excalidraw/element";
|
|
23712
23755
|
import { selectGroupsForSelectedElements as selectGroupsForSelectedElements6 } from "@nous-excalidraw/element";
|
|
23713
23756
|
import { getContainerElement as getContainerElement4 } from "@nous-excalidraw/element";
|
|
23714
|
-
import { arrayToMap as
|
|
23757
|
+
import { arrayToMap as arrayToMap23, easeOut as easeOut2, isShallowEqual as isShallowEqual4 } from "@nous-excalidraw/common";
|
|
23715
23758
|
|
|
23716
23759
|
// lasso/utils.ts
|
|
23717
23760
|
import { simplify as simplify2 } from "points-on-curve";
|
|
@@ -23907,7 +23950,7 @@ var LassoTrail = class extends AnimatedTrail {
|
|
|
23907
23950
|
if (!this.elementsSegments || !isShallowEqual4(currentCanvasTranslate, this.canvasTranslate ?? {})) {
|
|
23908
23951
|
this.canvasTranslate = currentCanvasTranslate;
|
|
23909
23952
|
this.elementsSegments = /* @__PURE__ */ new Map();
|
|
23910
|
-
const visibleElementsMap =
|
|
23953
|
+
const visibleElementsMap = arrayToMap23(this.app.visibleElements);
|
|
23911
23954
|
for (const element of this.app.visibleElements) {
|
|
23912
23955
|
const segments = getElementLineSegments2(element, visibleElementsMap);
|
|
23913
23956
|
this.elementsSegments.set(element.id, segments);
|
|
@@ -23951,7 +23994,7 @@ var LassoTrail = class extends AnimatedTrail {
|
|
|
23951
23994
|
};
|
|
23952
23995
|
|
|
23953
23996
|
// eraser/index.ts
|
|
23954
|
-
import { arrayToMap as
|
|
23997
|
+
import { arrayToMap as arrayToMap24, easeOut as easeOut3, THEME as THEME12 } from "@nous-excalidraw/common";
|
|
23955
23998
|
import {
|
|
23956
23999
|
computeBoundTextPosition as computeBoundTextPosition4,
|
|
23957
24000
|
doBoundsIntersect as doBoundsIntersect3,
|
|
@@ -24021,7 +24064,7 @@ var EraserTrail = class extends AnimatedTrail {
|
|
|
24021
24064
|
const candidateElements = this.app.visibleElements.filter(
|
|
24022
24065
|
(el) => !el.locked
|
|
24023
24066
|
);
|
|
24024
|
-
const candidateElementsMap =
|
|
24067
|
+
const candidateElementsMap = arrayToMap24(candidateElements);
|
|
24025
24068
|
for (const element of candidateElements) {
|
|
24026
24069
|
if (restoreToErase && this.elementsToErase.has(element.id)) {
|
|
24027
24070
|
const intersects = eraserTest(
|
|
@@ -25496,7 +25539,7 @@ import {
|
|
|
25496
25539
|
CLASSES as CLASSES10,
|
|
25497
25540
|
DEFAULT_SIDEBAR as DEFAULT_SIDEBAR6,
|
|
25498
25541
|
TOOL_TYPE as TOOL_TYPE2,
|
|
25499
|
-
arrayToMap as
|
|
25542
|
+
arrayToMap as arrayToMap26,
|
|
25500
25543
|
capitalizeString as capitalizeString5,
|
|
25501
25544
|
isShallowEqual as isShallowEqual6
|
|
25502
25545
|
} from "@nous-excalidraw/common";
|
|
@@ -26141,7 +26184,7 @@ import React31, { useLayoutEffect as useLayoutEffect5, useRef as useRef26, useSt
|
|
|
26141
26184
|
import { newTextElement as newTextElement3 } from "@nous-excalidraw/element";
|
|
26142
26185
|
|
|
26143
26186
|
// ../utils/src/withinBounds.ts
|
|
26144
|
-
import { arrayToMap as
|
|
26187
|
+
import { arrayToMap as arrayToMap25 } from "@nous-excalidraw/common";
|
|
26145
26188
|
import { getElementBounds as getElementBounds4 } from "@nous-excalidraw/element";
|
|
26146
26189
|
import {
|
|
26147
26190
|
isArrowElement as isArrowElement10,
|
|
@@ -26250,7 +26293,7 @@ var elementsOverlappingBBox = ({
|
|
|
26250
26293
|
errorMargin = 0
|
|
26251
26294
|
}) => {
|
|
26252
26295
|
if (isExcalidrawElement3(bounds)) {
|
|
26253
|
-
bounds = getElementBounds4(bounds,
|
|
26296
|
+
bounds = getElementBounds4(bounds, arrayToMap25(elements));
|
|
26254
26297
|
}
|
|
26255
26298
|
const adjustedBBox = [
|
|
26256
26299
|
bounds[0] - errorMargin,
|
|
@@ -28781,7 +28824,7 @@ var TTDDialogInput = ({
|
|
|
28781
28824
|
setShowSpinner(true);
|
|
28782
28825
|
}
|
|
28783
28826
|
}, SPINNER_DELAY_MS);
|
|
28784
|
-
import("./components/TTDDialog/CodeMirrorEditor-
|
|
28827
|
+
import("./components/TTDDialog/CodeMirrorEditor-FWL3IAFT.js").then((mod) => {
|
|
28785
28828
|
if (!cancelled) {
|
|
28786
28829
|
setEditorState({ type: "ready", component: mod.default });
|
|
28787
28830
|
}
|
|
@@ -35256,7 +35299,7 @@ var LayerUI = ({
|
|
|
35256
35299
|
}
|
|
35257
35300
|
if (selectedElements.length) {
|
|
35258
35301
|
for (const element of selectedElements) {
|
|
35259
|
-
mutateElement5(element,
|
|
35302
|
+
mutateElement5(element, arrayToMap26(elements), {
|
|
35260
35303
|
[altKey && eyeDropperState.swapPreviewOnAlt ? colorPickerType === "elementBackground" ? "strokeColor" : "backgroundColor" : colorPickerType === "elementBackground" ? "backgroundColor" : "strokeColor"]: color
|
|
35261
35304
|
});
|
|
35262
35305
|
ShapeCache3.delete(element);
|
|
@@ -35478,7 +35521,7 @@ import {
|
|
|
35478
35521
|
pointDistance as pointDistance8
|
|
35479
35522
|
} from "@nous-excalidraw/math";
|
|
35480
35523
|
import {
|
|
35481
|
-
arrayToMap as
|
|
35524
|
+
arrayToMap as arrayToMap27,
|
|
35482
35525
|
BIND_MODE_TIMEOUT,
|
|
35483
35526
|
DEFAULT_TRANSFORM_HANDLE_SPACING as DEFAULT_TRANSFORM_HANDLE_SPACING2,
|
|
35484
35527
|
FRAME_STYLE as FRAME_STYLE3,
|
|
@@ -36558,7 +36601,7 @@ var buildElementSelectionBorders = ({
|
|
|
36558
36601
|
editorInterface,
|
|
36559
36602
|
renderConfig
|
|
36560
36603
|
}) => {
|
|
36561
|
-
const locallySelectedIds =
|
|
36604
|
+
const locallySelectedIds = arrayToMap27(selectedElements);
|
|
36562
36605
|
const selections = [];
|
|
36563
36606
|
const isSingleLinearElementSelected = selectedElements.length === 1 && isLinearElement11(selectedElements[0]);
|
|
36564
36607
|
for (const element of elementsMap.values()) {
|
|
@@ -39228,7 +39271,7 @@ var _App = class _App extends React46.Component {
|
|
|
39228
39271
|
prevElements
|
|
39229
39272
|
);
|
|
39230
39273
|
nextElements = mappedNewSceneElements || nextElements;
|
|
39231
|
-
|
|
39274
|
+
syncMovedIndices5(nextElements, arrayToMap28(duplicatedElements));
|
|
39232
39275
|
const topLayerFrame = this.getTopLayerFrameAtSceneCoords({ x, y });
|
|
39233
39276
|
if (topLayerFrame) {
|
|
39234
39277
|
const eligibleElements = filterElementsEligibleAsFrameChildren(
|
|
@@ -40723,7 +40766,7 @@ var _App = class _App extends React46.Component {
|
|
|
40723
40766
|
sceneY
|
|
40724
40767
|
);
|
|
40725
40768
|
if (container) {
|
|
40726
|
-
if (hasBoundTextElement9(container) || !
|
|
40769
|
+
if (hasBoundTextElement9(container) || !isTransparent8(container.backgroundColor) || hitElementItself3({
|
|
40727
40770
|
point: pointFrom34(sceneX, sceneY),
|
|
40728
40771
|
element: container,
|
|
40729
40772
|
elementsMap: this.scene.getNonDeletedElementsMap(),
|
|
@@ -43004,14 +43047,14 @@ var _App = class _App extends React46.Component {
|
|
|
43004
43047
|
}
|
|
43005
43048
|
})
|
|
43006
43049
|
);
|
|
43007
|
-
const initializedMap =
|
|
43050
|
+
const initializedMap = arrayToMap28(initialized);
|
|
43008
43051
|
const positioned = positionElementsOnGrid(
|
|
43009
43052
|
initialized.filter((el) => !el.isDeleted),
|
|
43010
43053
|
sceneX,
|
|
43011
43054
|
sceneY,
|
|
43012
43055
|
gridPadding
|
|
43013
43056
|
);
|
|
43014
|
-
const positionedMap =
|
|
43057
|
+
const positionedMap = arrayToMap28(positioned);
|
|
43015
43058
|
const nextElements = this.scene.getElementsIncludingDeleted().map((el) => positionedMap.get(el.id) ?? initializedMap.get(el.id) ?? el);
|
|
43016
43059
|
this.updateScene({
|
|
43017
43060
|
appState: {
|
|
@@ -43726,6 +43769,9 @@ var _App = class _App extends React46.Component {
|
|
|
43726
43769
|
registerAction: (action) => {
|
|
43727
43770
|
this.actionManager.registerAction(action);
|
|
43728
43771
|
},
|
|
43772
|
+
executeAction: (action, value = null) => {
|
|
43773
|
+
this.actionManager.executeAction(action, "api", value);
|
|
43774
|
+
},
|
|
43729
43775
|
refresh: this.refresh,
|
|
43730
43776
|
setToast: this.setToast,
|
|
43731
43777
|
id: this.id,
|
|
@@ -46367,9 +46413,9 @@ var _App = class _App extends React46.Component {
|
|
|
46367
46413
|
mappedClonedElements,
|
|
46368
46414
|
elements
|
|
46369
46415
|
);
|
|
46370
|
-
const elementsWithIndices =
|
|
46416
|
+
const elementsWithIndices = syncMovedIndices5(
|
|
46371
46417
|
mappedNewSceneElements || mappedClonedElements,
|
|
46372
|
-
|
|
46418
|
+
arrayToMap28(duplicatedElements)
|
|
46373
46419
|
);
|
|
46374
46420
|
flushSync3(() => {
|
|
46375
46421
|
if (pointerDownState.hit.element) {
|
|
@@ -47842,7 +47888,7 @@ import { isInvisiblySmallElement as isInvisiblySmallElement4 } from "@nous-excal
|
|
|
47842
47888
|
|
|
47843
47889
|
// data/reconcile.ts
|
|
47844
47890
|
import throttle4 from "lodash.throttle";
|
|
47845
|
-
import { arrayToMap as
|
|
47891
|
+
import { arrayToMap as arrayToMap29, isDevEnv as isDevEnv11, isTestEnv as isTestEnv6 } from "@nous-excalidraw/common";
|
|
47846
47892
|
import {
|
|
47847
47893
|
orderByFractionalIndex as orderByFractionalIndex2,
|
|
47848
47894
|
syncInvalidIndices as syncInvalidIndices2,
|
|
@@ -47879,7 +47925,7 @@ var validateIndicesThrottled = throttle4(
|
|
|
47879
47925
|
{ leading: true, trailing: false }
|
|
47880
47926
|
);
|
|
47881
47927
|
var reconcileElements = (localElements, remoteElements, localAppState) => {
|
|
47882
|
-
const localElementsMap =
|
|
47928
|
+
const localElementsMap = arrayToMap29(localElements);
|
|
47883
47929
|
const reconciledElements = [];
|
|
47884
47930
|
const added = /* @__PURE__ */ new Set();
|
|
47885
47931
|
for (const remoteElement of remoteElements) {
|
|
@@ -48348,6 +48394,7 @@ export {
|
|
|
48348
48394
|
TTDStreamFetch,
|
|
48349
48395
|
UserIdleState2 as UserIdleState,
|
|
48350
48396
|
WelcomeScreen_default as WelcomeScreen,
|
|
48397
|
+
actionWrapSelectionInFrame,
|
|
48351
48398
|
bumpVersion3 as bumpVersion,
|
|
48352
48399
|
convertToExcalidrawElements3 as convertToExcalidrawElements,
|
|
48353
48400
|
defaultLang,
|