@nous-excalidraw/excalidraw 0.18.4 → 0.18.5
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-OACEU3ED.js → chunk-NMAANOBH.js} +3 -3
- package/dist/dev/{chunk-BEK2EAAK.js → chunk-U7VL4U4T.js} +2 -2
- package/dist/dev/{chunk-BEK2EAAK.js.map → chunk-U7VL4U4T.js.map} +1 -1
- package/dist/dev/components/TTDDialog/{CodeMirrorEditor-CKDKMBXK.js → CodeMirrorEditor-VMD3K7XT.js} +2 -2
- package/dist/dev/data/{image-2ZS4Q5UV.js → image-BO6UAI3G.js} +3 -3
- package/dist/dev/index.js +65 -43
- 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-SVDA3JML.js → chunk-IMTXRTTI.js} +2 -2
- package/dist/prod/{chunk-CGCZ4QZ7.js → chunk-MF2LTTTS.js} +1 -1
- package/dist/prod/components/TTDDialog/{CodeMirrorEditor-KOIUTN6W.js → CodeMirrorEditor-RIZHM22R.js} +1 -1
- package/dist/prod/data/image-5VLURFBZ.js +1 -0
- package/dist/prod/index.js +25 -25
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/common/src/constants.d.ts +11 -5
- package/package.json +4 -4
- package/dist/prod/data/image-H2IWT6DM.js +0 -1
- /package/dist/dev/{chunk-OACEU3ED.js.map → chunk-NMAANOBH.js.map} +0 -0
- /package/dist/dev/components/TTDDialog/{CodeMirrorEditor-CKDKMBXK.js.map → CodeMirrorEditor-VMD3K7XT.js.map} +0 -0
- /package/dist/dev/data/{image-2ZS4Q5UV.js.map → image-BO6UAI3G.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
define_import_meta_env_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-U7VL4U4T.js";
|
|
4
4
|
import {
|
|
5
5
|
__publicField
|
|
6
6
|
} from "./chunk-XDFCUUT6.js";
|
|
@@ -5085,7 +5085,7 @@ var parseFileContents = async (blob) => {
|
|
|
5085
5085
|
let contents;
|
|
5086
5086
|
if (blob.type === MIME_TYPES6.png) {
|
|
5087
5087
|
try {
|
|
5088
|
-
return await (await import("./data/image-
|
|
5088
|
+
return await (await import("./data/image-BO6UAI3G.js")).decodePngMetadata(blob);
|
|
5089
5089
|
} catch (error) {
|
|
5090
5090
|
if (error.message === "INVALID") {
|
|
5091
5091
|
throw new ImageSceneDataError(
|
|
@@ -5519,4 +5519,4 @@ export {
|
|
|
5519
5519
|
createFile,
|
|
5520
5520
|
normalizeFile
|
|
5521
5521
|
};
|
|
5522
|
-
//# sourceMappingURL=chunk-
|
|
5522
|
+
//# sourceMappingURL=chunk-NMAANOBH.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.
|
|
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.4-beta.2", DEV: true };
|
|
3
3
|
|
|
4
4
|
export {
|
|
5
5
|
define_import_meta_env_default
|
|
6
6
|
};
|
|
7
|
-
//# sourceMappingURL=chunk-
|
|
7
|
+
//# sourceMappingURL=chunk-U7VL4U4T.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["<define:import.meta.env>"],
|
|
4
4
|
"sourcesContent": [""],
|
|
5
|
-
"mappings": ";AAAA,uCAAC,MAAO,eAAc,6BAA8B,2CAA0C,8BAA+B,gDAA+C,sBAAuB,oCAAmC,0BAA2B,gFAA+E,wBAAyB,yBAAwB,kBAAmB,+BAA8B,mBAAoB,yBAAwB,qBAAsB,yBAAwB,0BAA2B,mRAA0S,kCAAmC,IAAG,0BAA2B,QAAO,cAAe,SAAQ,eAAgB,QAAO,mDAAoD,IAAG,2BAA4B,QAAO,wBAAyB,QAAO,qBAAsB,SAAQ,iCAAkC,wZAAuZ,iCAAkC,IAAG,UAAW,+BAA8B,aAAc,
|
|
5
|
+
"mappings": ";AAAA,uCAAC,MAAO,eAAc,6BAA8B,2CAA0C,8BAA+B,gDAA+C,sBAAuB,oCAAmC,0BAA2B,gFAA+E,wBAAyB,yBAAwB,kBAAmB,+BAA8B,mBAAoB,yBAAwB,qBAAsB,yBAAwB,0BAA2B,mRAA0S,kCAAmC,IAAG,0BAA2B,QAAO,cAAe,SAAQ,eAAgB,QAAO,mDAAoD,IAAG,2BAA4B,QAAO,wBAAyB,QAAO,qBAAsB,SAAQ,iCAAkC,wZAAuZ,iCAAkC,IAAG,UAAW,+BAA8B,aAAc,iBAAgB,KAAM,KAAI;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/dev/components/TTDDialog/{CodeMirrorEditor-CKDKMBXK.js → CodeMirrorEditor-VMD3K7XT.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-U7VL4U4T.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-VMD3K7XT.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-NMAANOBH.js";
|
|
6
|
+
import "../chunk-U7VL4U4T.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-BO6UAI3G.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-NMAANOBH.js";
|
|
69
69
|
import {
|
|
70
70
|
define_import_meta_env_default
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-U7VL4U4T.js";
|
|
72
72
|
import {
|
|
73
73
|
en_default
|
|
74
74
|
} from "./chunk-4JOINNOK.js";
|
|
@@ -233,7 +233,7 @@ import {
|
|
|
233
233
|
isBoundToContainer as isBoundToContainer9,
|
|
234
234
|
isFrameLikeElement as isFrameLikeElement15,
|
|
235
235
|
isImageElement as isImageElement9,
|
|
236
|
-
isEmbeddableElement as
|
|
236
|
+
isEmbeddableElement as isEmbeddableElement5,
|
|
237
237
|
isInitializedImageElement as isInitializedImageElement3,
|
|
238
238
|
isLinearElement as isLinearElement12,
|
|
239
239
|
isLinearElementType as isLinearElementType2,
|
|
@@ -7880,6 +7880,7 @@ import {
|
|
|
7880
7880
|
THEME as THEME5,
|
|
7881
7881
|
ZOOM_STEP,
|
|
7882
7882
|
getInteractiveZoomStep,
|
|
7883
|
+
getDisplayedZoomValue,
|
|
7883
7884
|
updateActiveTool as updateActiveTool2,
|
|
7884
7885
|
CODES as CODES2,
|
|
7885
7886
|
KEYS as KEYS12
|
|
@@ -8142,6 +8143,7 @@ var actionZoomIn = register({
|
|
|
8142
8143
|
icon: ZoomInIcon,
|
|
8143
8144
|
trackEvent: { category: "canvas" },
|
|
8144
8145
|
perform: (_elements, appState, _, app) => {
|
|
8146
|
+
const displayedZoomValue = getDisplayedZoomValue(appState.zoom.value);
|
|
8145
8147
|
return {
|
|
8146
8148
|
appState: {
|
|
8147
8149
|
...appState,
|
|
@@ -8150,7 +8152,7 @@ var actionZoomIn = register({
|
|
|
8150
8152
|
viewportX: appState.width / 2 + appState.offsetLeft,
|
|
8151
8153
|
viewportY: appState.height / 2 + appState.offsetTop,
|
|
8152
8154
|
nextZoom: getNormalizedZoom(
|
|
8153
|
-
|
|
8155
|
+
displayedZoomValue + getInteractiveZoomStep(appState.zoom.value, "in")
|
|
8154
8156
|
)
|
|
8155
8157
|
},
|
|
8156
8158
|
appState
|
|
@@ -8183,6 +8185,7 @@ var actionZoomOut = register({
|
|
|
8183
8185
|
viewMode: true,
|
|
8184
8186
|
trackEvent: { category: "canvas" },
|
|
8185
8187
|
perform: (_elements, appState, _, app) => {
|
|
8188
|
+
const displayedZoomValue = getDisplayedZoomValue(appState.zoom.value);
|
|
8186
8189
|
return {
|
|
8187
8190
|
appState: {
|
|
8188
8191
|
...appState,
|
|
@@ -8191,7 +8194,7 @@ var actionZoomOut = register({
|
|
|
8191
8194
|
viewportX: appState.width / 2 + appState.offsetLeft,
|
|
8192
8195
|
viewportY: appState.height / 2 + appState.offsetTop,
|
|
8193
8196
|
nextZoom: getNormalizedZoom(
|
|
8194
|
-
|
|
8197
|
+
displayedZoomValue - getInteractiveZoomStep(appState.zoom.value, "out")
|
|
8195
8198
|
)
|
|
8196
8199
|
},
|
|
8197
8200
|
appState
|
|
@@ -9636,7 +9639,7 @@ var exportCanvas = async (type, elements, appState, files, {
|
|
|
9636
9639
|
let blob = canvasToBlob(tempCanvas);
|
|
9637
9640
|
if (appState.exportEmbedScene) {
|
|
9638
9641
|
blob = blob.then(
|
|
9639
|
-
(blob2) => import("./data/image-
|
|
9642
|
+
(blob2) => import("./data/image-BO6UAI3G.js").then(
|
|
9640
9643
|
({ encodePngMetadata: encodePngMetadata2 }) => encodePngMetadata2({
|
|
9641
9644
|
blob: blob2,
|
|
9642
9645
|
metadata: serializeAsJSON(elements, appState, files, "local")
|
|
@@ -17930,11 +17933,20 @@ var ShapesSwitcher = ({
|
|
|
17930
17933
|
var ZoomActions = ({
|
|
17931
17934
|
renderAction,
|
|
17932
17935
|
zoom
|
|
17933
|
-
}) => /* @__PURE__ */ jsx76(
|
|
17934
|
-
|
|
17935
|
-
|
|
17936
|
-
|
|
17937
|
-
|
|
17936
|
+
}) => /* @__PURE__ */ jsx76(
|
|
17937
|
+
"div",
|
|
17938
|
+
{
|
|
17939
|
+
className: CLASSES5.ZOOM_ACTIONS,
|
|
17940
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
17941
|
+
onClick: (event) => event.stopPropagation(),
|
|
17942
|
+
onDoubleClick: (event) => event.stopPropagation(),
|
|
17943
|
+
children: /* @__PURE__ */ jsx76(Stack_default.Col, { gap: 1, children: /* @__PURE__ */ jsxs43(Stack_default.Row, { align: "center", children: [
|
|
17944
|
+
renderAction("zoomOut"),
|
|
17945
|
+
renderAction("resetZoom"),
|
|
17946
|
+
renderAction("zoomIn")
|
|
17947
|
+
] }) })
|
|
17948
|
+
}
|
|
17949
|
+
);
|
|
17938
17950
|
var UndoRedoActions = ({
|
|
17939
17951
|
renderAction,
|
|
17940
17952
|
className
|
|
@@ -28487,7 +28499,7 @@ var TTDDialogInput = ({
|
|
|
28487
28499
|
setShowSpinner(true);
|
|
28488
28500
|
}
|
|
28489
28501
|
}, SPINNER_DELAY_MS);
|
|
28490
|
-
import("./components/TTDDialog/CodeMirrorEditor-
|
|
28502
|
+
import("./components/TTDDialog/CodeMirrorEditor-VMD3K7XT.js").then((mod) => {
|
|
28491
28503
|
if (!cancelled) {
|
|
28492
28504
|
setEditorState({ type: "ready", component: mod.default });
|
|
28493
28505
|
}
|
|
@@ -35200,6 +35212,7 @@ import {
|
|
|
35200
35212
|
isArrowElement as isArrowElement13,
|
|
35201
35213
|
isBindableElement as isBindableElement2,
|
|
35202
35214
|
isElbowArrow as isElbowArrow9,
|
|
35215
|
+
isEmbeddableElement as isEmbeddableElement4,
|
|
35203
35216
|
isFrameLikeElement as isFrameLikeElement14,
|
|
35204
35217
|
isImageElement as isImageElement8,
|
|
35205
35218
|
isLinearElement as isLinearElement11,
|
|
@@ -35967,8 +35980,12 @@ var renderSelectionBorder = (context, appState, elementProperties) => {
|
|
|
35967
35980
|
cx,
|
|
35968
35981
|
cy,
|
|
35969
35982
|
dashed,
|
|
35970
|
-
activeEmbeddable
|
|
35983
|
+
activeEmbeddable,
|
|
35984
|
+
skipBorder
|
|
35971
35985
|
} = elementProperties;
|
|
35986
|
+
if (skipBorder) {
|
|
35987
|
+
return;
|
|
35988
|
+
}
|
|
35972
35989
|
const elementWidth = x2 - x1;
|
|
35973
35990
|
const elementHeight = y2 - y1;
|
|
35974
35991
|
const padding = elementProperties.padding ?? DEFAULT_TRANSFORM_HANDLE_SPACING2 * 2;
|
|
@@ -36599,6 +36616,7 @@ var _renderInteractiveScene = ({
|
|
|
36599
36616
|
cx,
|
|
36600
36617
|
cy,
|
|
36601
36618
|
activeEmbeddable: appState.activeEmbeddable?.element === element && appState.activeEmbeddable.state === "active",
|
|
36619
|
+
skipBorder: isEmbeddableElement4(element),
|
|
36602
36620
|
padding: element.id === appState.croppingElementId || isImageElement8(element) ? 0 : void 0
|
|
36603
36621
|
});
|
|
36604
36622
|
}
|
|
@@ -37607,7 +37625,7 @@ var App = class _App extends React46.Component {
|
|
|
37607
37625
|
const iframeLikes = /* @__PURE__ */ new Set();
|
|
37608
37626
|
let updated = false;
|
|
37609
37627
|
this.scene.getNonDeletedElements().filter((element) => {
|
|
37610
|
-
if (
|
|
37628
|
+
if (isEmbeddableElement5(element)) {
|
|
37611
37629
|
iframeLikes.add(element.id);
|
|
37612
37630
|
if (!this.embedsValidationStatus.has(element.id)) {
|
|
37613
37631
|
updated = true;
|
|
@@ -39716,6 +39734,21 @@ var App = class _App extends React46.Component {
|
|
|
39716
39734
|
event,
|
|
39717
39735
|
this.state
|
|
39718
39736
|
);
|
|
39737
|
+
const hitElement = this.getElementAtPosition(sceneX, sceneY);
|
|
39738
|
+
if (hitElement && (isImageElement9(hitElement) || isFrameLikeElement15(hitElement) || isEmbeddableElement5(hitElement))) {
|
|
39739
|
+
this.scrollToContent(hitElement, {
|
|
39740
|
+
animate: true,
|
|
39741
|
+
duration: 500,
|
|
39742
|
+
fitToViewport: true,
|
|
39743
|
+
viewportZoomFactor: 0.6,
|
|
39744
|
+
minZoom: this.state.zoom.value + getInteractiveZoomStep2(this.state.zoom.value, "in"),
|
|
39745
|
+
canvasOffsets: this.getEditorUIOffsets()
|
|
39746
|
+
});
|
|
39747
|
+
return;
|
|
39748
|
+
}
|
|
39749
|
+
if (hitElement) {
|
|
39750
|
+
return;
|
|
39751
|
+
}
|
|
39719
39752
|
if (selectedElements.length === 1 && isLinearElement12(selectedElements[0])) {
|
|
39720
39753
|
const selectedLinearElement = selectedElements[0];
|
|
39721
39754
|
if ((event[KEYS55.CTRL_OR_CMD] && isSimpleArrow(selectedLinearElement) || isLineElement8(selectedLinearElement)) && (!this.state.selectedLinearElement?.isEditing || this.state.selectedLinearElement.elementId !== selectedLinearElement.id)) {
|
|
@@ -39776,25 +39809,11 @@ var App = class _App extends React46.Component {
|
|
|
39776
39809
|
return;
|
|
39777
39810
|
}
|
|
39778
39811
|
}
|
|
39779
|
-
if (selectedElements.length === 1 && isImageElement9(selectedElements[0])) {
|
|
39780
|
-
this.startImageCropping(selectedElements[0]);
|
|
39781
|
-
return;
|
|
39782
|
-
}
|
|
39783
|
-
if (selectedElements.length === 1 && isFrameLikeElement15(selectedElements[0])) {
|
|
39784
|
-
this.scrollToContent(selectedElements[0], {
|
|
39785
|
-
animate: true,
|
|
39786
|
-
duration: 500,
|
|
39787
|
-
viewportZoomFactor: 0.6,
|
|
39788
|
-
fitToViewport: true,
|
|
39789
|
-
canvasOffsets: this.getEditorUIOffsets()
|
|
39790
|
-
});
|
|
39791
|
-
return;
|
|
39792
|
-
}
|
|
39793
39812
|
resetCursor(this.interactiveCanvas);
|
|
39794
39813
|
const selectedGroupIds = getSelectedGroupIds4(this.state);
|
|
39795
39814
|
if (selectedGroupIds.length > 0) {
|
|
39796
|
-
const
|
|
39797
|
-
const selectedGroupId =
|
|
39815
|
+
const hitElement2 = this.getElementAtPosition(sceneX, sceneY);
|
|
39816
|
+
const selectedGroupId = hitElement2 && getSelectedGroupIdForElement(hitElement2, this.state.selectedGroupIds);
|
|
39798
39817
|
if (selectedGroupId) {
|
|
39799
39818
|
this.store.scheduleCapture();
|
|
39800
39819
|
this.setState((prevState) => ({
|
|
@@ -39802,7 +39821,7 @@ var App = class _App extends React46.Component {
|
|
|
39802
39821
|
...selectGroupsForSelectedElements7(
|
|
39803
39822
|
{
|
|
39804
39823
|
editingGroupId: selectedGroupId,
|
|
39805
|
-
selectedElementIds: { [
|
|
39824
|
+
selectedElementIds: { [hitElement2.id]: true }
|
|
39806
39825
|
},
|
|
39807
39826
|
this.scene.getNonDeletedElements(),
|
|
39808
39827
|
prevState,
|
|
@@ -39814,10 +39833,10 @@ var App = class _App extends React46.Component {
|
|
|
39814
39833
|
}
|
|
39815
39834
|
resetCursor(this.interactiveCanvas);
|
|
39816
39835
|
if (!event[KEYS55.CTRL_OR_CMD] && !this.state.viewModeEnabled) {
|
|
39817
|
-
const
|
|
39818
|
-
if (isIframeLikeElement2(
|
|
39836
|
+
const hitElement2 = this.getElementAtPosition(sceneX, sceneY);
|
|
39837
|
+
if (isIframeLikeElement2(hitElement2)) {
|
|
39819
39838
|
this.setState({
|
|
39820
|
-
activeEmbeddable: { element:
|
|
39839
|
+
activeEmbeddable: { element: hitElement2, state: "active" }
|
|
39821
39840
|
});
|
|
39822
39841
|
return;
|
|
39823
39842
|
}
|
|
@@ -40364,7 +40383,7 @@ var App = class _App extends React46.Component {
|
|
|
40364
40383
|
if (isLaserTool) {
|
|
40365
40384
|
return;
|
|
40366
40385
|
}
|
|
40367
|
-
if (hitElement && (hitElement.link ||
|
|
40386
|
+
if (hitElement && (hitElement.link || isEmbeddableElement5(hitElement)) && this.state.selectedElementIds[hitElement.id] && !this.state.contextMenu && !this.state.showHyperlinkPopup) {
|
|
40368
40387
|
this.setState({ showHyperlinkPopup: "info" });
|
|
40369
40388
|
} else if (this.state.activeTool.type === "text") {
|
|
40370
40389
|
setCursor(
|
|
@@ -40681,7 +40700,7 @@ var App = class _App extends React46.Component {
|
|
|
40681
40700
|
prevState,
|
|
40682
40701
|
this
|
|
40683
40702
|
),
|
|
40684
|
-
showHyperlinkPopup: hitElement.link ||
|
|
40703
|
+
showHyperlinkPopup: hitElement.link || isEmbeddableElement5(hitElement) ? "info" : false
|
|
40685
40704
|
};
|
|
40686
40705
|
});
|
|
40687
40706
|
pointerDownState.hit.wasAddedToSelection = true;
|
|
@@ -41182,7 +41201,7 @@ var App = class _App extends React46.Component {
|
|
|
41182
41201
|
prevState,
|
|
41183
41202
|
this
|
|
41184
41203
|
),
|
|
41185
|
-
showHyperlinkPopup: hitElement.link ||
|
|
41204
|
+
showHyperlinkPopup: hitElement.link || isEmbeddableElement5(hitElement) ? "info" : false
|
|
41186
41205
|
};
|
|
41187
41206
|
});
|
|
41188
41207
|
pointerDownState.hit.wasAddedToSelection = true;
|
|
@@ -42547,7 +42566,10 @@ var App = class _App extends React46.Component {
|
|
|
42547
42566
|
const { deltaX, deltaY } = event;
|
|
42548
42567
|
if (event.metaKey || event.ctrlKey) {
|
|
42549
42568
|
const sign = Math.sign(deltaY);
|
|
42550
|
-
const MAX_STEP = getInteractiveZoomStep2(
|
|
42569
|
+
const MAX_STEP = getInteractiveZoomStep2(
|
|
42570
|
+
this.state.zoom.value,
|
|
42571
|
+
sign > 0 ? "out" : "in"
|
|
42572
|
+
) * 100;
|
|
42551
42573
|
const absDelta = Math.abs(deltaY);
|
|
42552
42574
|
let delta = deltaY;
|
|
42553
42575
|
if (absDelta > MAX_STEP) {
|
|
@@ -43125,7 +43147,7 @@ var App = class _App extends React46.Component {
|
|
|
43125
43147
|
const normalizedWidth = this.state.width;
|
|
43126
43148
|
const normalizedHeight = this.state.height;
|
|
43127
43149
|
const embeddableElements = this.scene.getNonDeletedElements().filter(
|
|
43128
|
-
(el) =>
|
|
43150
|
+
(el) => isEmbeddableElement5(el) && this.embedsValidationStatus.get(el.id) === true || isIframeElement2(el)
|
|
43129
43151
|
);
|
|
43130
43152
|
return /* @__PURE__ */ jsx162(Fragment28, { children: embeddableElements.map((el) => {
|
|
43131
43153
|
const { x, y } = sceneCoordsToViewportCoords7(
|
|
@@ -43323,7 +43345,7 @@ var App = class _App extends React46.Component {
|
|
|
43323
43345
|
style: {
|
|
43324
43346
|
padding: `${el.strokeWidth}px`
|
|
43325
43347
|
},
|
|
43326
|
-
children: (
|
|
43348
|
+
children: (isEmbeddableElement5(el) ? this.props.renderEmbeddable?.(el, this.state) : null) ?? /* @__PURE__ */ jsx162(
|
|
43327
43349
|
"iframe",
|
|
43328
43350
|
{
|
|
43329
43351
|
ref: (ref) => this.cacheEmbeddableRef(el, ref),
|
|
@@ -45500,7 +45522,7 @@ var App = class _App extends React46.Component {
|
|
|
45500
45522
|
elementsWithinSelection[0],
|
|
45501
45523
|
this.scene.getNonDeletedElementsMap()
|
|
45502
45524
|
) : null,
|
|
45503
|
-
showHyperlinkPopup: elementsWithinSelection.length === 1 && (elementsWithinSelection[0].link ||
|
|
45525
|
+
showHyperlinkPopup: elementsWithinSelection.length === 1 && (elementsWithinSelection[0].link || isEmbeddableElement5(elementsWithinSelection[0])) ? "info" : false
|
|
45504
45526
|
};
|
|
45505
45527
|
});
|
|
45506
45528
|
}
|
|
@@ -46112,7 +46134,7 @@ var App = class _App extends React46.Component {
|
|
|
46112
46134
|
prevState,
|
|
46113
46135
|
this
|
|
46114
46136
|
),
|
|
46115
|
-
showHyperlinkPopup: hitElement.link ||
|
|
46137
|
+
showHyperlinkPopup: hitElement.link || isEmbeddableElement5(hitElement) ? "info" : false
|
|
46116
46138
|
};
|
|
46117
46139
|
});
|
|
46118
46140
|
} else {
|
|
@@ -46198,7 +46220,7 @@ var App = class _App extends React46.Component {
|
|
|
46198
46220
|
},
|
|
46199
46221
|
prevState
|
|
46200
46222
|
),
|
|
46201
|
-
showHyperlinkPopup:
|
|
46223
|
+
showHyperlinkPopup: isEmbeddableElement5(newElement7) && !newElement7.link ? "editor" : prevState.showHyperlinkPopup
|
|
46202
46224
|
}));
|
|
46203
46225
|
}
|
|
46204
46226
|
if (activeTool.type !== "selection" || isSomeElementSelected(this.scene.getNonDeletedElements(), this.state) || !isShallowEqual9(
|