@myoc/excalidraw 0.19.532 → 0.19.533
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/CHANGELOG.md +107 -0
- package/dist/dev/{chunk-ASAPRLCW.js → chunk-5CVRJMG3.js} +2 -2
- package/dist/dev/{chunk-ITMOGRAW.js → chunk-AR7I2OPB.js} +23 -8
- package/dist/dev/chunk-AR7I2OPB.js.map +7 -0
- package/dist/dev/data/{image-S7APFFV6.js → image-XXT3R6SF.js} +3 -3
- package/dist/dev/index.css +239 -0
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +1294 -591
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/{chunk-GSRXJLOQ.js → chunk-6D6KWUBN.js} +1 -1
- package/dist/prod/chunk-AS35EYHE.js +4 -0
- package/dist/prod/data/image-6PNCNKLO.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +13 -13
- 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 +1 -0
- package/dist/types/element/src/gif.d.ts +29 -0
- package/dist/types/element/src/image.d.ts +6 -1
- package/dist/types/element/src/index.d.ts +2 -0
- package/dist/types/element/src/newElement.d.ts +1 -0
- package/dist/types/element/src/renderGif.d.ts +5 -0
- package/dist/types/element/src/types.d.ts +12 -0
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +6 -6
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionExport.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionFrame.d.ts +4 -3
- package/dist/types/excalidraw/actions/actionGroup.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionLink.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionProperties.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionStyles.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -1
- package/dist/types/excalidraw/components/App.d.ts +8 -1
- package/dist/types/excalidraw/components/App.gif.d.ts +18 -0
- package/dist/types/excalidraw/components/GifPlaybackControls.d.ts +10 -0
- package/dist/types/excalidraw/components/icons.d.ts +4 -0
- package/dist/types/excalidraw/data/blob.d.ts +2 -2
- package/dist/types/excalidraw/data/json.d.ts +1 -1
- package/dist/types/excalidraw/data/restoreGif.d.ts +4 -0
- package/dist/types/excalidraw/scene/Renderer.d.ts +1 -0
- package/dist/types/excalidraw/scene/types.d.ts +2 -1
- package/dist/types/excalidraw/types.d.ts +12 -2
- package/dist/types/excalidraw/viewport.d.ts +1 -1
- package/package.json +5 -5
- package/dist/dev/chunk-ITMOGRAW.js.map +0 -7
- package/dist/prod/chunk-U3WBDUKM.js +0 -4
- package/dist/prod/data/image-MWFLMJV7.js +0 -1
- /package/dist/dev/{chunk-ASAPRLCW.js.map → chunk-5CVRJMG3.js.map} +0 -0
- /package/dist/dev/data/{image-S7APFFV6.js.map → image-XXT3R6SF.js.map} +0 -0
package/dist/dev/index.js
CHANGED
|
@@ -63,10 +63,10 @@ import {
|
|
|
63
63
|
serializeAsJSON,
|
|
64
64
|
strokeRectWithRotation_simple,
|
|
65
65
|
zoomToFitBounds
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-AR7I2OPB.js";
|
|
67
67
|
import {
|
|
68
68
|
define_import_meta_env_default
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-5CVRJMG3.js";
|
|
70
70
|
import {
|
|
71
71
|
en_default
|
|
72
72
|
} from "./chunk-SKCAT7JG.js";
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
} from "./chunk-XDFCUUT6.js";
|
|
81
81
|
|
|
82
82
|
// index.tsx
|
|
83
|
-
import
|
|
83
|
+
import React43, {
|
|
84
84
|
useCallback as useCallback13,
|
|
85
85
|
useContext as useContext5,
|
|
86
86
|
useEffect as useEffect40,
|
|
@@ -96,9 +96,9 @@ import {
|
|
|
96
96
|
} from "@excalidraw/common";
|
|
97
97
|
|
|
98
98
|
// components/App.tsx
|
|
99
|
-
import
|
|
99
|
+
import clsx61 from "clsx";
|
|
100
100
|
import throttle3 from "lodash.throttle";
|
|
101
|
-
import
|
|
101
|
+
import React41, { useContext as useContext4 } from "react";
|
|
102
102
|
import { flushSync as flushSync2 } from "react-dom";
|
|
103
103
|
import rough3 from "roughjs/bin/rough";
|
|
104
104
|
import { nanoid } from "nanoid";
|
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
IMAGE_MIME_TYPES as IMAGE_MIME_TYPES2,
|
|
135
135
|
IMAGE_RENDER_TIMEOUT,
|
|
136
136
|
LINE_CONFIRM_THRESHOLD as LINE_CONFIRM_THRESHOLD2,
|
|
137
|
-
MIME_TYPES as
|
|
137
|
+
MIME_TYPES as MIME_TYPES11,
|
|
138
138
|
MQ_RIGHT_SIDEBAR_MIN_WIDTH,
|
|
139
139
|
POINTER_BUTTON as POINTER_BUTTON2,
|
|
140
140
|
ROUNDNESS as ROUNDNESS8,
|
|
@@ -166,7 +166,7 @@ import {
|
|
|
166
166
|
isInputLike,
|
|
167
167
|
isToolIcon,
|
|
168
168
|
isWritableElement as isWritableElement4,
|
|
169
|
-
sceneCoordsToViewportCoords as
|
|
169
|
+
sceneCoordsToViewportCoords as sceneCoordsToViewportCoords7,
|
|
170
170
|
tupleToCoors,
|
|
171
171
|
viewportCoordsToSceneCoords as viewportCoordsToSceneCoords3,
|
|
172
172
|
wrapEvent as wrapEvent2,
|
|
@@ -206,7 +206,7 @@ import {
|
|
|
206
206
|
} from "@excalidraw/common";
|
|
207
207
|
import {
|
|
208
208
|
getObservedAppState as getObservedAppState2,
|
|
209
|
-
getCommonBounds as
|
|
209
|
+
getCommonBounds as getCommonBounds14,
|
|
210
210
|
getElementAbsoluteCoords as getElementAbsoluteCoords8,
|
|
211
211
|
bindOrUnbindBindingElements as bindOrUnbindBindingElements2,
|
|
212
212
|
fixBindingsAfterDeletion as fixBindingsAfterDeletion2,
|
|
@@ -214,7 +214,7 @@ import {
|
|
|
214
214
|
isBindingEnabled as isBindingEnabled3,
|
|
215
215
|
updateBoundElements as updateBoundElements6,
|
|
216
216
|
LinearElementEditor as LinearElementEditor12,
|
|
217
|
-
newElementWith as
|
|
217
|
+
newElementWith as newElementWith11,
|
|
218
218
|
newFrameElement as newFrameElement3,
|
|
219
219
|
newFreeDrawElement,
|
|
220
220
|
newEmbeddableElement,
|
|
@@ -236,7 +236,7 @@ import {
|
|
|
236
236
|
isFrameLikeElement as isFrameLikeElement17,
|
|
237
237
|
isImageElement as isImageElement9,
|
|
238
238
|
isEmbeddableElement as isEmbeddableElement4,
|
|
239
|
-
isInitializedImageElement as
|
|
239
|
+
isInitializedImageElement as isInitializedImageElement5,
|
|
240
240
|
isLinearElement as isLinearElement11,
|
|
241
241
|
isLinearElementType as isLinearElementType2,
|
|
242
242
|
isUsingAdaptiveRadius as isUsingAdaptiveRadius5,
|
|
@@ -294,7 +294,7 @@ import {
|
|
|
294
294
|
getApproxMinLineWidth as getApproxMinLineWidth3,
|
|
295
295
|
getApproxMinLineHeight as getApproxMinLineHeight2,
|
|
296
296
|
getMinTextElementWidth as getMinTextElementWidth2,
|
|
297
|
-
ShapeCache as
|
|
297
|
+
ShapeCache as ShapeCache7,
|
|
298
298
|
getRenderOpacity,
|
|
299
299
|
editGroupForSelectedElement,
|
|
300
300
|
getElementsInGroup as getElementsInGroup12,
|
|
@@ -638,6 +638,10 @@ var PlusIcon = createIcon(
|
|
|
638
638
|
] }),
|
|
639
639
|
tablerIconProps
|
|
640
640
|
);
|
|
641
|
+
var CirclePauseIcon = createIcon(
|
|
642
|
+
"M320 112C434.9 112 528 205.1 528 320C528 434.9 434.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM288 248C288 234.7 277.3 224 264 224C250.7 224 240 234.7 240 248L240 392C240 405.3 250.7 416 264 416C277.3 416 288 405.3 288 392L288 248zM400 248C400 234.7 389.3 224 376 224C362.7 224 352 234.7 352 248L352 392C352 405.3 362.7 416 376 416C389.3 416 400 405.3 400 392L400 248z",
|
|
643
|
+
640
|
|
644
|
+
);
|
|
641
645
|
var DotsIcon = createIcon(
|
|
642
646
|
/* @__PURE__ */ jsxs("g", { strokeWidth: "1.5", children: [
|
|
643
647
|
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
@@ -2482,6 +2486,33 @@ var playerStopFilledIcon = createIcon(
|
|
|
2482
2486
|
] }),
|
|
2483
2487
|
tablerIconProps
|
|
2484
2488
|
);
|
|
2489
|
+
var prevFrame = createIcon(
|
|
2490
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2491
|
+
/* @__PURE__ */ jsx("path", { d: "M7 5v14" }),
|
|
2492
|
+
/* @__PURE__ */ jsx("path", { d: "M19 6l-9 6l9 6z" })
|
|
2493
|
+
] }),
|
|
2494
|
+
tablerIconProps
|
|
2495
|
+
);
|
|
2496
|
+
var nextFrame = createIcon(
|
|
2497
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2498
|
+
/* @__PURE__ */ jsx("path", { d: "M17 5v14" }),
|
|
2499
|
+
/* @__PURE__ */ jsx("path", { d: "M5 6l9 6l-9 6z" })
|
|
2500
|
+
] }),
|
|
2501
|
+
tablerIconProps
|
|
2502
|
+
);
|
|
2503
|
+
var frames = createIcon(
|
|
2504
|
+
/* @__PURE__ */ jsxs("g", { strokeWidth: 1.25, children: [
|
|
2505
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
2506
|
+
/* @__PURE__ */ jsx("path", { d: "M4 6h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10a1 1 0 0 1 1 -1z" }),
|
|
2507
|
+
/* @__PURE__ */ jsx("path", { d: "M7 6v12" }),
|
|
2508
|
+
/* @__PURE__ */ jsx("path", { d: "M17 6v12" }),
|
|
2509
|
+
/* @__PURE__ */ jsx("path", { d: "M3 10h4" }),
|
|
2510
|
+
/* @__PURE__ */ jsx("path", { d: "M3 14h4" }),
|
|
2511
|
+
/* @__PURE__ */ jsx("path", { d: "M17 10h4" }),
|
|
2512
|
+
/* @__PURE__ */ jsx("path", { d: "M17 14h4" })
|
|
2513
|
+
] }),
|
|
2514
|
+
tablerIconProps
|
|
2515
|
+
);
|
|
2485
2516
|
var tablerCheckIcon = createIcon(
|
|
2486
2517
|
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2487
2518
|
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
@@ -10937,7 +10968,7 @@ var exportCanvas = async (type, elements, appState, files, {
|
|
|
10937
10968
|
let blob = canvasToBlob(tempCanvas);
|
|
10938
10969
|
if (appState.exportEmbedScene) {
|
|
10939
10970
|
blob = blob.then(
|
|
10940
|
-
(blob2) => import("./data/image-
|
|
10971
|
+
(blob2) => import("./data/image-XXT3R6SF.js").then(
|
|
10941
10972
|
({ encodePngMetadata: encodePngMetadata2 }) => encodePngMetadata2({
|
|
10942
10973
|
blob: blob2,
|
|
10943
10974
|
metadata: serializeAsJSON(elements, appState, files, "local")
|
|
@@ -15033,8 +15064,15 @@ import { invariant as invariant9 } from "@excalidraw/common";
|
|
|
15033
15064
|
import { arrayToMap as arrayToMap23, findIndex, findLastIndex as findLastIndex2 } from "@excalidraw/common";
|
|
15034
15065
|
import { isFiniteNumber } from "@excalidraw/math";
|
|
15035
15066
|
|
|
15067
|
+
// ../element/src/gif.ts
|
|
15068
|
+
import { decode, decodeFrames } from "modern-gif";
|
|
15069
|
+
|
|
15036
15070
|
// ../element/src/image.ts
|
|
15037
|
-
import {
|
|
15071
|
+
import {
|
|
15072
|
+
DEFAULT_GIF_AUTO_DECODE_MAX_FILE_SIZE_BYTES,
|
|
15073
|
+
MIME_TYPES as MIME_TYPES4,
|
|
15074
|
+
SVG_NS
|
|
15075
|
+
} from "@excalidraw/common";
|
|
15038
15076
|
import { rgbaToThumbHash, thumbHashToRGBA } from "thumbhash";
|
|
15039
15077
|
|
|
15040
15078
|
// ../element/src/resizeElements.ts
|
|
@@ -24432,6 +24470,125 @@ var AppFlowchart = class _AppFlowchart {
|
|
|
24432
24470
|
}
|
|
24433
24471
|
};
|
|
24434
24472
|
|
|
24473
|
+
// components/App.gif.ts
|
|
24474
|
+
import {
|
|
24475
|
+
createGifPlaybackMetadata,
|
|
24476
|
+
hasPlayableGif,
|
|
24477
|
+
isInitializedImageElement as isInitializedImageElement3,
|
|
24478
|
+
newElementWith as newElementWith10,
|
|
24479
|
+
ShapeCache as ShapeCache4
|
|
24480
|
+
} from "@excalidraw/element";
|
|
24481
|
+
import { MIME_TYPES as MIME_TYPES8 } from "@excalidraw/common";
|
|
24482
|
+
var AppGifPlayback = class {
|
|
24483
|
+
constructor(app) {
|
|
24484
|
+
this.app = app;
|
|
24485
|
+
__publicField(this, "playbackRaf", null);
|
|
24486
|
+
__publicField(this, "runtimeState", /* @__PURE__ */ new Map());
|
|
24487
|
+
__publicField(this, "stop", () => {
|
|
24488
|
+
if (this.playbackRaf !== null) {
|
|
24489
|
+
cancelAnimationFrame(this.playbackRaf);
|
|
24490
|
+
this.playbackRaf = null;
|
|
24491
|
+
}
|
|
24492
|
+
this.runtimeState.clear();
|
|
24493
|
+
});
|
|
24494
|
+
__publicField(this, "getFrameIndex", (element) => element.gifPlayback?.playing ? this.runtimeState.get(element.id)?.frameIndex ?? element.gifPlayback.frameIndex : element.gifPlayback?.frameIndex);
|
|
24495
|
+
__publicField(this, "setFrameIndex", (element, frameIndex) => {
|
|
24496
|
+
this.runtimeState.set(element.id, {
|
|
24497
|
+
frameIndex,
|
|
24498
|
+
lastFrameTime: performance.now()
|
|
24499
|
+
});
|
|
24500
|
+
});
|
|
24501
|
+
__publicField(this, "ensureLoop", () => {
|
|
24502
|
+
if (this.playbackRaf !== null || this.app.unmounted) {
|
|
24503
|
+
return;
|
|
24504
|
+
}
|
|
24505
|
+
if (!hasPlayableGif(
|
|
24506
|
+
this.app.scene.getNonDeletedElements(),
|
|
24507
|
+
this.app.imageCache
|
|
24508
|
+
)) {
|
|
24509
|
+
return;
|
|
24510
|
+
}
|
|
24511
|
+
this.playbackRaf = requestAnimationFrame(this.tick);
|
|
24512
|
+
});
|
|
24513
|
+
__publicField(this, "createPlaceholderDecodeState", (placeholderImageElement, imageFile) => {
|
|
24514
|
+
if (imageFile.type !== MIME_TYPES8.gif) {
|
|
24515
|
+
return null;
|
|
24516
|
+
}
|
|
24517
|
+
const placeholderGifFileId = placeholderImageElement.id;
|
|
24518
|
+
this.app.imageCache.set(placeholderGifFileId, {
|
|
24519
|
+
image: new Promise(() => {
|
|
24520
|
+
}),
|
|
24521
|
+
mimeType: MIME_TYPES8.gif,
|
|
24522
|
+
gifDecodeStatus: "pending"
|
|
24523
|
+
});
|
|
24524
|
+
const gifPlaceholder = newElementWith10(placeholderImageElement, {
|
|
24525
|
+
fileId: placeholderGifFileId,
|
|
24526
|
+
gifPlayback: createGifPlaybackMetadata({ playing: true })
|
|
24527
|
+
});
|
|
24528
|
+
this.app.scene.replaceAllElements(
|
|
24529
|
+
this.app.scene.getElementsIncludingDeleted().map(
|
|
24530
|
+
(element) => element.id === gifPlaceholder.id ? gifPlaceholder : element
|
|
24531
|
+
)
|
|
24532
|
+
);
|
|
24533
|
+
this.app.imagePlaceholderUpdateEmitter.trigger();
|
|
24534
|
+
return placeholderGifFileId;
|
|
24535
|
+
});
|
|
24536
|
+
__publicField(this, "ensureElementPlaybackMetadata", (element, opts = {}) => {
|
|
24537
|
+
const shouldUseExisting = element.gifPlayback && (opts.playing === void 0 || element.gifPlayback.playing === opts.playing);
|
|
24538
|
+
return shouldUseExisting ? element : newElementWith10(element, {
|
|
24539
|
+
gifPlayback: element.gifPlayback ? {
|
|
24540
|
+
...element.gifPlayback,
|
|
24541
|
+
playing: opts.playing ?? element.gifPlayback.playing
|
|
24542
|
+
} : createGifPlaybackMetadata(opts)
|
|
24543
|
+
});
|
|
24544
|
+
});
|
|
24545
|
+
__publicField(this, "removePlaceholderDecodeState", (placeholderGifFileId) => {
|
|
24546
|
+
if (placeholderGifFileId) {
|
|
24547
|
+
this.app.imageCache.delete(placeholderGifFileId);
|
|
24548
|
+
}
|
|
24549
|
+
});
|
|
24550
|
+
__publicField(this, "tick", () => {
|
|
24551
|
+
this.playbackRaf = null;
|
|
24552
|
+
if (this.app.unmounted) {
|
|
24553
|
+
return;
|
|
24554
|
+
}
|
|
24555
|
+
const now = performance.now();
|
|
24556
|
+
let didAdvanceFrame = false;
|
|
24557
|
+
let shouldContinue = false;
|
|
24558
|
+
for (const element of this.app.scene.getNonDeletedElements()) {
|
|
24559
|
+
if (!isInitializedImageElement3(element) || !element.gifPlayback?.playing) {
|
|
24560
|
+
continue;
|
|
24561
|
+
}
|
|
24562
|
+
const gif = this.app.imageCache.get(element.fileId)?.gif;
|
|
24563
|
+
if (!gif || gif.frames.length < 2) {
|
|
24564
|
+
continue;
|
|
24565
|
+
}
|
|
24566
|
+
shouldContinue = true;
|
|
24567
|
+
const speed = Math.max(element.gifPlayback.speed || 1, 0.1);
|
|
24568
|
+
const runtimeState = this.runtimeState.get(element.id) ?? {
|
|
24569
|
+
frameIndex: element.gifPlayback.frameIndex,
|
|
24570
|
+
lastFrameTime: now
|
|
24571
|
+
};
|
|
24572
|
+
this.runtimeState.set(element.id, runtimeState);
|
|
24573
|
+
const currentFrameIndex = runtimeState.frameIndex;
|
|
24574
|
+
const delay = gif.delays[currentFrameIndex] ?? 100;
|
|
24575
|
+
if (now - runtimeState.lastFrameTime >= delay / speed) {
|
|
24576
|
+
runtimeState.frameIndex = (currentFrameIndex + 1) % gif.frames.length;
|
|
24577
|
+
runtimeState.lastFrameTime = now;
|
|
24578
|
+
ShapeCache4.delete(element);
|
|
24579
|
+
didAdvanceFrame = true;
|
|
24580
|
+
}
|
|
24581
|
+
}
|
|
24582
|
+
if (didAdvanceFrame) {
|
|
24583
|
+
this.app.scene.triggerUpdate();
|
|
24584
|
+
}
|
|
24585
|
+
if (shouldContinue) {
|
|
24586
|
+
this.playbackRaf = requestAnimationFrame(this.tick);
|
|
24587
|
+
}
|
|
24588
|
+
});
|
|
24589
|
+
}
|
|
24590
|
+
};
|
|
24591
|
+
|
|
24435
24592
|
// components/App.viewport.ts
|
|
24436
24593
|
import {
|
|
24437
24594
|
debounce as debounce2,
|
|
@@ -25411,17 +25568,16 @@ var ViewportStatusBadge = ({
|
|
|
25411
25568
|
};
|
|
25412
25569
|
|
|
25413
25570
|
// components/LayerUI.tsx
|
|
25414
|
-
import
|
|
25415
|
-
import
|
|
25571
|
+
import clsx59 from "clsx";
|
|
25572
|
+
import React38 from "react";
|
|
25416
25573
|
import {
|
|
25417
25574
|
CLASSES as CLASSES9,
|
|
25418
25575
|
TOOL_TYPE as TOOL_TYPE2,
|
|
25419
25576
|
arrayToMap as arrayToMap33,
|
|
25420
25577
|
isShallowEqual as isShallowEqual6
|
|
25421
25578
|
} from "@excalidraw/common";
|
|
25422
|
-
import { mutateElement as mutateElement6 } from "@excalidraw/element";
|
|
25579
|
+
import { mutateElement as mutateElement6, ShapeCache as ShapeCache6 } from "@excalidraw/element";
|
|
25423
25580
|
import { showSelectedShapeActions } from "@excalidraw/element";
|
|
25424
|
-
import { ShapeCache as ShapeCache4 } from "@excalidraw/element";
|
|
25425
25581
|
|
|
25426
25582
|
// context/tunnels.ts
|
|
25427
25583
|
import { createIsolation as createIsolation2 } from "jotai-scope";
|
|
@@ -29733,7 +29889,7 @@ import { getBoundTextElement as getBoundTextElement14, handleBindTextResize as h
|
|
|
29733
29889
|
import { isTextElement as isTextElement13 } from "@excalidraw/element";
|
|
29734
29890
|
|
|
29735
29891
|
// ../utils/src/export.ts
|
|
29736
|
-
import { MIME_TYPES as
|
|
29892
|
+
import { MIME_TYPES as MIME_TYPES9 } from "@excalidraw/common";
|
|
29737
29893
|
import { getNonDeletedElements as getNonDeletedElements17 } from "@excalidraw/element";
|
|
29738
29894
|
var exportToCanvas2 = ({
|
|
29739
29895
|
elements,
|
|
@@ -29784,16 +29940,16 @@ var exportToCanvas2 = ({
|
|
|
29784
29940
|
);
|
|
29785
29941
|
};
|
|
29786
29942
|
var exportToBlob = async (opts) => {
|
|
29787
|
-
let { mimeType =
|
|
29788
|
-
if (mimeType ===
|
|
29789
|
-
console.warn(`"quality" will be ignored for "${
|
|
29943
|
+
let { mimeType = MIME_TYPES9.png, quality } = opts;
|
|
29944
|
+
if (mimeType === MIME_TYPES9.png && typeof quality === "number") {
|
|
29945
|
+
console.warn(`"quality" will be ignored for "${MIME_TYPES9.png}" mimeType`);
|
|
29790
29946
|
}
|
|
29791
29947
|
if (mimeType === "image/jpg") {
|
|
29792
|
-
mimeType =
|
|
29948
|
+
mimeType = MIME_TYPES9.jpg;
|
|
29793
29949
|
}
|
|
29794
|
-
if (mimeType ===
|
|
29950
|
+
if (mimeType === MIME_TYPES9.jpg && !opts.appState?.exportBackground) {
|
|
29795
29951
|
console.warn(
|
|
29796
|
-
`Defaulting "exportBackground" to "true" for "${
|
|
29952
|
+
`Defaulting "exportBackground" to "true" for "${MIME_TYPES9.jpg}" mimeType`
|
|
29797
29953
|
);
|
|
29798
29954
|
opts = {
|
|
29799
29955
|
...opts,
|
|
@@ -29808,7 +29964,7 @@ var exportToBlob = async (opts) => {
|
|
|
29808
29964
|
if (!blob) {
|
|
29809
29965
|
return reject(new Error("couldn't export to blob"));
|
|
29810
29966
|
}
|
|
29811
|
-
if (blob && mimeType ===
|
|
29967
|
+
if (blob && mimeType === MIME_TYPES9.png && opts.appState?.exportEmbedScene) {
|
|
29812
29968
|
blob = await encodePngMetadata({
|
|
29813
29969
|
blob,
|
|
29814
29970
|
metadata: serializeAsJSON(
|
|
@@ -31301,9 +31457,466 @@ var ErrorDialog = ({
|
|
|
31301
31457
|
) });
|
|
31302
31458
|
};
|
|
31303
31459
|
|
|
31304
|
-
// components/
|
|
31305
|
-
import React32, { useMemo as useMemo10 } from "react";
|
|
31460
|
+
// components/GifPlaybackControls.tsx
|
|
31306
31461
|
import clsx48 from "clsx";
|
|
31462
|
+
import React32 from "react";
|
|
31463
|
+
import { MIME_TYPES as MIME_TYPES10, sceneCoordsToViewportCoords as sceneCoordsToViewportCoords4 } from "@excalidraw/common";
|
|
31464
|
+
import {
|
|
31465
|
+
getCommonBounds as getCommonBounds11,
|
|
31466
|
+
isInitializedImageElement as isInitializedImageElement4,
|
|
31467
|
+
ShapeCache as ShapeCache5
|
|
31468
|
+
} from "@excalidraw/element";
|
|
31469
|
+
import { Fragment as Fragment18, jsx as jsx112, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
31470
|
+
var gifPlayIcon = /* @__PURE__ */ jsx112("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ jsx112("path", { d: "M8 5v14l11 -7z" }) });
|
|
31471
|
+
var gifPauseIcon = /* @__PURE__ */ jsxs58("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
|
|
31472
|
+
/* @__PURE__ */ jsx112("path", { d: "M8 5v14" }),
|
|
31473
|
+
/* @__PURE__ */ jsx112("path", { d: "M16 5v14" })
|
|
31474
|
+
] });
|
|
31475
|
+
var GIF_FRAME_GALLERY_ITEM_WIDTH = 76;
|
|
31476
|
+
var GIF_FRAME_GALLERY_ITEM_GAP = 4;
|
|
31477
|
+
var GIF_FRAME_GALLERY_ITEM_PITCH = GIF_FRAME_GALLERY_ITEM_WIDTH + GIF_FRAME_GALLERY_ITEM_GAP;
|
|
31478
|
+
var GIF_FRAME_GALLERY_OVERSCAN = 8;
|
|
31479
|
+
var GIF_POPUP_GAP = 8;
|
|
31480
|
+
var getClampedCenteredPopupLeft = (anchorCenterX, popupWidth) => {
|
|
31481
|
+
const halfPopupWidth = popupWidth / 2;
|
|
31482
|
+
return Math.min(
|
|
31483
|
+
Math.max(anchorCenterX, halfPopupWidth + GIF_POPUP_GAP),
|
|
31484
|
+
window.innerWidth - halfPopupWidth - GIF_POPUP_GAP
|
|
31485
|
+
);
|
|
31486
|
+
};
|
|
31487
|
+
var getGifControlPosition = (element, appState) => {
|
|
31488
|
+
const [, , x2, y2] = getCommonBounds11([element]);
|
|
31489
|
+
const bottomRight = sceneCoordsToViewportCoords4(
|
|
31490
|
+
{ sceneX: x2, sceneY: y2 },
|
|
31491
|
+
appState
|
|
31492
|
+
);
|
|
31493
|
+
return {
|
|
31494
|
+
left: Math.min(
|
|
31495
|
+
Math.max(bottomRight.x - appState.offsetLeft, 8),
|
|
31496
|
+
appState.width - 8
|
|
31497
|
+
),
|
|
31498
|
+
top: Math.min(
|
|
31499
|
+
Math.max(bottomRight.y - appState.offsetTop, 8),
|
|
31500
|
+
appState.height - 8
|
|
31501
|
+
)
|
|
31502
|
+
};
|
|
31503
|
+
};
|
|
31504
|
+
var GifPlaybackControls = ({
|
|
31505
|
+
app,
|
|
31506
|
+
files,
|
|
31507
|
+
setAppState
|
|
31508
|
+
}) => {
|
|
31509
|
+
const liveAppState = useExcalidrawAppState();
|
|
31510
|
+
const [, rerenderGifControls] = React32.useReducer(
|
|
31511
|
+
(version) => version + 1,
|
|
31512
|
+
0
|
|
31513
|
+
);
|
|
31514
|
+
const [gifGalleryScrollLeft, setGifGalleryScrollLeft] = React32.useState(0);
|
|
31515
|
+
const speedButtonRef = React32.useRef(null);
|
|
31516
|
+
const framesButtonRef = React32.useRef(null);
|
|
31517
|
+
const speedPickerRef = React32.useRef(null);
|
|
31518
|
+
const frameGalleryRef = React32.useRef(null);
|
|
31519
|
+
const [gifPopupPosition, setGifPopupPosition] = React32.useState(null);
|
|
31520
|
+
React32.useLayoutEffect(() => {
|
|
31521
|
+
const popup = liveAppState.openPopup;
|
|
31522
|
+
if (popup !== "gifSpeedPicker" && popup !== "gifFrameGallery") {
|
|
31523
|
+
if (gifPopupPosition !== null) {
|
|
31524
|
+
setGifPopupPosition(null);
|
|
31525
|
+
}
|
|
31526
|
+
return;
|
|
31527
|
+
}
|
|
31528
|
+
const anchor = popup === "gifSpeedPicker" ? speedButtonRef.current : framesButtonRef.current;
|
|
31529
|
+
const popupElement = popup === "gifSpeedPicker" ? speedPickerRef.current : frameGalleryRef.current;
|
|
31530
|
+
if (!anchor || !popupElement) {
|
|
31531
|
+
return;
|
|
31532
|
+
}
|
|
31533
|
+
const anchorRect = anchor.getBoundingClientRect();
|
|
31534
|
+
const popupRect = popupElement.getBoundingClientRect();
|
|
31535
|
+
const left = getClampedCenteredPopupLeft(
|
|
31536
|
+
anchorRect.left + anchorRect.width / 2,
|
|
31537
|
+
popupRect.width
|
|
31538
|
+
);
|
|
31539
|
+
const top = popup === "gifSpeedPicker" ? Math.max(
|
|
31540
|
+
GIF_POPUP_GAP,
|
|
31541
|
+
anchorRect.top - popupRect.height - GIF_POPUP_GAP
|
|
31542
|
+
) : Math.min(
|
|
31543
|
+
window.innerHeight - popupRect.height - GIF_POPUP_GAP,
|
|
31544
|
+
anchorRect.bottom + GIF_POPUP_GAP
|
|
31545
|
+
);
|
|
31546
|
+
const nextPosition = {
|
|
31547
|
+
left,
|
|
31548
|
+
top: Math.max(GIF_POPUP_GAP, top)
|
|
31549
|
+
};
|
|
31550
|
+
setGifPopupPosition(
|
|
31551
|
+
(currentPosition) => currentPosition?.left === nextPosition.left && currentPosition.top === nextPosition.top ? currentPosition : nextPosition
|
|
31552
|
+
);
|
|
31553
|
+
}, [
|
|
31554
|
+
gifGalleryScrollLeft,
|
|
31555
|
+
gifPopupPosition,
|
|
31556
|
+
liveAppState.openPopup,
|
|
31557
|
+
liveAppState.scrollX,
|
|
31558
|
+
liveAppState.scrollY,
|
|
31559
|
+
liveAppState.zoom.value
|
|
31560
|
+
]);
|
|
31561
|
+
const updateGifPlayback = (element, gifPlayback) => {
|
|
31562
|
+
ShapeCache5.delete(element);
|
|
31563
|
+
app.scene.mutateElement(element, {
|
|
31564
|
+
gifPlayback
|
|
31565
|
+
});
|
|
31566
|
+
app.scheduleUpdate();
|
|
31567
|
+
setAppState({});
|
|
31568
|
+
rerenderGifControls();
|
|
31569
|
+
if (gifPlayback.playing) {
|
|
31570
|
+
app.ensureGifPlaybackLoop();
|
|
31571
|
+
}
|
|
31572
|
+
};
|
|
31573
|
+
const deferredGifBadges = app.scene.getNonDeletedElements().filter(
|
|
31574
|
+
(element) => isInitializedImageElement4(element) && !liveAppState.selectedElementIds[element.id] && files[element.fileId]?.mimeType === MIME_TYPES10.gif && app.imageCache.get(element.fileId)?.gifDecodeStatus === "deferred"
|
|
31575
|
+
).map((element) => {
|
|
31576
|
+
const position = getGifControlPosition(element, liveAppState);
|
|
31577
|
+
return /* @__PURE__ */ jsx112(
|
|
31578
|
+
"span",
|
|
31579
|
+
{
|
|
31580
|
+
className: "gif-playback-controls gif-playback-controls__deferred-badge",
|
|
31581
|
+
role: "img",
|
|
31582
|
+
"aria-label": "GIF paused",
|
|
31583
|
+
style: position,
|
|
31584
|
+
children: CirclePauseIcon
|
|
31585
|
+
},
|
|
31586
|
+
element.id
|
|
31587
|
+
);
|
|
31588
|
+
});
|
|
31589
|
+
const selectedElements = app.scene.getSelectedElements(liveAppState);
|
|
31590
|
+
const selectedElementControls = () => {
|
|
31591
|
+
if (selectedElements.length !== 1) {
|
|
31592
|
+
return null;
|
|
31593
|
+
}
|
|
31594
|
+
const selectedElement = selectedElements[0];
|
|
31595
|
+
if (!isInitializedImageElement4(selectedElement) || files[selectedElement.fileId]?.mimeType !== MIME_TYPES10.gif) {
|
|
31596
|
+
return null;
|
|
31597
|
+
}
|
|
31598
|
+
const cacheEntry = app.imageCache.get(selectedElement.fileId);
|
|
31599
|
+
const gif = cacheEntry?.gif;
|
|
31600
|
+
const [x1, , x2, y2] = getCommonBounds11([selectedElement]);
|
|
31601
|
+
const leftTop = sceneCoordsToViewportCoords4(
|
|
31602
|
+
{ sceneX: x1, sceneY: y2 },
|
|
31603
|
+
liveAppState
|
|
31604
|
+
);
|
|
31605
|
+
const rightTop = sceneCoordsToViewportCoords4(
|
|
31606
|
+
{ sceneX: x2, sceneY: y2 },
|
|
31607
|
+
liveAppState
|
|
31608
|
+
);
|
|
31609
|
+
const width = rightTop.x - leftTop.x;
|
|
31610
|
+
const left = leftTop.x - liveAppState.offsetLeft + width / 2;
|
|
31611
|
+
const top = Math.max(
|
|
31612
|
+
12,
|
|
31613
|
+
Math.min(
|
|
31614
|
+
liveAppState.height - 86,
|
|
31615
|
+
leftTop.y - liveAppState.offsetTop + 16
|
|
31616
|
+
)
|
|
31617
|
+
);
|
|
31618
|
+
if (cacheEntry?.gifDecodeStatus === "deferred") {
|
|
31619
|
+
const position = getGifControlPosition(selectedElement, liveAppState);
|
|
31620
|
+
return /* @__PURE__ */ jsx112(
|
|
31621
|
+
"div",
|
|
31622
|
+
{
|
|
31623
|
+
className: "gif-playback-controls gif-playback-controls--deferred",
|
|
31624
|
+
style: position,
|
|
31625
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
31626
|
+
children: /* @__PURE__ */ jsx112(
|
|
31627
|
+
"button",
|
|
31628
|
+
{
|
|
31629
|
+
type: "button",
|
|
31630
|
+
className: "gif-playback-controls__load-large",
|
|
31631
|
+
title: "Load Large GIF",
|
|
31632
|
+
onClick: () => {
|
|
31633
|
+
app.loadDeferredGif(selectedElement.fileId);
|
|
31634
|
+
},
|
|
31635
|
+
children: "Load Large GIF"
|
|
31636
|
+
}
|
|
31637
|
+
)
|
|
31638
|
+
}
|
|
31639
|
+
);
|
|
31640
|
+
}
|
|
31641
|
+
if (cacheEntry?.gifDecodeStatus === "pending") {
|
|
31642
|
+
return null;
|
|
31643
|
+
}
|
|
31644
|
+
const frameCount = gif?.frames.length ?? 0;
|
|
31645
|
+
if (!gif || frameCount < 2) {
|
|
31646
|
+
return null;
|
|
31647
|
+
}
|
|
31648
|
+
const playback = selectedElement.gifPlayback ?? {
|
|
31649
|
+
frameIndex: 0,
|
|
31650
|
+
speed: 1,
|
|
31651
|
+
playing: false
|
|
31652
|
+
};
|
|
31653
|
+
const viewportAppState = app.state;
|
|
31654
|
+
const runtimeFrameIndex = app.getGifPlaybackFrameIndex(selectedElement) ?? playback.frameIndex;
|
|
31655
|
+
const frameIndex = Math.min(Math.max(runtimeFrameIndex, 0), frameCount - 1);
|
|
31656
|
+
const galleryTop = Math.min(viewportAppState.height - 120, top + 48);
|
|
31657
|
+
const speedPickerTop = Math.max(12, top - 52);
|
|
31658
|
+
const commitFrame = (nextFrameIndex) => {
|
|
31659
|
+
const normalizedFrameIndex = (nextFrameIndex + frameCount) % frameCount;
|
|
31660
|
+
app.setGifPlaybackFrameIndex(selectedElement, normalizedFrameIndex);
|
|
31661
|
+
updateGifPlayback(selectedElement, {
|
|
31662
|
+
...playback,
|
|
31663
|
+
frameIndex: normalizedFrameIndex,
|
|
31664
|
+
playing: false
|
|
31665
|
+
});
|
|
31666
|
+
};
|
|
31667
|
+
const wheelFrame = (event) => {
|
|
31668
|
+
event.preventDefault();
|
|
31669
|
+
event.stopPropagation();
|
|
31670
|
+
commitFrame(frameIndex + (event.deltaY < 0 ? 1 : -1));
|
|
31671
|
+
};
|
|
31672
|
+
const setPlaying = (playing) => {
|
|
31673
|
+
app.setGifPlaybackFrameIndex(selectedElement, frameIndex);
|
|
31674
|
+
updateGifPlayback(selectedElement, {
|
|
31675
|
+
...playback,
|
|
31676
|
+
frameIndex,
|
|
31677
|
+
playing
|
|
31678
|
+
});
|
|
31679
|
+
};
|
|
31680
|
+
const speeds = [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 4];
|
|
31681
|
+
const getSpeedIndex = (speed) => {
|
|
31682
|
+
const exactIndex = speeds.indexOf(speed);
|
|
31683
|
+
if (exactIndex !== -1) {
|
|
31684
|
+
return exactIndex;
|
|
31685
|
+
}
|
|
31686
|
+
return speeds.reduce(
|
|
31687
|
+
(nearestIndex, candidate, index) => Math.abs(candidate - speed) < Math.abs(speeds[nearestIndex] - speed) ? index : nearestIndex,
|
|
31688
|
+
0
|
|
31689
|
+
);
|
|
31690
|
+
};
|
|
31691
|
+
const setSpeed = (speed) => {
|
|
31692
|
+
updateGifPlayback(selectedElement, {
|
|
31693
|
+
...playback,
|
|
31694
|
+
speed
|
|
31695
|
+
});
|
|
31696
|
+
};
|
|
31697
|
+
const stepSpeed = (direction) => {
|
|
31698
|
+
const currentIndex = getSpeedIndex(playback.speed);
|
|
31699
|
+
setSpeed(
|
|
31700
|
+
speeds[Math.min(Math.max(currentIndex + direction, 0), speeds.length - 1)]
|
|
31701
|
+
);
|
|
31702
|
+
};
|
|
31703
|
+
const speedLabel = Number.isInteger(playback.speed) ? `${playback.speed}` : `${playback.speed}`;
|
|
31704
|
+
const galleryScrollWidth = frameCount * GIF_FRAME_GALLERY_ITEM_PITCH - GIF_FRAME_GALLERY_ITEM_GAP;
|
|
31705
|
+
const galleryViewportWidth = Math.min(
|
|
31706
|
+
Math.max(viewportAppState.width * 0.9, 1),
|
|
31707
|
+
galleryScrollWidth
|
|
31708
|
+
);
|
|
31709
|
+
const galleryMaxScrollLeft = Math.max(
|
|
31710
|
+
galleryScrollWidth - galleryViewportWidth,
|
|
31711
|
+
0
|
|
31712
|
+
);
|
|
31713
|
+
const clampedGifGalleryScrollLeft = Math.min(
|
|
31714
|
+
gifGalleryScrollLeft,
|
|
31715
|
+
galleryMaxScrollLeft
|
|
31716
|
+
);
|
|
31717
|
+
const firstVisibleFrameIndex = Math.max(
|
|
31718
|
+
Math.floor(clampedGifGalleryScrollLeft / GIF_FRAME_GALLERY_ITEM_PITCH) - GIF_FRAME_GALLERY_OVERSCAN,
|
|
31719
|
+
0
|
|
31720
|
+
);
|
|
31721
|
+
const visibleFrameCount = Math.ceil(galleryViewportWidth / GIF_FRAME_GALLERY_ITEM_PITCH) + GIF_FRAME_GALLERY_OVERSCAN * 2;
|
|
31722
|
+
const lastVisibleFrameIndex = Math.min(
|
|
31723
|
+
firstVisibleFrameIndex + visibleFrameCount,
|
|
31724
|
+
frameCount
|
|
31725
|
+
);
|
|
31726
|
+
const visibleFrames = gif.frames.slice(
|
|
31727
|
+
firstVisibleFrameIndex,
|
|
31728
|
+
lastVisibleFrameIndex
|
|
31729
|
+
);
|
|
31730
|
+
return /* @__PURE__ */ jsxs58(
|
|
31731
|
+
"div",
|
|
31732
|
+
{
|
|
31733
|
+
className: "gif-playback-controls",
|
|
31734
|
+
style: { left, top },
|
|
31735
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
31736
|
+
children: [
|
|
31737
|
+
liveAppState.openPopup === "gifSpeedPicker" && /* @__PURE__ */ jsx112(
|
|
31738
|
+
"div",
|
|
31739
|
+
{
|
|
31740
|
+
className: "gif-speed-picker",
|
|
31741
|
+
ref: speedPickerRef,
|
|
31742
|
+
style: gifPopupPosition ?? { left, top: speedPickerTop },
|
|
31743
|
+
children: speeds.map((speed) => {
|
|
31744
|
+
const label = Number.isInteger(speed) ? `${speed}` : `${speed}`;
|
|
31745
|
+
return /* @__PURE__ */ jsxs58(
|
|
31746
|
+
"button",
|
|
31747
|
+
{
|
|
31748
|
+
type: "button",
|
|
31749
|
+
className: clsx48("gif-speed-picker__speed", {
|
|
31750
|
+
"gif-speed-picker__speed--selected": speed === playback.speed
|
|
31751
|
+
}),
|
|
31752
|
+
onClick: () => setSpeed(speed),
|
|
31753
|
+
title: `${label}x`,
|
|
31754
|
+
children: [
|
|
31755
|
+
"x",
|
|
31756
|
+
label
|
|
31757
|
+
]
|
|
31758
|
+
},
|
|
31759
|
+
speed
|
|
31760
|
+
);
|
|
31761
|
+
})
|
|
31762
|
+
}
|
|
31763
|
+
),
|
|
31764
|
+
/* @__PURE__ */ jsxs58("div", { className: "gif-playback-controls__bar", children: [
|
|
31765
|
+
/* @__PURE__ */ jsxs58(
|
|
31766
|
+
"button",
|
|
31767
|
+
{
|
|
31768
|
+
type: "button",
|
|
31769
|
+
className: "gif-playback-controls__button gif-playback-controls__button--speed",
|
|
31770
|
+
ref: speedButtonRef,
|
|
31771
|
+
onClick: () => setAppState({
|
|
31772
|
+
openPopup: liveAppState.openPopup === "gifSpeedPicker" ? null : "gifSpeedPicker"
|
|
31773
|
+
}),
|
|
31774
|
+
onWheel: (event) => {
|
|
31775
|
+
event.preventDefault();
|
|
31776
|
+
event.stopPropagation();
|
|
31777
|
+
stepSpeed(event.deltaY < 0 ? 1 : -1);
|
|
31778
|
+
},
|
|
31779
|
+
title: "Speed",
|
|
31780
|
+
children: [
|
|
31781
|
+
"x",
|
|
31782
|
+
speedLabel
|
|
31783
|
+
]
|
|
31784
|
+
}
|
|
31785
|
+
),
|
|
31786
|
+
/* @__PURE__ */ jsx112(
|
|
31787
|
+
"button",
|
|
31788
|
+
{
|
|
31789
|
+
type: "button",
|
|
31790
|
+
className: "gif-playback-controls__button",
|
|
31791
|
+
onClick: () => commitFrame(frameIndex - 1),
|
|
31792
|
+
onWheel: wheelFrame,
|
|
31793
|
+
title: "Previous frame",
|
|
31794
|
+
children: prevFrame
|
|
31795
|
+
}
|
|
31796
|
+
),
|
|
31797
|
+
/* @__PURE__ */ jsx112(
|
|
31798
|
+
"button",
|
|
31799
|
+
{
|
|
31800
|
+
type: "button",
|
|
31801
|
+
className: "gif-playback-controls__button",
|
|
31802
|
+
onClick: () => setPlaying(!playback.playing),
|
|
31803
|
+
onWheel: wheelFrame,
|
|
31804
|
+
title: playback.playing ? "Pause" : "Play",
|
|
31805
|
+
children: playback.playing ? gifPauseIcon : gifPlayIcon
|
|
31806
|
+
}
|
|
31807
|
+
),
|
|
31808
|
+
/* @__PURE__ */ jsx112(
|
|
31809
|
+
"button",
|
|
31810
|
+
{
|
|
31811
|
+
type: "button",
|
|
31812
|
+
className: "gif-playback-controls__button",
|
|
31813
|
+
onClick: () => commitFrame(frameIndex + 1),
|
|
31814
|
+
onWheel: wheelFrame,
|
|
31815
|
+
title: "Next frame",
|
|
31816
|
+
children: nextFrame
|
|
31817
|
+
}
|
|
31818
|
+
),
|
|
31819
|
+
/* @__PURE__ */ jsx112(
|
|
31820
|
+
"button",
|
|
31821
|
+
{
|
|
31822
|
+
type: "button",
|
|
31823
|
+
className: "gif-playback-controls__button gif-playback-controls__button--frames",
|
|
31824
|
+
ref: framesButtonRef,
|
|
31825
|
+
onClick: () => {
|
|
31826
|
+
if (liveAppState.openPopup !== "gifFrameGallery") {
|
|
31827
|
+
setGifGalleryScrollLeft(
|
|
31828
|
+
Math.max(
|
|
31829
|
+
frameIndex * GIF_FRAME_GALLERY_ITEM_PITCH - galleryViewportWidth / 2,
|
|
31830
|
+
0
|
|
31831
|
+
)
|
|
31832
|
+
);
|
|
31833
|
+
}
|
|
31834
|
+
setAppState({
|
|
31835
|
+
openPopup: liveAppState.openPopup === "gifFrameGallery" ? null : "gifFrameGallery"
|
|
31836
|
+
});
|
|
31837
|
+
},
|
|
31838
|
+
onWheel: wheelFrame,
|
|
31839
|
+
title: "Frames",
|
|
31840
|
+
children: frames
|
|
31841
|
+
}
|
|
31842
|
+
)
|
|
31843
|
+
] }),
|
|
31844
|
+
liveAppState.openPopup === "gifFrameGallery" && /* @__PURE__ */ jsx112(
|
|
31845
|
+
"div",
|
|
31846
|
+
{
|
|
31847
|
+
className: "gif-frame-gallery",
|
|
31848
|
+
style: {
|
|
31849
|
+
...gifPopupPosition ?? { left, top: galleryTop },
|
|
31850
|
+
width: galleryViewportWidth
|
|
31851
|
+
},
|
|
31852
|
+
ref: (node) => {
|
|
31853
|
+
frameGalleryRef.current = node;
|
|
31854
|
+
if (node && node.scrollLeft !== clampedGifGalleryScrollLeft) {
|
|
31855
|
+
node.scrollLeft = clampedGifGalleryScrollLeft;
|
|
31856
|
+
}
|
|
31857
|
+
},
|
|
31858
|
+
onScroll: (event) => {
|
|
31859
|
+
setGifGalleryScrollLeft(event.currentTarget.scrollLeft);
|
|
31860
|
+
},
|
|
31861
|
+
onWheelCapture: (event) => {
|
|
31862
|
+
event.preventDefault();
|
|
31863
|
+
event.stopPropagation();
|
|
31864
|
+
event.currentTarget.scrollLeft += event.deltaY;
|
|
31865
|
+
setGifGalleryScrollLeft(event.currentTarget.scrollLeft);
|
|
31866
|
+
},
|
|
31867
|
+
children: /* @__PURE__ */ jsx112(
|
|
31868
|
+
"div",
|
|
31869
|
+
{
|
|
31870
|
+
className: "gif-frame-gallery__spacer",
|
|
31871
|
+
style: { width: galleryScrollWidth },
|
|
31872
|
+
children: visibleFrames.map((frame, offset) => {
|
|
31873
|
+
const index = firstVisibleFrameIndex + offset;
|
|
31874
|
+
return /* @__PURE__ */ jsxs58(
|
|
31875
|
+
"button",
|
|
31876
|
+
{
|
|
31877
|
+
type: "button",
|
|
31878
|
+
className: clsx48("gif-frame-gallery__frame", {
|
|
31879
|
+
"gif-frame-gallery__frame--selected": index === frameIndex
|
|
31880
|
+
}),
|
|
31881
|
+
style: {
|
|
31882
|
+
left: index * GIF_FRAME_GALLERY_ITEM_PITCH
|
|
31883
|
+
},
|
|
31884
|
+
onClick: () => commitFrame(index),
|
|
31885
|
+
title: `Frame ${index + 1}`,
|
|
31886
|
+
children: [
|
|
31887
|
+
/* @__PURE__ */ jsx112(
|
|
31888
|
+
"canvas",
|
|
31889
|
+
{
|
|
31890
|
+
width: frame.width,
|
|
31891
|
+
height: frame.height,
|
|
31892
|
+
ref: (node) => {
|
|
31893
|
+
node?.getContext("2d")?.drawImage(frame, 0, 0);
|
|
31894
|
+
}
|
|
31895
|
+
}
|
|
31896
|
+
),
|
|
31897
|
+
/* @__PURE__ */ jsx112("span", { children: index + 1 })
|
|
31898
|
+
]
|
|
31899
|
+
},
|
|
31900
|
+
index
|
|
31901
|
+
);
|
|
31902
|
+
})
|
|
31903
|
+
}
|
|
31904
|
+
)
|
|
31905
|
+
}
|
|
31906
|
+
)
|
|
31907
|
+
]
|
|
31908
|
+
}
|
|
31909
|
+
);
|
|
31910
|
+
};
|
|
31911
|
+
return /* @__PURE__ */ jsxs58(Fragment18, { children: [
|
|
31912
|
+
deferredGifBadges,
|
|
31913
|
+
selectedElementControls()
|
|
31914
|
+
] });
|
|
31915
|
+
};
|
|
31916
|
+
|
|
31917
|
+
// components/HelpDialog.tsx
|
|
31918
|
+
import React33, { useMemo as useMemo10 } from "react";
|
|
31919
|
+
import clsx49 from "clsx";
|
|
31307
31920
|
import { isDarwin as isDarwin4, isFirefox as isFirefox4, isWindows } from "@excalidraw/common";
|
|
31308
31921
|
import { KEYS as KEYS48 } from "@excalidraw/common";
|
|
31309
31922
|
import { SHAPES as SHAPES3 } from "@excalidraw/element/shapes";
|
|
@@ -31311,14 +31924,14 @@ import { SHAPES as SHAPES3 } from "@excalidraw/element/shapes";
|
|
|
31311
31924
|
// components/HelpDialog/BasicHelpDialog.tsx
|
|
31312
31925
|
import { isFirefox as isFirefox3, KEYS as KEYS47 } from "@excalidraw/common";
|
|
31313
31926
|
import { SHAPES as SHAPES2 } from "@excalidraw/element/shapes";
|
|
31314
|
-
import { Fragment as
|
|
31315
|
-
var Section2 = (props) => /* @__PURE__ */
|
|
31316
|
-
/* @__PURE__ */
|
|
31317
|
-
/* @__PURE__ */
|
|
31927
|
+
import { Fragment as Fragment19, jsx as jsx113, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
31928
|
+
var Section2 = (props) => /* @__PURE__ */ jsxs59(Fragment19, { children: [
|
|
31929
|
+
/* @__PURE__ */ jsx113("h3", { children: props.title }),
|
|
31930
|
+
/* @__PURE__ */ jsx113("div", { className: "HelpDialog__islands-container", children: props.children })
|
|
31318
31931
|
] });
|
|
31319
|
-
var ShortcutIsland = (props) => /* @__PURE__ */
|
|
31320
|
-
/* @__PURE__ */
|
|
31321
|
-
/* @__PURE__ */
|
|
31932
|
+
var ShortcutIsland = (props) => /* @__PURE__ */ jsxs59("div", { className: `HelpDialog__island ${props.className}`, children: [
|
|
31933
|
+
/* @__PURE__ */ jsx113("h4", { className: "HelpDialog__island-title", children: props.caption }),
|
|
31934
|
+
/* @__PURE__ */ jsx113("div", { className: "HelpDialog__island-content", children: props.children })
|
|
31322
31935
|
] });
|
|
31323
31936
|
function* intersperse(as, delim) {
|
|
31324
31937
|
let first = true;
|
|
@@ -31340,25 +31953,25 @@ var Shortcut = ({
|
|
|
31340
31953
|
}) => {
|
|
31341
31954
|
const splitShortcutKeys = shortcuts.map((shortcut) => {
|
|
31342
31955
|
const keys = shortcut.endsWith("++") ? [...shortcut.slice(0, -2).split("+"), "+"] : shortcut.split("+");
|
|
31343
|
-
return keys.map((key) => /* @__PURE__ */
|
|
31956
|
+
return keys.map((key) => /* @__PURE__ */ jsx113(ShortcutKey, { children: upperCaseSingleChars(key) }, key));
|
|
31344
31957
|
});
|
|
31345
|
-
return /* @__PURE__ */
|
|
31346
|
-
/* @__PURE__ */
|
|
31347
|
-
/* @__PURE__ */
|
|
31958
|
+
return /* @__PURE__ */ jsxs59("div", { className: "HelpDialog__shortcut", children: [
|
|
31959
|
+
/* @__PURE__ */ jsx113("div", { children: label }),
|
|
31960
|
+
/* @__PURE__ */ jsx113("div", { className: "HelpDialog__key-container", children: [...intersperse(splitShortcutKeys, isOr ? t("helpDialog.or") : null)] })
|
|
31348
31961
|
] });
|
|
31349
31962
|
};
|
|
31350
|
-
var ShortcutKey = (props) => /* @__PURE__ */
|
|
31963
|
+
var ShortcutKey = (props) => /* @__PURE__ */ jsx113("kbd", { className: "HelpDialog__key", ...props });
|
|
31351
31964
|
function BasicHelpDialog() {
|
|
31352
|
-
return /* @__PURE__ */
|
|
31353
|
-
/* @__PURE__ */
|
|
31965
|
+
return /* @__PURE__ */ jsxs59(Section2, { title: t("helpDialog.shortcuts"), children: [
|
|
31966
|
+
/* @__PURE__ */ jsxs59(
|
|
31354
31967
|
ShortcutIsland,
|
|
31355
31968
|
{
|
|
31356
31969
|
className: "HelpDialog__island--tools",
|
|
31357
31970
|
caption: t("helpDialog.tools"),
|
|
31358
31971
|
children: [
|
|
31359
|
-
/* @__PURE__ */
|
|
31972
|
+
/* @__PURE__ */ jsx113(Shortcut, { label: t("toolBar.hand"), shortcuts: [KEYS47.H] }),
|
|
31360
31973
|
SHAPES2.filter(({ myocSimplifiedMode }) => myocSimplifiedMode).map(
|
|
31361
|
-
({ value, key }) => /* @__PURE__ */
|
|
31974
|
+
({ value, key }) => /* @__PURE__ */ jsx113(
|
|
31362
31975
|
Shortcut,
|
|
31363
31976
|
{
|
|
31364
31977
|
label: t(`toolBar.${value}`),
|
|
@@ -31367,7 +31980,7 @@ function BasicHelpDialog() {
|
|
|
31367
31980
|
value
|
|
31368
31981
|
)
|
|
31369
31982
|
),
|
|
31370
|
-
/* @__PURE__ */
|
|
31983
|
+
/* @__PURE__ */ jsx113(
|
|
31371
31984
|
Shortcut,
|
|
31372
31985
|
{
|
|
31373
31986
|
label: t("helpDialog.cropStart"),
|
|
@@ -31375,7 +31988,7 @@ function BasicHelpDialog() {
|
|
|
31375
31988
|
isOr: true
|
|
31376
31989
|
}
|
|
31377
31990
|
),
|
|
31378
|
-
/* @__PURE__ */
|
|
31991
|
+
/* @__PURE__ */ jsx113(
|
|
31379
31992
|
Shortcut,
|
|
31380
31993
|
{
|
|
31381
31994
|
label: t("helpDialog.cropFinish"),
|
|
@@ -31386,21 +31999,21 @@ function BasicHelpDialog() {
|
|
|
31386
31999
|
]
|
|
31387
32000
|
}
|
|
31388
32001
|
),
|
|
31389
|
-
/* @__PURE__ */
|
|
32002
|
+
/* @__PURE__ */ jsxs59(
|
|
31390
32003
|
ShortcutIsland,
|
|
31391
32004
|
{
|
|
31392
32005
|
className: "HelpDialog__island--view",
|
|
31393
32006
|
caption: t("helpDialog.view"),
|
|
31394
32007
|
children: [
|
|
31395
|
-
/* @__PURE__ */
|
|
31396
|
-
/* @__PURE__ */
|
|
32008
|
+
/* @__PURE__ */ jsx113(Shortcut, { label: t("helpDialog.smartZoom"), shortcuts: [KEYS47.F] }),
|
|
32009
|
+
/* @__PURE__ */ jsx113(
|
|
31397
32010
|
Shortcut,
|
|
31398
32011
|
{
|
|
31399
32012
|
label: t("helpDialog.dragToZoom"),
|
|
31400
32013
|
shortcuts: [`${KEYS47.Z}+${t("helpDialog.drag")}`]
|
|
31401
32014
|
}
|
|
31402
32015
|
),
|
|
31403
|
-
/* @__PURE__ */
|
|
32016
|
+
/* @__PURE__ */ jsx113(
|
|
31404
32017
|
Shortcut,
|
|
31405
32018
|
{
|
|
31406
32019
|
label: t("buttons.objectsSnapMode"),
|
|
@@ -31410,76 +32023,76 @@ function BasicHelpDialog() {
|
|
|
31410
32023
|
]
|
|
31411
32024
|
}
|
|
31412
32025
|
),
|
|
31413
|
-
/* @__PURE__ */
|
|
32026
|
+
/* @__PURE__ */ jsxs59(
|
|
31414
32027
|
ShortcutIsland,
|
|
31415
32028
|
{
|
|
31416
32029
|
className: "HelpDialog__island--editor",
|
|
31417
32030
|
caption: t("helpDialog.editor"),
|
|
31418
32031
|
children: [
|
|
31419
|
-
/* @__PURE__ */
|
|
32032
|
+
/* @__PURE__ */ jsx113(
|
|
31420
32033
|
Shortcut,
|
|
31421
32034
|
{
|
|
31422
32035
|
label: t("labels.pasteAsPlaintext"),
|
|
31423
32036
|
shortcuts: [getShortcutKey("CtrlOrCmd+Shift+V")]
|
|
31424
32037
|
}
|
|
31425
32038
|
),
|
|
31426
|
-
/* @__PURE__ */
|
|
32039
|
+
/* @__PURE__ */ jsx113(
|
|
31427
32040
|
Shortcut,
|
|
31428
32041
|
{
|
|
31429
32042
|
label: t("labels.multiSelect"),
|
|
31430
32043
|
shortcuts: [getShortcutKey(`Shift+${t("helpDialog.click")}`)]
|
|
31431
32044
|
}
|
|
31432
32045
|
),
|
|
31433
|
-
/* @__PURE__ */
|
|
32046
|
+
/* @__PURE__ */ jsx113(
|
|
31434
32047
|
Shortcut,
|
|
31435
32048
|
{
|
|
31436
32049
|
label: t("helpDialog.deepSelect"),
|
|
31437
32050
|
shortcuts: [getShortcutKey(`CtrlOrCmd+${t("helpDialog.click")}`)]
|
|
31438
32051
|
}
|
|
31439
32052
|
),
|
|
31440
|
-
/* @__PURE__ */
|
|
32053
|
+
/* @__PURE__ */ jsx113(
|
|
31441
32054
|
Shortcut,
|
|
31442
32055
|
{
|
|
31443
32056
|
label: t("helpDialog.deepBoxSelect"),
|
|
31444
32057
|
shortcuts: [getShortcutKey(`CtrlOrCmd+${t("helpDialog.drag")}`)]
|
|
31445
32058
|
}
|
|
31446
32059
|
),
|
|
31447
|
-
(probablySupportsClipboardBlob || isFirefox3) && /* @__PURE__ */
|
|
32060
|
+
(probablySupportsClipboardBlob || isFirefox3) && /* @__PURE__ */ jsx113(
|
|
31448
32061
|
Shortcut,
|
|
31449
32062
|
{
|
|
31450
32063
|
label: t("labels.copyAsPng"),
|
|
31451
32064
|
shortcuts: [getShortcutKey("Shift+Alt+C")]
|
|
31452
32065
|
}
|
|
31453
32066
|
),
|
|
31454
|
-
/* @__PURE__ */
|
|
32067
|
+
/* @__PURE__ */ jsx113(
|
|
31455
32068
|
Shortcut,
|
|
31456
32069
|
{
|
|
31457
32070
|
label: t("helpDialog.toggleElementLock"),
|
|
31458
32071
|
shortcuts: [getShortcutKey("CtrlOrCmd+Shift+L")]
|
|
31459
32072
|
}
|
|
31460
32073
|
),
|
|
31461
|
-
/* @__PURE__ */
|
|
32074
|
+
/* @__PURE__ */ jsx113(
|
|
31462
32075
|
Shortcut,
|
|
31463
32076
|
{
|
|
31464
32077
|
label: t("labels.group"),
|
|
31465
32078
|
shortcuts: [getShortcutKey("CtrlOrCmd+G")]
|
|
31466
32079
|
}
|
|
31467
32080
|
),
|
|
31468
|
-
/* @__PURE__ */
|
|
32081
|
+
/* @__PURE__ */ jsx113(
|
|
31469
32082
|
Shortcut,
|
|
31470
32083
|
{
|
|
31471
32084
|
label: t("labels.ungroup"),
|
|
31472
32085
|
shortcuts: [getShortcutKey("CtrlOrCmd+Shift+G")]
|
|
31473
32086
|
}
|
|
31474
32087
|
),
|
|
31475
|
-
/* @__PURE__ */
|
|
32088
|
+
/* @__PURE__ */ jsx113(
|
|
31476
32089
|
Shortcut,
|
|
31477
32090
|
{
|
|
31478
32091
|
label: t("labels.flipHorizontal"),
|
|
31479
32092
|
shortcuts: [getShortcutKey("Shift+H")]
|
|
31480
32093
|
}
|
|
31481
32094
|
),
|
|
31482
|
-
/* @__PURE__ */
|
|
32095
|
+
/* @__PURE__ */ jsx113(
|
|
31483
32096
|
Shortcut,
|
|
31484
32097
|
{
|
|
31485
32098
|
label: t("labels.flipVertical"),
|
|
@@ -31493,14 +32106,14 @@ function BasicHelpDialog() {
|
|
|
31493
32106
|
}
|
|
31494
32107
|
|
|
31495
32108
|
// components/HelpDialog.tsx
|
|
31496
|
-
import { Fragment as
|
|
31497
|
-
var Section3 = (props) => /* @__PURE__ */
|
|
31498
|
-
/* @__PURE__ */
|
|
31499
|
-
/* @__PURE__ */
|
|
32109
|
+
import { Fragment as Fragment20, jsx as jsx114, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
32110
|
+
var Section3 = (props) => /* @__PURE__ */ jsxs60(Fragment20, { children: [
|
|
32111
|
+
/* @__PURE__ */ jsx114("h3", { children: props.title }),
|
|
32112
|
+
/* @__PURE__ */ jsx114("div", { className: "HelpDialog__islands-container", children: props.children })
|
|
31500
32113
|
] });
|
|
31501
|
-
var ShortcutIsland2 = (props) => /* @__PURE__ */
|
|
31502
|
-
/* @__PURE__ */
|
|
31503
|
-
/* @__PURE__ */
|
|
32114
|
+
var ShortcutIsland2 = (props) => /* @__PURE__ */ jsxs60("div", { className: `HelpDialog__island ${props.className}`, children: [
|
|
32115
|
+
/* @__PURE__ */ jsx114("h4", { className: "HelpDialog__island-title", children: props.caption }),
|
|
32116
|
+
/* @__PURE__ */ jsx114("div", { className: "HelpDialog__island-content", children: props.children })
|
|
31504
32117
|
] });
|
|
31505
32118
|
function* intersperse2(as, delim) {
|
|
31506
32119
|
let first = true;
|
|
@@ -31522,40 +32135,40 @@ var Shortcut2 = ({
|
|
|
31522
32135
|
}) => {
|
|
31523
32136
|
const splitShortcutKeys = shortcuts.map((shortcut) => {
|
|
31524
32137
|
const keys = shortcut.endsWith("++") ? [...shortcut.slice(0, -2).split("+"), "+"] : shortcut.split("+");
|
|
31525
|
-
return keys.map((key) => /* @__PURE__ */
|
|
32138
|
+
return keys.map((key) => /* @__PURE__ */ jsx114(ShortcutKey2, { children: upperCaseSingleChars2(key) }, key));
|
|
31526
32139
|
});
|
|
31527
|
-
return /* @__PURE__ */
|
|
31528
|
-
/* @__PURE__ */
|
|
31529
|
-
/* @__PURE__ */
|
|
32140
|
+
return /* @__PURE__ */ jsxs60("div", { className: "HelpDialog__shortcut", children: [
|
|
32141
|
+
/* @__PURE__ */ jsx114("div", { children: label }),
|
|
32142
|
+
/* @__PURE__ */ jsx114("div", { className: "HelpDialog__key-container", children: [...intersperse2(splitShortcutKeys, isOr ? t("helpDialog.or") : null)] })
|
|
31530
32143
|
] });
|
|
31531
32144
|
};
|
|
31532
|
-
var ShortcutKey2 = (props) => /* @__PURE__ */
|
|
32145
|
+
var ShortcutKey2 = (props) => /* @__PURE__ */ jsx114("kbd", { className: "HelpDialog__key", ...props });
|
|
31533
32146
|
var HelpDialog = ({ onClose }) => {
|
|
31534
|
-
const [isShowAll, setIsShowAll] =
|
|
31535
|
-
const handleClose =
|
|
32147
|
+
const [isShowAll, setIsShowAll] = React33.useState(false);
|
|
32148
|
+
const handleClose = React33.useCallback(() => {
|
|
31536
32149
|
if (onClose) {
|
|
31537
32150
|
onClose();
|
|
31538
32151
|
}
|
|
31539
32152
|
}, [onClose]);
|
|
31540
32153
|
const showAllButton = useMemo10(
|
|
31541
|
-
() => isShowAll ? /* @__PURE__ */
|
|
32154
|
+
() => isShowAll ? /* @__PURE__ */ jsx114(
|
|
31542
32155
|
"button",
|
|
31543
32156
|
{
|
|
31544
|
-
className:
|
|
32157
|
+
className: clsx49("toggle-button", {}),
|
|
31545
32158
|
onClick: () => setIsShowAll(false),
|
|
31546
32159
|
children: t("helpDialog.myoc.showingAll")
|
|
31547
32160
|
}
|
|
31548
|
-
) : /* @__PURE__ */
|
|
32161
|
+
) : /* @__PURE__ */ jsx114(
|
|
31549
32162
|
"button",
|
|
31550
32163
|
{
|
|
31551
|
-
className:
|
|
32164
|
+
className: clsx49("toggle-button", {}),
|
|
31552
32165
|
onClick: () => setIsShowAll(true),
|
|
31553
32166
|
children: t("helpDialog.myoc.showingBasic")
|
|
31554
32167
|
}
|
|
31555
32168
|
),
|
|
31556
32169
|
[isShowAll]
|
|
31557
32170
|
);
|
|
31558
|
-
return /* @__PURE__ */
|
|
32171
|
+
return /* @__PURE__ */ jsx114(Fragment20, { children: /* @__PURE__ */ jsx114(
|
|
31559
32172
|
Dialog,
|
|
31560
32173
|
{
|
|
31561
32174
|
onCloseRequest: handleClose,
|
|
@@ -31563,15 +32176,15 @@ var HelpDialog = ({ onClose }) => {
|
|
|
31563
32176
|
className: "HelpDialog",
|
|
31564
32177
|
titleButton: showAllButton,
|
|
31565
32178
|
portalContainerClassName: "HelpDialog__modalContainer",
|
|
31566
|
-
children: isShowAll ? /* @__PURE__ */
|
|
31567
|
-
/* @__PURE__ */
|
|
32179
|
+
children: isShowAll ? /* @__PURE__ */ jsxs60(Section3, { title: t("helpDialog.shortcuts"), children: [
|
|
32180
|
+
/* @__PURE__ */ jsxs60(
|
|
31568
32181
|
ShortcutIsland2,
|
|
31569
32182
|
{
|
|
31570
32183
|
className: "HelpDialog__island--tools",
|
|
31571
32184
|
caption: t("helpDialog.tools"),
|
|
31572
32185
|
children: [
|
|
31573
|
-
/* @__PURE__ */
|
|
31574
|
-
SHAPES3.map(({ value, key }) => /* @__PURE__ */
|
|
32186
|
+
/* @__PURE__ */ jsx114(Shortcut2, { label: t("toolBar.hand"), shortcuts: [KEYS48.H] }),
|
|
32187
|
+
SHAPES3.map(({ value, key }) => /* @__PURE__ */ jsx114(
|
|
31575
32188
|
Shortcut2,
|
|
31576
32189
|
{
|
|
31577
32190
|
label: t(`toolBar.${value}`),
|
|
@@ -31579,29 +32192,29 @@ var HelpDialog = ({ onClose }) => {
|
|
|
31579
32192
|
},
|
|
31580
32193
|
value
|
|
31581
32194
|
)),
|
|
31582
|
-
/* @__PURE__ */
|
|
31583
|
-
/* @__PURE__ */
|
|
32195
|
+
/* @__PURE__ */ jsx114(Shortcut2, { label: t("toolBar.frame"), shortcuts: [KEYS48.F] }),
|
|
32196
|
+
/* @__PURE__ */ jsx114(
|
|
31584
32197
|
Shortcut2,
|
|
31585
32198
|
{
|
|
31586
32199
|
label: t("labels.eyeDropper"),
|
|
31587
32200
|
shortcuts: [KEYS48.I, "Shift+S", "Shift+I"]
|
|
31588
32201
|
}
|
|
31589
32202
|
),
|
|
31590
|
-
/* @__PURE__ */
|
|
32203
|
+
/* @__PURE__ */ jsx114(
|
|
31591
32204
|
Shortcut2,
|
|
31592
32205
|
{
|
|
31593
32206
|
label: t("helpDialog.editLineArrowPoints"),
|
|
31594
32207
|
shortcuts: [getShortcutKey("CtrlOrCmd+Enter")]
|
|
31595
32208
|
}
|
|
31596
32209
|
),
|
|
31597
|
-
/* @__PURE__ */
|
|
32210
|
+
/* @__PURE__ */ jsx114(
|
|
31598
32211
|
Shortcut2,
|
|
31599
32212
|
{
|
|
31600
32213
|
label: t("helpDialog.editText"),
|
|
31601
32214
|
shortcuts: [getShortcutKey("Enter")]
|
|
31602
32215
|
}
|
|
31603
32216
|
),
|
|
31604
|
-
/* @__PURE__ */
|
|
32217
|
+
/* @__PURE__ */ jsx114(
|
|
31605
32218
|
Shortcut2,
|
|
31606
32219
|
{
|
|
31607
32220
|
label: t("helpDialog.textNewLine"),
|
|
@@ -31611,7 +32224,7 @@ var HelpDialog = ({ onClose }) => {
|
|
|
31611
32224
|
]
|
|
31612
32225
|
}
|
|
31613
32226
|
),
|
|
31614
|
-
/* @__PURE__ */
|
|
32227
|
+
/* @__PURE__ */ jsx114(
|
|
31615
32228
|
Shortcut2,
|
|
31616
32229
|
{
|
|
31617
32230
|
label: t("helpDialog.textFinish"),
|
|
@@ -31621,7 +32234,7 @@ var HelpDialog = ({ onClose }) => {
|
|
|
31621
32234
|
]
|
|
31622
32235
|
}
|
|
31623
32236
|
),
|
|
31624
|
-
/* @__PURE__ */
|
|
32237
|
+
/* @__PURE__ */ jsx114(
|
|
31625
32238
|
Shortcut2,
|
|
31626
32239
|
{
|
|
31627
32240
|
label: t("helpDialog.curvedArrow"),
|
|
@@ -31634,7 +32247,7 @@ var HelpDialog = ({ onClose }) => {
|
|
|
31634
32247
|
isOr: false
|
|
31635
32248
|
}
|
|
31636
32249
|
),
|
|
31637
|
-
/* @__PURE__ */
|
|
32250
|
+
/* @__PURE__ */ jsx114(
|
|
31638
32251
|
Shortcut2,
|
|
31639
32252
|
{
|
|
31640
32253
|
label: t("helpDialog.curvedLine"),
|
|
@@ -31647,7 +32260,7 @@ var HelpDialog = ({ onClose }) => {
|
|
|
31647
32260
|
isOr: false
|
|
31648
32261
|
}
|
|
31649
32262
|
),
|
|
31650
|
-
/* @__PURE__ */
|
|
32263
|
+
/* @__PURE__ */ jsx114(
|
|
31651
32264
|
Shortcut2,
|
|
31652
32265
|
{
|
|
31653
32266
|
label: t("helpDialog.cropStart"),
|
|
@@ -31658,7 +32271,7 @@ var HelpDialog = ({ onClose }) => {
|
|
|
31658
32271
|
isOr: true
|
|
31659
32272
|
}
|
|
31660
32273
|
),
|
|
31661
|
-
/* @__PURE__ */
|
|
32274
|
+
/* @__PURE__ */ jsx114(
|
|
31662
32275
|
Shortcut2,
|
|
31663
32276
|
{
|
|
31664
32277
|
label: t("helpDialog.cropFinish"),
|
|
@@ -31666,22 +32279,22 @@ var HelpDialog = ({ onClose }) => {
|
|
|
31666
32279
|
isOr: true
|
|
31667
32280
|
}
|
|
31668
32281
|
),
|
|
31669
|
-
/* @__PURE__ */
|
|
31670
|
-
/* @__PURE__ */
|
|
32282
|
+
/* @__PURE__ */ jsx114(Shortcut2, { label: t("toolBar.lock"), shortcuts: [KEYS48.Q] }),
|
|
32283
|
+
/* @__PURE__ */ jsx114(
|
|
31671
32284
|
Shortcut2,
|
|
31672
32285
|
{
|
|
31673
32286
|
label: t("helpDialog.preventBinding"),
|
|
31674
32287
|
shortcuts: [getShortcutKey("CtrlOrCmd")]
|
|
31675
32288
|
}
|
|
31676
32289
|
),
|
|
31677
|
-
/* @__PURE__ */
|
|
32290
|
+
/* @__PURE__ */ jsx114(
|
|
31678
32291
|
Shortcut2,
|
|
31679
32292
|
{
|
|
31680
32293
|
label: t("toolBar.link"),
|
|
31681
32294
|
shortcuts: [getShortcutKey("CtrlOrCmd+K")]
|
|
31682
32295
|
}
|
|
31683
32296
|
),
|
|
31684
|
-
/* @__PURE__ */
|
|
32297
|
+
/* @__PURE__ */ jsx114(
|
|
31685
32298
|
Shortcut2,
|
|
31686
32299
|
{
|
|
31687
32300
|
label: t("toolBar.convertElementType"),
|
|
@@ -31692,90 +32305,90 @@ var HelpDialog = ({ onClose }) => {
|
|
|
31692
32305
|
]
|
|
31693
32306
|
}
|
|
31694
32307
|
),
|
|
31695
|
-
/* @__PURE__ */
|
|
32308
|
+
/* @__PURE__ */ jsxs60(
|
|
31696
32309
|
ShortcutIsland2,
|
|
31697
32310
|
{
|
|
31698
32311
|
className: "HelpDialog__island--view",
|
|
31699
32312
|
caption: t("helpDialog.view"),
|
|
31700
32313
|
children: [
|
|
31701
|
-
/* @__PURE__ */
|
|
32314
|
+
/* @__PURE__ */ jsx114(
|
|
31702
32315
|
Shortcut2,
|
|
31703
32316
|
{
|
|
31704
32317
|
label: t("helpDialog.smartZoom"),
|
|
31705
32318
|
shortcuts: [KEYS48.F]
|
|
31706
32319
|
}
|
|
31707
32320
|
),
|
|
31708
|
-
/* @__PURE__ */
|
|
32321
|
+
/* @__PURE__ */ jsx114(
|
|
31709
32322
|
Shortcut2,
|
|
31710
32323
|
{
|
|
31711
32324
|
label: t("helpDialog.dragToZoom"),
|
|
31712
32325
|
shortcuts: [`${KEYS48.Z}+${t("helpDialog.drag")}`]
|
|
31713
32326
|
}
|
|
31714
32327
|
),
|
|
31715
|
-
/* @__PURE__ */
|
|
32328
|
+
/* @__PURE__ */ jsx114(
|
|
31716
32329
|
Shortcut2,
|
|
31717
32330
|
{
|
|
31718
32331
|
label: t("buttons.zoomIn"),
|
|
31719
32332
|
shortcuts: [getShortcutKey("CtrlOrCmd++")]
|
|
31720
32333
|
}
|
|
31721
32334
|
),
|
|
31722
|
-
/* @__PURE__ */
|
|
32335
|
+
/* @__PURE__ */ jsx114(
|
|
31723
32336
|
Shortcut2,
|
|
31724
32337
|
{
|
|
31725
32338
|
label: t("buttons.zoomOut"),
|
|
31726
32339
|
shortcuts: [getShortcutKey("CtrlOrCmd+-")]
|
|
31727
32340
|
}
|
|
31728
32341
|
),
|
|
31729
|
-
/* @__PURE__ */
|
|
32342
|
+
/* @__PURE__ */ jsx114(
|
|
31730
32343
|
Shortcut2,
|
|
31731
32344
|
{
|
|
31732
32345
|
label: t("buttons.resetZoom"),
|
|
31733
32346
|
shortcuts: [getShortcutKey("CtrlOrCmd+0")]
|
|
31734
32347
|
}
|
|
31735
32348
|
),
|
|
31736
|
-
/* @__PURE__ */
|
|
32349
|
+
/* @__PURE__ */ jsx114(
|
|
31737
32350
|
Shortcut2,
|
|
31738
32351
|
{
|
|
31739
32352
|
label: t("helpDialog.movePageUpDown"),
|
|
31740
32353
|
shortcuts: ["PgUp/PgDn"]
|
|
31741
32354
|
}
|
|
31742
32355
|
),
|
|
31743
|
-
/* @__PURE__ */
|
|
32356
|
+
/* @__PURE__ */ jsx114(
|
|
31744
32357
|
Shortcut2,
|
|
31745
32358
|
{
|
|
31746
32359
|
label: t("helpDialog.movePageLeftRight"),
|
|
31747
32360
|
shortcuts: ["Shift+PgUp/PgDn"]
|
|
31748
32361
|
}
|
|
31749
32362
|
),
|
|
31750
|
-
/* @__PURE__ */
|
|
32363
|
+
/* @__PURE__ */ jsx114(
|
|
31751
32364
|
Shortcut2,
|
|
31752
32365
|
{
|
|
31753
32366
|
label: t("buttons.objectsSnapMode"),
|
|
31754
32367
|
shortcuts: [getShortcutKey("Alt+S")]
|
|
31755
32368
|
}
|
|
31756
32369
|
),
|
|
31757
|
-
/* @__PURE__ */
|
|
32370
|
+
/* @__PURE__ */ jsx114(
|
|
31758
32371
|
Shortcut2,
|
|
31759
32372
|
{
|
|
31760
32373
|
label: t("labels.toggleGrid"),
|
|
31761
32374
|
shortcuts: [getShortcutKey("CtrlOrCmd+'")]
|
|
31762
32375
|
}
|
|
31763
32376
|
),
|
|
31764
|
-
/* @__PURE__ */
|
|
32377
|
+
/* @__PURE__ */ jsx114(
|
|
31765
32378
|
Shortcut2,
|
|
31766
32379
|
{
|
|
31767
32380
|
label: t("labels.viewMode"),
|
|
31768
32381
|
shortcuts: [getShortcutKey("Alt+R")]
|
|
31769
32382
|
}
|
|
31770
32383
|
),
|
|
31771
|
-
/* @__PURE__ */
|
|
32384
|
+
/* @__PURE__ */ jsx114(
|
|
31772
32385
|
Shortcut2,
|
|
31773
32386
|
{
|
|
31774
32387
|
label: t("stats.fullTitle"),
|
|
31775
32388
|
shortcuts: [getShortcutKey("Alt+/")]
|
|
31776
32389
|
}
|
|
31777
32390
|
),
|
|
31778
|
-
/* @__PURE__ */
|
|
32391
|
+
/* @__PURE__ */ jsx114(
|
|
31779
32392
|
Shortcut2,
|
|
31780
32393
|
{
|
|
31781
32394
|
label: t("search.title"),
|
|
@@ -31785,13 +32398,13 @@ var HelpDialog = ({ onClose }) => {
|
|
|
31785
32398
|
]
|
|
31786
32399
|
}
|
|
31787
32400
|
),
|
|
31788
|
-
/* @__PURE__ */
|
|
32401
|
+
/* @__PURE__ */ jsxs60(
|
|
31789
32402
|
ShortcutIsland2,
|
|
31790
32403
|
{
|
|
31791
32404
|
className: "HelpDialog__island--editor",
|
|
31792
32405
|
caption: t("helpDialog.editor"),
|
|
31793
32406
|
children: [
|
|
31794
|
-
/* @__PURE__ */
|
|
32407
|
+
/* @__PURE__ */ jsx114(
|
|
31795
32408
|
Shortcut2,
|
|
31796
32409
|
{
|
|
31797
32410
|
label: t("labels.moveCanvas"),
|
|
@@ -31802,56 +32415,56 @@ var HelpDialog = ({ onClose }) => {
|
|
|
31802
32415
|
isOr: true
|
|
31803
32416
|
}
|
|
31804
32417
|
),
|
|
31805
|
-
/* @__PURE__ */
|
|
32418
|
+
/* @__PURE__ */ jsx114(
|
|
31806
32419
|
Shortcut2,
|
|
31807
32420
|
{
|
|
31808
32421
|
label: t("labels.delete"),
|
|
31809
32422
|
shortcuts: [getShortcutKey("Delete")]
|
|
31810
32423
|
}
|
|
31811
32424
|
),
|
|
31812
|
-
/* @__PURE__ */
|
|
32425
|
+
/* @__PURE__ */ jsx114(
|
|
31813
32426
|
Shortcut2,
|
|
31814
32427
|
{
|
|
31815
32428
|
label: t("labels.cut"),
|
|
31816
32429
|
shortcuts: [getShortcutKey("CtrlOrCmd+X")]
|
|
31817
32430
|
}
|
|
31818
32431
|
),
|
|
31819
|
-
/* @__PURE__ */
|
|
32432
|
+
/* @__PURE__ */ jsx114(
|
|
31820
32433
|
Shortcut2,
|
|
31821
32434
|
{
|
|
31822
32435
|
label: t("labels.copy"),
|
|
31823
32436
|
shortcuts: [getShortcutKey("CtrlOrCmd+C")]
|
|
31824
32437
|
}
|
|
31825
32438
|
),
|
|
31826
|
-
/* @__PURE__ */
|
|
32439
|
+
/* @__PURE__ */ jsx114(
|
|
31827
32440
|
Shortcut2,
|
|
31828
32441
|
{
|
|
31829
32442
|
label: t("labels.paste"),
|
|
31830
32443
|
shortcuts: [getShortcutKey("CtrlOrCmd+V")]
|
|
31831
32444
|
}
|
|
31832
32445
|
),
|
|
31833
|
-
/* @__PURE__ */
|
|
32446
|
+
/* @__PURE__ */ jsx114(
|
|
31834
32447
|
Shortcut2,
|
|
31835
32448
|
{
|
|
31836
32449
|
label: t("labels.pasteAsPlaintext"),
|
|
31837
32450
|
shortcuts: [getShortcutKey("CtrlOrCmd+Shift+V")]
|
|
31838
32451
|
}
|
|
31839
32452
|
),
|
|
31840
|
-
/* @__PURE__ */
|
|
32453
|
+
/* @__PURE__ */ jsx114(
|
|
31841
32454
|
Shortcut2,
|
|
31842
32455
|
{
|
|
31843
32456
|
label: t("labels.selectAll"),
|
|
31844
32457
|
shortcuts: [getShortcutKey("CtrlOrCmd+A")]
|
|
31845
32458
|
}
|
|
31846
32459
|
),
|
|
31847
|
-
/* @__PURE__ */
|
|
32460
|
+
/* @__PURE__ */ jsx114(
|
|
31848
32461
|
Shortcut2,
|
|
31849
32462
|
{
|
|
31850
32463
|
label: t("labels.multiSelect"),
|
|
31851
32464
|
shortcuts: [getShortcutKey(`Shift+${t("helpDialog.click")}`)]
|
|
31852
32465
|
}
|
|
31853
32466
|
),
|
|
31854
|
-
/* @__PURE__ */
|
|
32467
|
+
/* @__PURE__ */ jsx114(
|
|
31855
32468
|
Shortcut2,
|
|
31856
32469
|
{
|
|
31857
32470
|
label: t("helpDialog.deepSelect"),
|
|
@@ -31860,7 +32473,7 @@ var HelpDialog = ({ onClose }) => {
|
|
|
31860
32473
|
]
|
|
31861
32474
|
}
|
|
31862
32475
|
),
|
|
31863
|
-
/* @__PURE__ */
|
|
32476
|
+
/* @__PURE__ */ jsx114(
|
|
31864
32477
|
Shortcut2,
|
|
31865
32478
|
{
|
|
31866
32479
|
label: t("helpDialog.deepBoxSelect"),
|
|
@@ -31869,14 +32482,14 @@ var HelpDialog = ({ onClose }) => {
|
|
|
31869
32482
|
]
|
|
31870
32483
|
}
|
|
31871
32484
|
),
|
|
31872
|
-
(probablySupportsClipboardBlob || isFirefox4) && /* @__PURE__ */
|
|
32485
|
+
(probablySupportsClipboardBlob || isFirefox4) && /* @__PURE__ */ jsx114(
|
|
31873
32486
|
Shortcut2,
|
|
31874
32487
|
{
|
|
31875
32488
|
label: t("labels.copyAsPng"),
|
|
31876
32489
|
shortcuts: [getShortcutKey("Shift+Alt+C")]
|
|
31877
32490
|
}
|
|
31878
32491
|
),
|
|
31879
|
-
/* @__PURE__ */
|
|
32492
|
+
/* @__PURE__ */ jsx114(
|
|
31880
32493
|
Shortcut2,
|
|
31881
32494
|
{
|
|
31882
32495
|
label: t("labels.sendToBack"),
|
|
@@ -31885,7 +32498,7 @@ var HelpDialog = ({ onClose }) => {
|
|
|
31885
32498
|
]
|
|
31886
32499
|
}
|
|
31887
32500
|
),
|
|
31888
|
-
/* @__PURE__ */
|
|
32501
|
+
/* @__PURE__ */ jsx114(
|
|
31889
32502
|
Shortcut2,
|
|
31890
32503
|
{
|
|
31891
32504
|
label: t("labels.bringToFront"),
|
|
@@ -31894,56 +32507,56 @@ var HelpDialog = ({ onClose }) => {
|
|
|
31894
32507
|
]
|
|
31895
32508
|
}
|
|
31896
32509
|
),
|
|
31897
|
-
/* @__PURE__ */
|
|
32510
|
+
/* @__PURE__ */ jsx114(
|
|
31898
32511
|
Shortcut2,
|
|
31899
32512
|
{
|
|
31900
32513
|
label: t("labels.sendBackward"),
|
|
31901
32514
|
shortcuts: [getShortcutKey("CtrlOrCmd+[")]
|
|
31902
32515
|
}
|
|
31903
32516
|
),
|
|
31904
|
-
/* @__PURE__ */
|
|
32517
|
+
/* @__PURE__ */ jsx114(
|
|
31905
32518
|
Shortcut2,
|
|
31906
32519
|
{
|
|
31907
32520
|
label: t("labels.bringForward"),
|
|
31908
32521
|
shortcuts: [getShortcutKey("CtrlOrCmd+]")]
|
|
31909
32522
|
}
|
|
31910
32523
|
),
|
|
31911
|
-
/* @__PURE__ */
|
|
32524
|
+
/* @__PURE__ */ jsx114(
|
|
31912
32525
|
Shortcut2,
|
|
31913
32526
|
{
|
|
31914
32527
|
label: t("labels.alignTop"),
|
|
31915
32528
|
shortcuts: [getShortcutKey("CtrlOrCmd+Shift+Up")]
|
|
31916
32529
|
}
|
|
31917
32530
|
),
|
|
31918
|
-
/* @__PURE__ */
|
|
32531
|
+
/* @__PURE__ */ jsx114(
|
|
31919
32532
|
Shortcut2,
|
|
31920
32533
|
{
|
|
31921
32534
|
label: t("labels.alignBottom"),
|
|
31922
32535
|
shortcuts: [getShortcutKey("CtrlOrCmd+Shift+Down")]
|
|
31923
32536
|
}
|
|
31924
32537
|
),
|
|
31925
|
-
/* @__PURE__ */
|
|
32538
|
+
/* @__PURE__ */ jsx114(
|
|
31926
32539
|
Shortcut2,
|
|
31927
32540
|
{
|
|
31928
32541
|
label: t("labels.alignLeft"),
|
|
31929
32542
|
shortcuts: [getShortcutKey("CtrlOrCmd+Shift+Left")]
|
|
31930
32543
|
}
|
|
31931
32544
|
),
|
|
31932
|
-
/* @__PURE__ */
|
|
32545
|
+
/* @__PURE__ */ jsx114(
|
|
31933
32546
|
Shortcut2,
|
|
31934
32547
|
{
|
|
31935
32548
|
label: t("labels.alignRight"),
|
|
31936
32549
|
shortcuts: [getShortcutKey("CtrlOrCmd+Shift+Right")]
|
|
31937
32550
|
}
|
|
31938
32551
|
),
|
|
31939
|
-
/* @__PURE__ */
|
|
32552
|
+
/* @__PURE__ */ jsx114(
|
|
31940
32553
|
Shortcut2,
|
|
31941
32554
|
{
|
|
31942
32555
|
label: t("labels.arrangeElements"),
|
|
31943
32556
|
shortcuts: [getShortcutKey("Shift+R")]
|
|
31944
32557
|
}
|
|
31945
32558
|
),
|
|
31946
|
-
/* @__PURE__ */
|
|
32559
|
+
/* @__PURE__ */ jsx114(
|
|
31947
32560
|
Shortcut2,
|
|
31948
32561
|
{
|
|
31949
32562
|
label: t("labels.duplicateSelection"),
|
|
@@ -31953,21 +32566,21 @@ var HelpDialog = ({ onClose }) => {
|
|
|
31953
32566
|
]
|
|
31954
32567
|
}
|
|
31955
32568
|
),
|
|
31956
|
-
/* @__PURE__ */
|
|
32569
|
+
/* @__PURE__ */ jsx114(
|
|
31957
32570
|
Shortcut2,
|
|
31958
32571
|
{
|
|
31959
32572
|
label: t("helpDialog.toggleElementLock"),
|
|
31960
32573
|
shortcuts: [getShortcutKey("CtrlOrCmd+Shift+L")]
|
|
31961
32574
|
}
|
|
31962
32575
|
),
|
|
31963
|
-
/* @__PURE__ */
|
|
32576
|
+
/* @__PURE__ */ jsx114(
|
|
31964
32577
|
Shortcut2,
|
|
31965
32578
|
{
|
|
31966
32579
|
label: t("buttons.undo"),
|
|
31967
32580
|
shortcuts: [getShortcutKey("CtrlOrCmd+Z")]
|
|
31968
32581
|
}
|
|
31969
32582
|
),
|
|
31970
|
-
/* @__PURE__ */
|
|
32583
|
+
/* @__PURE__ */ jsx114(
|
|
31971
32584
|
Shortcut2,
|
|
31972
32585
|
{
|
|
31973
32586
|
label: t("buttons.redo"),
|
|
@@ -31977,63 +32590,63 @@ var HelpDialog = ({ onClose }) => {
|
|
|
31977
32590
|
] : [getShortcutKey("CtrlOrCmd+Shift+Z")]
|
|
31978
32591
|
}
|
|
31979
32592
|
),
|
|
31980
|
-
/* @__PURE__ */
|
|
32593
|
+
/* @__PURE__ */ jsx114(
|
|
31981
32594
|
Shortcut2,
|
|
31982
32595
|
{
|
|
31983
32596
|
label: t("labels.group"),
|
|
31984
32597
|
shortcuts: [getShortcutKey("CtrlOrCmd+G")]
|
|
31985
32598
|
}
|
|
31986
32599
|
),
|
|
31987
|
-
/* @__PURE__ */
|
|
32600
|
+
/* @__PURE__ */ jsx114(
|
|
31988
32601
|
Shortcut2,
|
|
31989
32602
|
{
|
|
31990
32603
|
label: t("labels.ungroup"),
|
|
31991
32604
|
shortcuts: [getShortcutKey("CtrlOrCmd+Shift+G")]
|
|
31992
32605
|
}
|
|
31993
32606
|
),
|
|
31994
|
-
/* @__PURE__ */
|
|
32607
|
+
/* @__PURE__ */ jsx114(
|
|
31995
32608
|
Shortcut2,
|
|
31996
32609
|
{
|
|
31997
32610
|
label: t("labels.flipHorizontal"),
|
|
31998
32611
|
shortcuts: [getShortcutKey("Shift+H")]
|
|
31999
32612
|
}
|
|
32000
32613
|
),
|
|
32001
|
-
/* @__PURE__ */
|
|
32614
|
+
/* @__PURE__ */ jsx114(
|
|
32002
32615
|
Shortcut2,
|
|
32003
32616
|
{
|
|
32004
32617
|
label: t("labels.flipVertical"),
|
|
32005
32618
|
shortcuts: [getShortcutKey("Shift+V")]
|
|
32006
32619
|
}
|
|
32007
32620
|
),
|
|
32008
|
-
/* @__PURE__ */
|
|
32621
|
+
/* @__PURE__ */ jsx114(
|
|
32009
32622
|
Shortcut2,
|
|
32010
32623
|
{
|
|
32011
32624
|
label: t("labels.showStroke"),
|
|
32012
32625
|
shortcuts: [getShortcutKey("S")]
|
|
32013
32626
|
}
|
|
32014
32627
|
),
|
|
32015
|
-
/* @__PURE__ */
|
|
32628
|
+
/* @__PURE__ */ jsx114(
|
|
32016
32629
|
Shortcut2,
|
|
32017
32630
|
{
|
|
32018
32631
|
label: t("labels.showBackground"),
|
|
32019
32632
|
shortcuts: [getShortcutKey("G")]
|
|
32020
32633
|
}
|
|
32021
32634
|
),
|
|
32022
|
-
/* @__PURE__ */
|
|
32635
|
+
/* @__PURE__ */ jsx114(
|
|
32023
32636
|
Shortcut2,
|
|
32024
32637
|
{
|
|
32025
32638
|
label: t("labels.showFonts"),
|
|
32026
32639
|
shortcuts: [getShortcutKey("Shift+F")]
|
|
32027
32640
|
}
|
|
32028
32641
|
),
|
|
32029
|
-
/* @__PURE__ */
|
|
32642
|
+
/* @__PURE__ */ jsx114(
|
|
32030
32643
|
Shortcut2,
|
|
32031
32644
|
{
|
|
32032
32645
|
label: t("labels.decreaseFontSize"),
|
|
32033
32646
|
shortcuts: [getShortcutKey("CtrlOrCmd+Shift+<")]
|
|
32034
32647
|
}
|
|
32035
32648
|
),
|
|
32036
|
-
/* @__PURE__ */
|
|
32649
|
+
/* @__PURE__ */ jsx114(
|
|
32037
32650
|
Shortcut2,
|
|
32038
32651
|
{
|
|
32039
32652
|
label: t("labels.increaseFontSize"),
|
|
@@ -32043,7 +32656,7 @@ var HelpDialog = ({ onClose }) => {
|
|
|
32043
32656
|
]
|
|
32044
32657
|
}
|
|
32045
32658
|
)
|
|
32046
|
-
] }) : /* @__PURE__ */
|
|
32659
|
+
] }) : /* @__PURE__ */ jsx114(BasicHelpDialog, {})
|
|
32047
32660
|
}
|
|
32048
32661
|
) });
|
|
32049
32662
|
};
|
|
@@ -32082,8 +32695,8 @@ var useCopyStatus = () => {
|
|
|
32082
32695
|
};
|
|
32083
32696
|
|
|
32084
32697
|
// components/Switch.tsx
|
|
32085
|
-
import
|
|
32086
|
-
import { jsx as
|
|
32698
|
+
import clsx50 from "clsx";
|
|
32699
|
+
import { jsx as jsx115 } from "react/jsx-runtime";
|
|
32087
32700
|
var Switch = ({
|
|
32088
32701
|
title,
|
|
32089
32702
|
name,
|
|
@@ -32091,7 +32704,7 @@ var Switch = ({
|
|
|
32091
32704
|
onChange,
|
|
32092
32705
|
disabled = false
|
|
32093
32706
|
}) => {
|
|
32094
|
-
return /* @__PURE__ */
|
|
32707
|
+
return /* @__PURE__ */ jsx115("div", { className: clsx50("Switch", { toggled: checked, disabled }), children: /* @__PURE__ */ jsx115(
|
|
32095
32708
|
"input",
|
|
32096
32709
|
{
|
|
32097
32710
|
name,
|
|
@@ -32111,12 +32724,12 @@ var Switch = ({
|
|
|
32111
32724
|
};
|
|
32112
32725
|
|
|
32113
32726
|
// components/ImageExportDialog.tsx
|
|
32114
|
-
import { jsx as
|
|
32727
|
+
import { jsx as jsx116, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
32115
32728
|
var ErrorCanvasPreview = () => {
|
|
32116
|
-
return /* @__PURE__ */
|
|
32117
|
-
/* @__PURE__ */
|
|
32118
|
-
/* @__PURE__ */
|
|
32119
|
-
/* @__PURE__ */
|
|
32729
|
+
return /* @__PURE__ */ jsxs61("div", { children: [
|
|
32730
|
+
/* @__PURE__ */ jsx116("h3", { children: t("canvasError.cannotShowPreview") }),
|
|
32731
|
+
/* @__PURE__ */ jsx116("p", { children: /* @__PURE__ */ jsx116("span", { children: t("canvasError.canvasTooBig") }) }),
|
|
32732
|
+
/* @__PURE__ */ jsxs61("em", { children: [
|
|
32120
32733
|
"(",
|
|
32121
32734
|
t("canvasError.canvasTooBigTip"),
|
|
32122
32735
|
")"
|
|
@@ -32230,11 +32843,11 @@ var ImageExportModal = ({
|
|
|
32230
32843
|
exportScale,
|
|
32231
32844
|
embedScene
|
|
32232
32845
|
]);
|
|
32233
|
-
return /* @__PURE__ */
|
|
32234
|
-
/* @__PURE__ */
|
|
32235
|
-
/* @__PURE__ */
|
|
32236
|
-
/* @__PURE__ */
|
|
32237
|
-
/* @__PURE__ */
|
|
32846
|
+
return /* @__PURE__ */ jsxs61("div", { className: "ImageExportModal", children: [
|
|
32847
|
+
/* @__PURE__ */ jsx116("h3", { children: t("imageExportDialog.header") }),
|
|
32848
|
+
/* @__PURE__ */ jsxs61("div", { className: "ImageExportModal__preview", children: [
|
|
32849
|
+
/* @__PURE__ */ jsx116("div", { className: "ImageExportModal__preview__canvas", ref: previewRef, children: renderError && /* @__PURE__ */ jsx116(ErrorCanvasPreview, {}) }),
|
|
32850
|
+
/* @__PURE__ */ jsx116("div", { className: "ImageExportModal__preview__filename", children: !nativeFileSystemSupported && /* @__PURE__ */ jsx116(
|
|
32238
32851
|
"input",
|
|
32239
32852
|
{
|
|
32240
32853
|
type: "text",
|
|
@@ -32252,14 +32865,14 @@ var ImageExportModal = ({
|
|
|
32252
32865
|
}
|
|
32253
32866
|
) })
|
|
32254
32867
|
] }),
|
|
32255
|
-
/* @__PURE__ */
|
|
32256
|
-
/* @__PURE__ */
|
|
32257
|
-
hasSelection && /* @__PURE__ */
|
|
32868
|
+
/* @__PURE__ */ jsxs61("div", { className: "ImageExportModal__settings", children: [
|
|
32869
|
+
/* @__PURE__ */ jsx116("h3", { children: t("imageExportDialog.header") }),
|
|
32870
|
+
hasSelection && /* @__PURE__ */ jsx116(
|
|
32258
32871
|
ExportSetting,
|
|
32259
32872
|
{
|
|
32260
32873
|
label: t("imageExportDialog.label.onlySelected"),
|
|
32261
32874
|
name: "exportOnlySelected",
|
|
32262
|
-
children: /* @__PURE__ */
|
|
32875
|
+
children: /* @__PURE__ */ jsx116(
|
|
32263
32876
|
Switch,
|
|
32264
32877
|
{
|
|
32265
32878
|
name: "exportOnlySelected",
|
|
@@ -32271,12 +32884,12 @@ var ImageExportModal = ({
|
|
|
32271
32884
|
)
|
|
32272
32885
|
}
|
|
32273
32886
|
),
|
|
32274
|
-
/* @__PURE__ */
|
|
32887
|
+
/* @__PURE__ */ jsx116(
|
|
32275
32888
|
ExportSetting,
|
|
32276
32889
|
{
|
|
32277
32890
|
label: t("imageExportDialog.label.withBackground"),
|
|
32278
32891
|
name: "exportBackgroundSwitch",
|
|
32279
|
-
children: /* @__PURE__ */
|
|
32892
|
+
children: /* @__PURE__ */ jsx116(
|
|
32280
32893
|
Switch,
|
|
32281
32894
|
{
|
|
32282
32895
|
name: "exportBackgroundSwitch",
|
|
@@ -32293,12 +32906,12 @@ var ImageExportModal = ({
|
|
|
32293
32906
|
)
|
|
32294
32907
|
}
|
|
32295
32908
|
),
|
|
32296
|
-
/* @__PURE__ */
|
|
32909
|
+
/* @__PURE__ */ jsx116(
|
|
32297
32910
|
ExportSetting,
|
|
32298
32911
|
{
|
|
32299
32912
|
label: t("imageExportDialog.label.darkMode"),
|
|
32300
32913
|
name: "exportDarkModeSwitch",
|
|
32301
|
-
children: /* @__PURE__ */
|
|
32914
|
+
children: /* @__PURE__ */ jsx116(
|
|
32302
32915
|
Switch,
|
|
32303
32916
|
{
|
|
32304
32917
|
name: "exportDarkModeSwitch",
|
|
@@ -32314,13 +32927,13 @@ var ImageExportModal = ({
|
|
|
32314
32927
|
)
|
|
32315
32928
|
}
|
|
32316
32929
|
),
|
|
32317
|
-
/* @__PURE__ */
|
|
32930
|
+
/* @__PURE__ */ jsx116(
|
|
32318
32931
|
ExportSetting,
|
|
32319
32932
|
{
|
|
32320
32933
|
label: t("imageExportDialog.label.embedScene"),
|
|
32321
32934
|
tooltip: t("imageExportDialog.tooltip.embedScene"),
|
|
32322
32935
|
name: "exportEmbedSwitch",
|
|
32323
|
-
children: /* @__PURE__ */
|
|
32936
|
+
children: /* @__PURE__ */ jsx116(
|
|
32324
32937
|
Switch,
|
|
32325
32938
|
{
|
|
32326
32939
|
name: "exportEmbedSwitch",
|
|
@@ -32337,12 +32950,12 @@ var ImageExportModal = ({
|
|
|
32337
32950
|
)
|
|
32338
32951
|
}
|
|
32339
32952
|
),
|
|
32340
|
-
/* @__PURE__ */
|
|
32953
|
+
/* @__PURE__ */ jsx116(
|
|
32341
32954
|
ExportSetting,
|
|
32342
32955
|
{
|
|
32343
32956
|
label: t("imageExportDialog.label.scale"),
|
|
32344
32957
|
name: "exportScale",
|
|
32345
|
-
children: /* @__PURE__ */
|
|
32958
|
+
children: /* @__PURE__ */ jsx116(
|
|
32346
32959
|
RadioGroup,
|
|
32347
32960
|
{
|
|
32348
32961
|
name: "exportScale",
|
|
@@ -32359,8 +32972,8 @@ var ImageExportModal = ({
|
|
|
32359
32972
|
)
|
|
32360
32973
|
}
|
|
32361
32974
|
),
|
|
32362
|
-
/* @__PURE__ */
|
|
32363
|
-
/* @__PURE__ */
|
|
32975
|
+
/* @__PURE__ */ jsxs61("div", { className: "ImageExportModal__settings__buttons", children: [
|
|
32976
|
+
/* @__PURE__ */ jsx116(
|
|
32364
32977
|
FilledButton,
|
|
32365
32978
|
{
|
|
32366
32979
|
className: "ImageExportModal__settings__buttons__button",
|
|
@@ -32372,7 +32985,7 @@ var ImageExportModal = ({
|
|
|
32372
32985
|
children: t("imageExportDialog.button.exportToPng")
|
|
32373
32986
|
}
|
|
32374
32987
|
),
|
|
32375
|
-
/* @__PURE__ */
|
|
32988
|
+
/* @__PURE__ */ jsx116(
|
|
32376
32989
|
FilledButton,
|
|
32377
32990
|
{
|
|
32378
32991
|
className: "ImageExportModal__settings__buttons__button",
|
|
@@ -32384,7 +32997,7 @@ var ImageExportModal = ({
|
|
|
32384
32997
|
children: t("imageExportDialog.button.exportToSvg")
|
|
32385
32998
|
}
|
|
32386
32999
|
),
|
|
32387
|
-
(probablySupportsClipboardBlob || isFirefox5) && /* @__PURE__ */
|
|
33000
|
+
(probablySupportsClipboardBlob || isFirefox5) && /* @__PURE__ */ jsx116(
|
|
32388
33001
|
FilledButton,
|
|
32389
33002
|
{
|
|
32390
33003
|
className: "ImageExportModal__settings__buttons__button",
|
|
@@ -32414,19 +33027,19 @@ var ExportSetting = ({
|
|
|
32414
33027
|
tooltip,
|
|
32415
33028
|
name
|
|
32416
33029
|
}) => {
|
|
32417
|
-
return /* @__PURE__ */
|
|
32418
|
-
/* @__PURE__ */
|
|
33030
|
+
return /* @__PURE__ */ jsxs61("div", { className: "ImageExportModal__settings__setting", title: label, children: [
|
|
33031
|
+
/* @__PURE__ */ jsxs61(
|
|
32419
33032
|
"label",
|
|
32420
33033
|
{
|
|
32421
33034
|
htmlFor: name,
|
|
32422
33035
|
className: "ImageExportModal__settings__setting__label",
|
|
32423
33036
|
children: [
|
|
32424
33037
|
label,
|
|
32425
|
-
tooltip && /* @__PURE__ */
|
|
33038
|
+
tooltip && /* @__PURE__ */ jsx116(Tooltip, { label: tooltip, long: true, children: helpIcon })
|
|
32426
33039
|
]
|
|
32427
33040
|
}
|
|
32428
33041
|
),
|
|
32429
|
-
/* @__PURE__ */
|
|
33042
|
+
/* @__PURE__ */ jsx116("div", { className: "ImageExportModal__settings__setting__content", children })
|
|
32430
33043
|
] });
|
|
32431
33044
|
};
|
|
32432
33045
|
var ImageExportDialog = ({
|
|
@@ -32444,7 +33057,7 @@ var ImageExportDialog = ({
|
|
|
32444
33057
|
elementsSnapshot: cloneJSON4(elements)
|
|
32445
33058
|
};
|
|
32446
33059
|
});
|
|
32447
|
-
return /* @__PURE__ */
|
|
33060
|
+
return /* @__PURE__ */ jsx116(Dialog, { onCloseRequest, size: "wide", title: false, children: /* @__PURE__ */ jsx116(
|
|
32448
33061
|
ImageExportModal,
|
|
32449
33062
|
{
|
|
32450
33063
|
elementsSnapshot,
|
|
@@ -32459,13 +33072,13 @@ var ImageExportDialog = ({
|
|
|
32459
33072
|
};
|
|
32460
33073
|
|
|
32461
33074
|
// components/DefaultSidebar.tsx
|
|
32462
|
-
import
|
|
33075
|
+
import clsx55 from "clsx";
|
|
32463
33076
|
import { CANVAS_SEARCH_TAB as CANVAS_SEARCH_TAB2, DEFAULT_SIDEBAR as DEFAULT_SIDEBAR2 } from "@excalidraw/common";
|
|
32464
33077
|
|
|
32465
33078
|
// components/SearchMenu.tsx
|
|
32466
|
-
import
|
|
33079
|
+
import clsx51 from "clsx";
|
|
32467
33080
|
import debounce3 from "lodash.debounce";
|
|
32468
|
-
import { Fragment as
|
|
33081
|
+
import { Fragment as Fragment21, memo as memo3, useEffect as useEffect32, useMemo as useMemo11, useRef as useRef26, useState as useState31 } from "react";
|
|
32469
33082
|
import {
|
|
32470
33083
|
CLASSES as CLASSES7,
|
|
32471
33084
|
EVENT as EVENT8,
|
|
@@ -32474,7 +33087,7 @@ import {
|
|
|
32474
33087
|
getLineHeight as getLineHeight7
|
|
32475
33088
|
} from "@excalidraw/common";
|
|
32476
33089
|
import {
|
|
32477
|
-
getCommonBounds as
|
|
33090
|
+
getCommonBounds as getCommonBounds12,
|
|
32478
33091
|
isElementCompletelyInViewport
|
|
32479
33092
|
} from "@excalidraw/element";
|
|
32480
33093
|
import { measureText as measureText7 } from "@excalidraw/element";
|
|
@@ -32487,7 +33100,7 @@ import {
|
|
|
32487
33100
|
import { newTextElement as newTextElement5 } from "@excalidraw/element";
|
|
32488
33101
|
import { isTextElement as isTextElement16, isFrameLikeElement as isFrameLikeElement16 } from "@excalidraw/element";
|
|
32489
33102
|
import { getDefaultFrameName } from "@excalidraw/element/frame";
|
|
32490
|
-
import { Fragment as
|
|
33103
|
+
import { Fragment as Fragment22, jsx as jsx117, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
32491
33104
|
var searchQueryAtom = atom("");
|
|
32492
33105
|
var searchItemInFocusAtom = atom(null);
|
|
32493
33106
|
var SEARCH_DEBOUNCE = 350;
|
|
@@ -32612,7 +33225,7 @@ var SearchMenu2 = () => {
|
|
|
32612
33225
|
) || isTextTiny) {
|
|
32613
33226
|
const behavior = isTextTiny && fontSize < FONT_SIZE_LEGIBILITY_THRESHOLD ? "contain" : "scale-down";
|
|
32614
33227
|
app.viewport.setViewport({
|
|
32615
|
-
target:
|
|
33228
|
+
target: getCommonBounds12([matchAsElement]),
|
|
32616
33229
|
fit: behavior,
|
|
32617
33230
|
animation: { duration: 300 },
|
|
32618
33231
|
offsets: { ui: true }
|
|
@@ -32685,9 +33298,9 @@ var SearchMenu2 = () => {
|
|
|
32685
33298
|
});
|
|
32686
33299
|
}, [setAppState, stableState, app]);
|
|
32687
33300
|
const matchCount = `${searchMatches.items.length} ${searchMatches.items.length === 1 ? t("search.singleResult") : t("search.multipleResults")}`;
|
|
32688
|
-
return /* @__PURE__ */
|
|
32689
|
-
/* @__PURE__ */
|
|
32690
|
-
/* @__PURE__ */
|
|
33301
|
+
return /* @__PURE__ */ jsxs62("div", { className: "layer-ui__search", children: [
|
|
33302
|
+
/* @__PURE__ */ jsxs62("div", { className: "layer-ui__search-header", children: [
|
|
33303
|
+
/* @__PURE__ */ jsx117(
|
|
32691
33304
|
TextField,
|
|
32692
33305
|
{
|
|
32693
33306
|
className: CLASSES7.SEARCH_MENU_INPUT_WRAPPER,
|
|
@@ -32723,7 +33336,7 @@ var SearchMenu2 = () => {
|
|
|
32723
33336
|
selectOnRender: true
|
|
32724
33337
|
}
|
|
32725
33338
|
),
|
|
32726
|
-
/* @__PURE__ */
|
|
33339
|
+
/* @__PURE__ */ jsx117(
|
|
32727
33340
|
Button,
|
|
32728
33341
|
{
|
|
32729
33342
|
"data-testid": "sidebar-close",
|
|
@@ -32738,15 +33351,15 @@ var SearchMenu2 = () => {
|
|
|
32738
33351
|
}
|
|
32739
33352
|
)
|
|
32740
33353
|
] }),
|
|
32741
|
-
/* @__PURE__ */
|
|
32742
|
-
searchMatches.items.length > 0 && /* @__PURE__ */
|
|
32743
|
-
focusIndex !== null && focusIndex > -1 ? /* @__PURE__ */
|
|
33354
|
+
/* @__PURE__ */ jsxs62("div", { className: "layer-ui__search-count", children: [
|
|
33355
|
+
searchMatches.items.length > 0 && /* @__PURE__ */ jsxs62(Fragment22, { children: [
|
|
33356
|
+
focusIndex !== null && focusIndex > -1 ? /* @__PURE__ */ jsxs62("div", { children: [
|
|
32744
33357
|
focusIndex + 1,
|
|
32745
33358
|
" / ",
|
|
32746
33359
|
matchCount
|
|
32747
|
-
] }) : /* @__PURE__ */
|
|
32748
|
-
/* @__PURE__ */
|
|
32749
|
-
/* @__PURE__ */
|
|
33360
|
+
] }) : /* @__PURE__ */ jsx117("div", { children: matchCount }),
|
|
33361
|
+
/* @__PURE__ */ jsxs62("div", { className: "result-nav", children: [
|
|
33362
|
+
/* @__PURE__ */ jsx117(
|
|
32750
33363
|
Button,
|
|
32751
33364
|
{
|
|
32752
33365
|
onSelect: () => {
|
|
@@ -32756,7 +33369,7 @@ var SearchMenu2 = () => {
|
|
|
32756
33369
|
children: collapseDownIcon
|
|
32757
33370
|
}
|
|
32758
33371
|
),
|
|
32759
|
-
/* @__PURE__ */
|
|
33372
|
+
/* @__PURE__ */ jsx117(
|
|
32760
33373
|
Button,
|
|
32761
33374
|
{
|
|
32762
33375
|
onSelect: () => {
|
|
@@ -32768,9 +33381,9 @@ var SearchMenu2 = () => {
|
|
|
32768
33381
|
)
|
|
32769
33382
|
] })
|
|
32770
33383
|
] }),
|
|
32771
|
-
searchMatches.items.length === 0 && searchQuery && searchedQueryRef.current && /* @__PURE__ */
|
|
33384
|
+
searchMatches.items.length === 0 && searchQuery && searchedQueryRef.current && /* @__PURE__ */ jsx117("div", { style: { margin: "1rem auto" }, children: t("search.noMatch") })
|
|
32772
33385
|
] }),
|
|
32773
|
-
/* @__PURE__ */
|
|
33386
|
+
/* @__PURE__ */ jsx117(
|
|
32774
33387
|
MatchList,
|
|
32775
33388
|
{
|
|
32776
33389
|
matches: searchMatches,
|
|
@@ -32794,11 +33407,11 @@ var ListItem = (props) => {
|
|
|
32794
33407
|
),
|
|
32795
33408
|
props.preview.moreAfter ? "..." : ""
|
|
32796
33409
|
];
|
|
32797
|
-
return /* @__PURE__ */
|
|
33410
|
+
return /* @__PURE__ */ jsx117(
|
|
32798
33411
|
"div",
|
|
32799
33412
|
{
|
|
32800
33413
|
tabIndex: -1,
|
|
32801
|
-
className:
|
|
33414
|
+
className: clsx51("layer-ui__result-item", {
|
|
32802
33415
|
active: props.highlighted
|
|
32803
33416
|
}),
|
|
32804
33417
|
onClick: props.onClick,
|
|
@@ -32807,7 +33420,7 @@ var ListItem = (props) => {
|
|
|
32807
33420
|
ref?.scrollIntoView({ behavior: "auto", block: "nearest" });
|
|
32808
33421
|
}
|
|
32809
33422
|
},
|
|
32810
|
-
children: /* @__PURE__ */
|
|
33423
|
+
children: /* @__PURE__ */ jsx117("div", { className: "preview-text", children: preview.flatMap((text, idx) => /* @__PURE__ */ jsx117(Fragment21, { children: idx === 2 ? /* @__PURE__ */ jsx117("b", { children: text }) : text }, idx)) })
|
|
32811
33424
|
}
|
|
32812
33425
|
);
|
|
32813
33426
|
};
|
|
@@ -32820,13 +33433,13 @@ var MatchListBase = (props) => {
|
|
|
32820
33433
|
() => props.matches.items.filter((match) => isTextElement16(match.element)),
|
|
32821
33434
|
[props.matches]
|
|
32822
33435
|
);
|
|
32823
|
-
return /* @__PURE__ */
|
|
32824
|
-
frameNameMatches.length > 0 && /* @__PURE__ */
|
|
32825
|
-
/* @__PURE__ */
|
|
32826
|
-
/* @__PURE__ */
|
|
32827
|
-
/* @__PURE__ */
|
|
33436
|
+
return /* @__PURE__ */ jsxs62("div", { className: "layer-ui__search-results", children: [
|
|
33437
|
+
frameNameMatches.length > 0 && /* @__PURE__ */ jsxs62("div", { className: "layer-ui__search-result-container", children: [
|
|
33438
|
+
/* @__PURE__ */ jsxs62("div", { className: "layer-ui__search-result-title", children: [
|
|
33439
|
+
/* @__PURE__ */ jsx117("div", { className: "title-icon", children: frameToolIcon }),
|
|
33440
|
+
/* @__PURE__ */ jsx117("div", { children: t("search.frames") })
|
|
32828
33441
|
] }),
|
|
32829
|
-
frameNameMatches.map((searchMatch, index) => /* @__PURE__ */
|
|
33442
|
+
frameNameMatches.map((searchMatch, index) => /* @__PURE__ */ jsx117(
|
|
32830
33443
|
ListItem,
|
|
32831
33444
|
{
|
|
32832
33445
|
searchQuery: props.searchQuery,
|
|
@@ -32836,14 +33449,14 @@ var MatchListBase = (props) => {
|
|
|
32836
33449
|
},
|
|
32837
33450
|
searchMatch.element.id + searchMatch.index
|
|
32838
33451
|
)),
|
|
32839
|
-
textMatches.length > 0 && /* @__PURE__ */
|
|
33452
|
+
textMatches.length > 0 && /* @__PURE__ */ jsx117("div", { className: "layer-ui__divider" })
|
|
32840
33453
|
] }),
|
|
32841
|
-
textMatches.length > 0 && /* @__PURE__ */
|
|
32842
|
-
/* @__PURE__ */
|
|
32843
|
-
/* @__PURE__ */
|
|
32844
|
-
/* @__PURE__ */
|
|
33454
|
+
textMatches.length > 0 && /* @__PURE__ */ jsxs62("div", { className: "layer-ui__search-result-container", children: [
|
|
33455
|
+
/* @__PURE__ */ jsxs62("div", { className: "layer-ui__search-result-title", children: [
|
|
33456
|
+
/* @__PURE__ */ jsx117("div", { className: "title-icon", children: TextIcon }),
|
|
33457
|
+
/* @__PURE__ */ jsx117("div", { children: t("search.texts") })
|
|
32845
33458
|
] }),
|
|
32846
|
-
textMatches.map((searchMatch, index) => /* @__PURE__ */
|
|
33459
|
+
textMatches.map((searchMatch, index) => /* @__PURE__ */ jsx117(
|
|
32847
33460
|
ListItem,
|
|
32848
33461
|
{
|
|
32849
33462
|
searchQuery: props.searchQuery,
|
|
@@ -33022,11 +33635,11 @@ var handleSearch = debounce3(
|
|
|
33022
33635
|
const texts = elements.filter(
|
|
33023
33636
|
(el) => isTextElement16(el)
|
|
33024
33637
|
);
|
|
33025
|
-
const
|
|
33638
|
+
const frames2 = elements.filter(
|
|
33026
33639
|
(el) => isFrameLikeElement16(el)
|
|
33027
33640
|
);
|
|
33028
33641
|
texts.sort((a, b) => a.y - b.y);
|
|
33029
|
-
|
|
33642
|
+
frames2.sort((a, b) => a.y - b.y);
|
|
33030
33643
|
const textMatches = [];
|
|
33031
33644
|
const regex = new RegExp(escapeSpecialCharacters(searchQuery), "gi");
|
|
33032
33645
|
for (const textEl of texts) {
|
|
@@ -33047,7 +33660,7 @@ var handleSearch = debounce3(
|
|
|
33047
33660
|
}
|
|
33048
33661
|
}
|
|
33049
33662
|
const frameMatches = [];
|
|
33050
|
-
for (const frame of
|
|
33663
|
+
for (const frame of frames2) {
|
|
33051
33664
|
let match = null;
|
|
33052
33665
|
const name = frame.name ?? getDefaultFrameName(frame);
|
|
33053
33666
|
while ((match = regex.exec(name)) !== null) {
|
|
@@ -33082,7 +33695,7 @@ var handleSearch = debounce3(
|
|
|
33082
33695
|
);
|
|
33083
33696
|
|
|
33084
33697
|
// components/Sidebar/Sidebar.tsx
|
|
33085
|
-
import
|
|
33698
|
+
import clsx54 from "clsx";
|
|
33086
33699
|
import {
|
|
33087
33700
|
useEffect as useEffect33,
|
|
33088
33701
|
useLayoutEffect as useLayoutEffect9,
|
|
@@ -33101,15 +33714,15 @@ import {
|
|
|
33101
33714
|
} from "@excalidraw/common";
|
|
33102
33715
|
|
|
33103
33716
|
// components/Sidebar/SidebarHeader.tsx
|
|
33104
|
-
import
|
|
33717
|
+
import clsx52 from "clsx";
|
|
33105
33718
|
import { useContext as useContext3 } from "react";
|
|
33106
33719
|
|
|
33107
33720
|
// components/Sidebar/common.ts
|
|
33108
|
-
import
|
|
33109
|
-
var SidebarPropsContext =
|
|
33721
|
+
import React35 from "react";
|
|
33722
|
+
var SidebarPropsContext = React35.createContext({});
|
|
33110
33723
|
|
|
33111
33724
|
// components/Sidebar/SidebarHeader.tsx
|
|
33112
|
-
import { jsx as
|
|
33725
|
+
import { jsx as jsx118, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
33113
33726
|
var SidebarHeader = ({
|
|
33114
33727
|
children,
|
|
33115
33728
|
className
|
|
@@ -33117,15 +33730,15 @@ var SidebarHeader = ({
|
|
|
33117
33730
|
const editorInterface = useEditorInterface();
|
|
33118
33731
|
const props = useContext3(SidebarPropsContext);
|
|
33119
33732
|
const renderDockButton = !!(editorInterface.canFitSidebar && props.shouldRenderDockButton);
|
|
33120
|
-
return /* @__PURE__ */
|
|
33733
|
+
return /* @__PURE__ */ jsxs63(
|
|
33121
33734
|
"div",
|
|
33122
33735
|
{
|
|
33123
|
-
className:
|
|
33736
|
+
className: clsx52("sidebar__header", className),
|
|
33124
33737
|
"data-testid": "sidebar-header",
|
|
33125
33738
|
children: [
|
|
33126
33739
|
children,
|
|
33127
|
-
/* @__PURE__ */
|
|
33128
|
-
renderDockButton && /* @__PURE__ */
|
|
33740
|
+
/* @__PURE__ */ jsxs63("div", { className: "sidebar__header__buttons", children: [
|
|
33741
|
+
renderDockButton && /* @__PURE__ */ jsx118(Tooltip, { label: t("labels.sidebarLock"), children: /* @__PURE__ */ jsx118(
|
|
33129
33742
|
Button,
|
|
33130
33743
|
{
|
|
33131
33744
|
onSelect: () => props.onDock?.(!props.docked),
|
|
@@ -33136,7 +33749,7 @@ var SidebarHeader = ({
|
|
|
33136
33749
|
children: PinIcon
|
|
33137
33750
|
}
|
|
33138
33751
|
) }),
|
|
33139
|
-
/* @__PURE__ */
|
|
33752
|
+
/* @__PURE__ */ jsx118(
|
|
33140
33753
|
Button,
|
|
33141
33754
|
{
|
|
33142
33755
|
"data-testid": "sidebar-close",
|
|
@@ -33155,14 +33768,14 @@ SidebarHeader.displayName = "SidebarHeader";
|
|
|
33155
33768
|
|
|
33156
33769
|
// components/Sidebar/SidebarTabTrigger.tsx
|
|
33157
33770
|
import { Tabs as RadixTabs } from "radix-ui";
|
|
33158
|
-
import { jsx as
|
|
33771
|
+
import { jsx as jsx119 } from "react/jsx-runtime";
|
|
33159
33772
|
var SidebarTabTrigger = ({
|
|
33160
33773
|
children,
|
|
33161
33774
|
tab,
|
|
33162
33775
|
onSelect,
|
|
33163
33776
|
...rest
|
|
33164
33777
|
}) => {
|
|
33165
|
-
return /* @__PURE__ */
|
|
33778
|
+
return /* @__PURE__ */ jsx119(RadixTabs.Trigger, { value: tab, asChild: true, onSelect, children: /* @__PURE__ */ jsx119(
|
|
33166
33779
|
"button",
|
|
33167
33780
|
{
|
|
33168
33781
|
type: "button",
|
|
@@ -33176,18 +33789,18 @@ SidebarTabTrigger.displayName = "SidebarTabTrigger";
|
|
|
33176
33789
|
|
|
33177
33790
|
// components/Sidebar/SidebarTabTriggers.tsx
|
|
33178
33791
|
import { Tabs as RadixTabs2 } from "radix-ui";
|
|
33179
|
-
import { jsx as
|
|
33792
|
+
import { jsx as jsx120 } from "react/jsx-runtime";
|
|
33180
33793
|
var SidebarTabTriggers = ({
|
|
33181
33794
|
children,
|
|
33182
33795
|
...rest
|
|
33183
33796
|
}) => {
|
|
33184
|
-
return /* @__PURE__ */
|
|
33797
|
+
return /* @__PURE__ */ jsx120(RadixTabs2.List, { className: "sidebar-triggers", ...rest, children });
|
|
33185
33798
|
};
|
|
33186
33799
|
SidebarTabTriggers.displayName = "SidebarTabTriggers";
|
|
33187
33800
|
|
|
33188
33801
|
// components/Sidebar/SidebarTrigger.tsx
|
|
33189
|
-
import
|
|
33190
|
-
import { jsx as
|
|
33802
|
+
import clsx53 from "clsx";
|
|
33803
|
+
import { jsx as jsx121, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
33191
33804
|
var SidebarTrigger = ({
|
|
33192
33805
|
name,
|
|
33193
33806
|
tab,
|
|
@@ -33201,7 +33814,7 @@ var SidebarTrigger = ({
|
|
|
33201
33814
|
const setAppState = useExcalidrawSetAppState();
|
|
33202
33815
|
const appState = useUIAppState();
|
|
33203
33816
|
const isOpen = appState.openSidebar?.name === name;
|
|
33204
|
-
return /* @__PURE__ */
|
|
33817
|
+
return /* @__PURE__ */ jsx121(
|
|
33205
33818
|
"button",
|
|
33206
33819
|
{
|
|
33207
33820
|
type: "button",
|
|
@@ -33220,9 +33833,9 @@ var SidebarTrigger = ({
|
|
|
33220
33833
|
});
|
|
33221
33834
|
onToggle?.(nextOpen);
|
|
33222
33835
|
},
|
|
33223
|
-
children: /* @__PURE__ */
|
|
33224
|
-
icon && /* @__PURE__ */
|
|
33225
|
-
children && /* @__PURE__ */
|
|
33836
|
+
children: /* @__PURE__ */ jsxs64("div", { className: clsx53("sidebar-trigger", className), style, children: [
|
|
33837
|
+
icon && /* @__PURE__ */ jsx121("div", { children: icon }),
|
|
33838
|
+
children && /* @__PURE__ */ jsx121("div", { className: "sidebar-trigger__label", children })
|
|
33226
33839
|
] })
|
|
33227
33840
|
}
|
|
33228
33841
|
);
|
|
@@ -33231,7 +33844,7 @@ SidebarTrigger.displayName = "SidebarTrigger";
|
|
|
33231
33844
|
|
|
33232
33845
|
// components/Sidebar/SidebarTabs.tsx
|
|
33233
33846
|
import { Tabs as RadixTabs3 } from "radix-ui";
|
|
33234
|
-
import { jsx as
|
|
33847
|
+
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
33235
33848
|
var SidebarTabs = ({
|
|
33236
33849
|
children,
|
|
33237
33850
|
...rest
|
|
@@ -33242,7 +33855,7 @@ var SidebarTabs = ({
|
|
|
33242
33855
|
return null;
|
|
33243
33856
|
}
|
|
33244
33857
|
const { name } = appState.openSidebar;
|
|
33245
|
-
return /* @__PURE__ */
|
|
33858
|
+
return /* @__PURE__ */ jsx122(
|
|
33246
33859
|
RadixTabs3.Root,
|
|
33247
33860
|
{
|
|
33248
33861
|
className: "sidebar-tabs-root",
|
|
@@ -33260,18 +33873,18 @@ SidebarTabs.displayName = "SidebarTabs";
|
|
|
33260
33873
|
|
|
33261
33874
|
// components/Sidebar/SidebarTab.tsx
|
|
33262
33875
|
import { Tabs as RadixTabs4 } from "radix-ui";
|
|
33263
|
-
import { jsx as
|
|
33876
|
+
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
33264
33877
|
var SidebarTab = ({
|
|
33265
33878
|
tab,
|
|
33266
33879
|
children,
|
|
33267
33880
|
...rest
|
|
33268
33881
|
}) => {
|
|
33269
|
-
return /* @__PURE__ */
|
|
33882
|
+
return /* @__PURE__ */ jsx123(RadixTabs4.Content, { ...rest, value: tab, "data-testid": tab, children });
|
|
33270
33883
|
};
|
|
33271
33884
|
SidebarTab.displayName = "SidebarTab";
|
|
33272
33885
|
|
|
33273
33886
|
// components/Sidebar/Sidebar.tsx
|
|
33274
|
-
import { jsx as
|
|
33887
|
+
import { jsx as jsx124 } from "react/jsx-runtime";
|
|
33275
33888
|
import { createElement } from "react";
|
|
33276
33889
|
var isSidebarDockedAtom = atom(false);
|
|
33277
33890
|
var SidebarInner = forwardRef5(
|
|
@@ -33345,11 +33958,11 @@ var SidebarInner = forwardRef5(
|
|
|
33345
33958
|
document.removeEventListener(EVENT9.KEYDOWN, handleKeyDown);
|
|
33346
33959
|
};
|
|
33347
33960
|
}, [closeSidebar, docked, editorInterface.canFitSidebar]);
|
|
33348
|
-
return /* @__PURE__ */
|
|
33961
|
+
return /* @__PURE__ */ jsx124(
|
|
33349
33962
|
Island,
|
|
33350
33963
|
{
|
|
33351
33964
|
...rest,
|
|
33352
|
-
className:
|
|
33965
|
+
className: clsx54(
|
|
33353
33966
|
CLASSES8.SIDEBAR,
|
|
33354
33967
|
{ "sidebar--docked": docked },
|
|
33355
33968
|
className
|
|
@@ -33357,7 +33970,7 @@ var SidebarInner = forwardRef5(
|
|
|
33357
33970
|
"data-viewport-ui": editorInterface.formFactor !== "phone" ? "side" : void 0,
|
|
33358
33971
|
"data-viewport-ui-name": editorInterface.formFactor !== "phone" ? "sidebar" : void 0,
|
|
33359
33972
|
ref: islandRef,
|
|
33360
|
-
children: /* @__PURE__ */
|
|
33973
|
+
children: /* @__PURE__ */ jsx124(SidebarPropsContext.Provider, { value: headerPropsRef.current, children })
|
|
33361
33974
|
}
|
|
33362
33975
|
);
|
|
33363
33976
|
}
|
|
@@ -33404,13 +34017,13 @@ var Sidebar = Object.assign(
|
|
|
33404
34017
|
Sidebar.displayName = "Sidebar";
|
|
33405
34018
|
|
|
33406
34019
|
// components/DefaultSidebar.tsx
|
|
33407
|
-
import { jsx as
|
|
34020
|
+
import { jsx as jsx125, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
33408
34021
|
import { createElement as createElement2 } from "react";
|
|
33409
34022
|
var DefaultSidebarTrigger = withInternalFallback(
|
|
33410
34023
|
"DefaultSidebarTrigger",
|
|
33411
34024
|
(props) => {
|
|
33412
34025
|
const { DefaultSidebarTriggerTunnel } = useTunnels();
|
|
33413
|
-
return /* @__PURE__ */
|
|
34026
|
+
return /* @__PURE__ */ jsx125(DefaultSidebarTriggerTunnel.In, { children: /* @__PURE__ */ jsx125(
|
|
33414
34027
|
Sidebar.Trigger,
|
|
33415
34028
|
{
|
|
33416
34029
|
...props,
|
|
@@ -33423,7 +34036,7 @@ var DefaultSidebarTrigger = withInternalFallback(
|
|
|
33423
34036
|
DefaultSidebarTrigger.displayName = "DefaultSidebarTrigger";
|
|
33424
34037
|
var DefaultTabTriggers = ({ children }) => {
|
|
33425
34038
|
const { DefaultSidebarTabTriggersTunnel } = useTunnels();
|
|
33426
|
-
return /* @__PURE__ */
|
|
34039
|
+
return /* @__PURE__ */ jsx125(DefaultSidebarTabTriggersTunnel.In, { children });
|
|
33427
34040
|
};
|
|
33428
34041
|
DefaultTabTriggers.displayName = "DefaultTabTriggers";
|
|
33429
34042
|
var DefaultSidebar = Object.assign(
|
|
@@ -33447,7 +34060,7 @@ var DefaultSidebar = Object.assign(
|
|
|
33447
34060
|
...rest,
|
|
33448
34061
|
name: "default",
|
|
33449
34062
|
key: "default",
|
|
33450
|
-
className:
|
|
34063
|
+
className: clsx55(
|
|
33451
34064
|
"default-sidebar",
|
|
33452
34065
|
{ "default-sidebar--search-only": isSearchSidebar },
|
|
33453
34066
|
className
|
|
@@ -33460,9 +34073,9 @@ var DefaultSidebar = Object.assign(
|
|
|
33460
34073
|
onDock?.(nextDocked);
|
|
33461
34074
|
} : void 0
|
|
33462
34075
|
},
|
|
33463
|
-
/* @__PURE__ */
|
|
33464
|
-
!isSearchSidebar && /* @__PURE__ */
|
|
33465
|
-
/* @__PURE__ */
|
|
34076
|
+
/* @__PURE__ */ jsxs65(Sidebar.Tabs, { children: [
|
|
34077
|
+
!isSearchSidebar && /* @__PURE__ */ jsx125(Sidebar.Header, {}),
|
|
34078
|
+
/* @__PURE__ */ jsx125(Sidebar.Tab, { tab: CANVAS_SEARCH_TAB2, children: /* @__PURE__ */ jsx125(SearchMenu2, {}) }),
|
|
33466
34079
|
!isSearchSidebar && children
|
|
33467
34080
|
] })
|
|
33468
34081
|
);
|
|
@@ -33475,11 +34088,11 @@ var DefaultSidebar = Object.assign(
|
|
|
33475
34088
|
);
|
|
33476
34089
|
|
|
33477
34090
|
// components/JSONExportDialog.tsx
|
|
33478
|
-
import
|
|
34091
|
+
import React37 from "react";
|
|
33479
34092
|
import { getFrame } from "@excalidraw/common";
|
|
33480
34093
|
|
|
33481
34094
|
// components/Card.tsx
|
|
33482
|
-
import { jsx as
|
|
34095
|
+
import { jsx as jsx126 } from "react/jsx-runtime";
|
|
33483
34096
|
var COLOR_MAP = {
|
|
33484
34097
|
primary: {
|
|
33485
34098
|
base: "var(--color-primary)",
|
|
@@ -33504,7 +34117,7 @@ var COLOR_MAP = {
|
|
|
33504
34117
|
}
|
|
33505
34118
|
};
|
|
33506
34119
|
var Card = ({ children, color }) => {
|
|
33507
|
-
return /* @__PURE__ */
|
|
34120
|
+
return /* @__PURE__ */ jsx126(
|
|
33508
34121
|
"div",
|
|
33509
34122
|
{
|
|
33510
34123
|
className: "Card",
|
|
@@ -33519,7 +34132,7 @@ var Card = ({ children, color }) => {
|
|
|
33519
34132
|
};
|
|
33520
34133
|
|
|
33521
34134
|
// components/JSONExportDialog.tsx
|
|
33522
|
-
import { Fragment as
|
|
34135
|
+
import { Fragment as Fragment23, jsx as jsx127, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
33523
34136
|
var JSONExportModal = ({
|
|
33524
34137
|
elements,
|
|
33525
34138
|
appState,
|
|
@@ -33531,15 +34144,15 @@ var JSONExportModal = ({
|
|
|
33531
34144
|
onCloseRequest
|
|
33532
34145
|
}) => {
|
|
33533
34146
|
const { onExportToBackend } = exportOpts;
|
|
33534
|
-
return /* @__PURE__ */
|
|
33535
|
-
exportOpts.saveFileToDisk && /* @__PURE__ */
|
|
33536
|
-
/* @__PURE__ */
|
|
33537
|
-
/* @__PURE__ */
|
|
33538
|
-
/* @__PURE__ */
|
|
34147
|
+
return /* @__PURE__ */ jsx127("div", { className: "ExportDialog ExportDialog--json", children: /* @__PURE__ */ jsxs66("div", { className: "ExportDialog-cards", children: [
|
|
34148
|
+
exportOpts.saveFileToDisk && /* @__PURE__ */ jsxs66(Card, { color: "lime", children: [
|
|
34149
|
+
/* @__PURE__ */ jsx127("div", { className: "Card-icon", children: exportToFileIcon }),
|
|
34150
|
+
/* @__PURE__ */ jsx127("h2", { children: t("exportDialog.disk_title") }),
|
|
34151
|
+
/* @__PURE__ */ jsxs66("div", { className: "Card-details", children: [
|
|
33539
34152
|
t("exportDialog.disk_details"),
|
|
33540
34153
|
!nativeFileSystemSupported && actionManager.renderAction("changeProjectName")
|
|
33541
34154
|
] }),
|
|
33542
|
-
/* @__PURE__ */
|
|
34155
|
+
/* @__PURE__ */ jsx127(
|
|
33543
34156
|
IconButton,
|
|
33544
34157
|
{
|
|
33545
34158
|
className: "Card-button",
|
|
@@ -33553,11 +34166,11 @@ var JSONExportModal = ({
|
|
|
33553
34166
|
}
|
|
33554
34167
|
)
|
|
33555
34168
|
] }),
|
|
33556
|
-
onExportToBackend && /* @__PURE__ */
|
|
33557
|
-
/* @__PURE__ */
|
|
33558
|
-
/* @__PURE__ */
|
|
33559
|
-
/* @__PURE__ */
|
|
33560
|
-
/* @__PURE__ */
|
|
34169
|
+
onExportToBackend && /* @__PURE__ */ jsxs66(Card, { color: "pink", children: [
|
|
34170
|
+
/* @__PURE__ */ jsx127("div", { className: "Card-icon", children: LinkIcon }),
|
|
34171
|
+
/* @__PURE__ */ jsx127("h2", { children: t("exportDialog.link_title") }),
|
|
34172
|
+
/* @__PURE__ */ jsx127("div", { className: "Card-details", children: t("exportDialog.link_details") }),
|
|
34173
|
+
/* @__PURE__ */ jsx127(
|
|
33561
34174
|
IconButton,
|
|
33562
34175
|
{
|
|
33563
34176
|
className: "Card-button",
|
|
@@ -33589,10 +34202,10 @@ var JSONExportDialog = ({
|
|
|
33589
34202
|
canvas,
|
|
33590
34203
|
setAppState
|
|
33591
34204
|
}) => {
|
|
33592
|
-
const handleClose =
|
|
34205
|
+
const handleClose = React37.useCallback(() => {
|
|
33593
34206
|
setAppState({ openDialog: null });
|
|
33594
34207
|
}, [setAppState]);
|
|
33595
|
-
return /* @__PURE__ */
|
|
34208
|
+
return /* @__PURE__ */ jsx127(Fragment23, { children: appState.openDialog?.name === "jsonExport" && /* @__PURE__ */ jsx127(Dialog, { onCloseRequest: handleClose, title: t("buttons.export"), children: /* @__PURE__ */ jsx127(
|
|
33596
34209
|
JSONExportModal,
|
|
33597
34210
|
{
|
|
33598
34211
|
elements,
|
|
@@ -33608,13 +34221,13 @@ var JSONExportDialog = ({
|
|
|
33608
34221
|
};
|
|
33609
34222
|
|
|
33610
34223
|
// components/LaserPointerButton.tsx
|
|
33611
|
-
import
|
|
33612
|
-
import { jsx as
|
|
34224
|
+
import clsx56 from "clsx";
|
|
34225
|
+
import { jsx as jsx128 } from "react/jsx-runtime";
|
|
33613
34226
|
var LaserPointerButton = (props) => {
|
|
33614
|
-
return /* @__PURE__ */
|
|
34227
|
+
return /* @__PURE__ */ jsx128(
|
|
33615
34228
|
IconButton,
|
|
33616
34229
|
{
|
|
33617
|
-
className:
|
|
34230
|
+
className: clsx56("ToolIcon__LaserPointer", {
|
|
33618
34231
|
"is-mobile": props.isMobile
|
|
33619
34232
|
}),
|
|
33620
34233
|
type: "toggle",
|
|
@@ -33630,7 +34243,7 @@ var LaserPointerButton = (props) => {
|
|
|
33630
34243
|
};
|
|
33631
34244
|
|
|
33632
34245
|
// components/Toolbar.tsx
|
|
33633
|
-
import
|
|
34246
|
+
import clsx58 from "clsx";
|
|
33634
34247
|
import { useState as useState33 } from "react";
|
|
33635
34248
|
import { CANVAS_SEARCH_TAB as CANVAS_SEARCH_TAB4, DEFAULT_SIDEBAR as DEFAULT_SIDEBAR4, KEYS as KEYS51 } from "@excalidraw/common";
|
|
33636
34249
|
|
|
@@ -33646,7 +34259,7 @@ import {
|
|
|
33646
34259
|
isTextElement as isTextElement17
|
|
33647
34260
|
} from "@excalidraw/element";
|
|
33648
34261
|
import { isNodeInFlowchart } from "@excalidraw/element";
|
|
33649
|
-
import { jsx as
|
|
34262
|
+
import { jsx as jsx129 } from "react/jsx-runtime";
|
|
33650
34263
|
var getTaggedShortcutKey = (key) => Array.isArray(key) ? `<kbd>${key.map(getShortcutKey).join(" + ")}</kbd>` : `<kbd>${getShortcutKey(key)}</kbd>`;
|
|
33651
34264
|
var getHints = ({
|
|
33652
34265
|
appState,
|
|
@@ -33823,21 +34436,21 @@ var HintViewer = ({
|
|
|
33823
34436
|
const hintJSX = hint.split(/(<kbd>[^<]+<\/kbd>)/g).map((part, index) => {
|
|
33824
34437
|
if (index % 2 === 1) {
|
|
33825
34438
|
const shortcutMatch = part[0] === "<" && part.match(/^<kbd>([^<]+)<\/kbd>$/);
|
|
33826
|
-
return /* @__PURE__ */
|
|
34439
|
+
return /* @__PURE__ */ jsx129("kbd", { children: shortcutMatch ? shortcutMatch[1] : part }, index);
|
|
33827
34440
|
}
|
|
33828
34441
|
return part;
|
|
33829
34442
|
});
|
|
33830
|
-
return /* @__PURE__ */
|
|
34443
|
+
return /* @__PURE__ */ jsx129("div", { className: "HintViewer", children: /* @__PURE__ */ jsx129("span", { children: hintJSX }) });
|
|
33831
34444
|
};
|
|
33832
34445
|
|
|
33833
34446
|
// components/LockButton.tsx
|
|
33834
|
-
import
|
|
33835
|
-
import { jsx as
|
|
34447
|
+
import clsx57 from "clsx";
|
|
34448
|
+
import { jsx as jsx130 } from "react/jsx-runtime";
|
|
33836
34449
|
var LockButton = (props) => {
|
|
33837
|
-
return /* @__PURE__ */
|
|
34450
|
+
return /* @__PURE__ */ jsx130(
|
|
33838
34451
|
IconButton,
|
|
33839
34452
|
{
|
|
33840
|
-
className:
|
|
34453
|
+
className: clsx57("ToolIcon__lock", { "is-mobile": props.isMobile }),
|
|
33841
34454
|
type: "toggle",
|
|
33842
34455
|
icon: props.checked ? LockedIcon : UnlockedIcon,
|
|
33843
34456
|
checked: props.checked,
|
|
@@ -33851,14 +34464,14 @@ var LockButton = (props) => {
|
|
|
33851
34464
|
};
|
|
33852
34465
|
|
|
33853
34466
|
// components/Toolbar.tsx
|
|
33854
|
-
import { Fragment as
|
|
34467
|
+
import { Fragment as Fragment24, jsx as jsx131, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
33855
34468
|
var isToolHiddenByOptions = (type, UIOptions) => type === "image" && UIOptions.tools?.image === false;
|
|
33856
34469
|
var ExtraToolsDropdownItem = ({
|
|
33857
34470
|
app,
|
|
33858
34471
|
activeTool,
|
|
33859
34472
|
type,
|
|
33860
34473
|
shortcut
|
|
33861
|
-
}) => /* @__PURE__ */
|
|
34474
|
+
}) => /* @__PURE__ */ jsx131(
|
|
33862
34475
|
DropdownMenu_default.Item,
|
|
33863
34476
|
{
|
|
33864
34477
|
onSelect: () => app.setActiveTool({ type }),
|
|
@@ -33870,7 +34483,7 @@ var ExtraToolsDropdownItem = ({
|
|
|
33870
34483
|
children: t(`toolBar.${type}`)
|
|
33871
34484
|
}
|
|
33872
34485
|
);
|
|
33873
|
-
var LockActiveToolDropdownItem = ({ app }) => /* @__PURE__ */
|
|
34486
|
+
var LockActiveToolDropdownItem = ({ app }) => /* @__PURE__ */ jsx131(
|
|
33874
34487
|
DropdownMenu_default.Item,
|
|
33875
34488
|
{
|
|
33876
34489
|
onSelect: () => app.toggleLock(),
|
|
@@ -33889,7 +34502,7 @@ var ObjectsSnapModeDropdownItem = ({
|
|
|
33889
34502
|
return null;
|
|
33890
34503
|
}
|
|
33891
34504
|
const shortcut = getShortcutFromShortcutName("objectsSnapMode");
|
|
33892
|
-
return /* @__PURE__ */
|
|
34505
|
+
return /* @__PURE__ */ jsx131(
|
|
33893
34506
|
DropdownMenu_default.Item,
|
|
33894
34507
|
{
|
|
33895
34508
|
onSelect: () => actionManager.executeAction(actionToggleObjectsSnapMode, "ui"),
|
|
@@ -33910,7 +34523,7 @@ var ObjectsSnapModeButton2 = ({
|
|
|
33910
34523
|
}
|
|
33911
34524
|
const label = t("buttons.objectsSnapMode");
|
|
33912
34525
|
const shortcut = getShortcutFromShortcutName("objectsSnapMode");
|
|
33913
|
-
return /* @__PURE__ */
|
|
34526
|
+
return /* @__PURE__ */ jsx131(
|
|
33914
34527
|
IconButton,
|
|
33915
34528
|
{
|
|
33916
34529
|
type: "toggle",
|
|
@@ -33930,7 +34543,7 @@ var SearchMenuDropdownItem = ({
|
|
|
33930
34543
|
}) => {
|
|
33931
34544
|
const label = t("search.title");
|
|
33932
34545
|
const shortcut = getShortcutFromShortcutName("searchMenu");
|
|
33933
|
-
return /* @__PURE__ */
|
|
34546
|
+
return /* @__PURE__ */ jsx131(
|
|
33934
34547
|
DropdownMenu_default.Item,
|
|
33935
34548
|
{
|
|
33936
34549
|
onSelect: () => actionManager.executeAction(actionToggleSearchMenu, "ui"),
|
|
@@ -33942,7 +34555,7 @@ var SearchMenuDropdownItem = ({
|
|
|
33942
34555
|
}
|
|
33943
34556
|
);
|
|
33944
34557
|
};
|
|
33945
|
-
var StrokeEyeDropperButton2 = ({ app }) => /* @__PURE__ */
|
|
34558
|
+
var StrokeEyeDropperButton2 = ({ app }) => /* @__PURE__ */ jsx131(
|
|
33946
34559
|
IconButton,
|
|
33947
34560
|
{
|
|
33948
34561
|
type: "button",
|
|
@@ -33974,11 +34587,11 @@ var ExtraToolsDropdown = ({
|
|
|
33974
34587
|
const myocSimplifiedToolSelected = isMyocSimplifiedMode && MYOC_SIMPLIFIED_EXTRA_TOOL_TYPES.includes(
|
|
33975
34588
|
activeTool.type
|
|
33976
34589
|
);
|
|
33977
|
-
return /* @__PURE__ */
|
|
33978
|
-
/* @__PURE__ */
|
|
34590
|
+
return /* @__PURE__ */ jsxs67(DropdownMenu_default, { open: isExtraToolsMenuOpen, children: [
|
|
34591
|
+
/* @__PURE__ */ jsx131(
|
|
33979
34592
|
DropdownMenu_default.Trigger,
|
|
33980
34593
|
{
|
|
33981
|
-
className:
|
|
34594
|
+
className: clsx58("App-toolbar__extra-tools-trigger", {
|
|
33982
34595
|
"App-toolbar__extra-tools-trigger--selected": myocSimplifiedToolSelected || frameToolSelected || embeddableToolSelected || !isMyocSimplifiedMode && isFullStylesPanel && drawShapeToolSelected || lassoToolSelected || bucketFillToolSelected || // in collab we're already highlighting the laser button
|
|
33983
34596
|
// outside toolbar, so let's not highlight extra-tools button
|
|
33984
34597
|
// on top of it
|
|
@@ -33992,14 +34605,14 @@ var ExtraToolsDropdown = ({
|
|
|
33992
34605
|
children: myocSimplifiedToolSelected ? TOOLS[activeTool.type].icon : frameToolSelected ? frameToolIcon : embeddableToolSelected ? EmbedIcon : !isMyocSimplifiedMode && isFullStylesPanel && drawShapeToolSelected ? drawShapeToolIcon : laserToolSelected && !app.props.isCollaborating ? laserPointerToolIcon : lassoToolSelected ? LassoIcon : bucketFillToolSelected ? bucketFillIcon : DotsIcon
|
|
33993
34606
|
}
|
|
33994
34607
|
),
|
|
33995
|
-
/* @__PURE__ */
|
|
34608
|
+
/* @__PURE__ */ jsx131(
|
|
33996
34609
|
DropdownMenu_default.Content,
|
|
33997
34610
|
{
|
|
33998
34611
|
onClickOutside: () => setIsExtraToolsMenuOpen(false),
|
|
33999
34612
|
onSelect: () => setIsExtraToolsMenuOpen(false),
|
|
34000
34613
|
className: "App-toolbar__extra-tools-dropdown",
|
|
34001
|
-
children: isMyocSimplifiedMode ? /* @__PURE__ */
|
|
34002
|
-
isFullStylesPanel && /* @__PURE__ */
|
|
34614
|
+
children: isMyocSimplifiedMode ? /* @__PURE__ */ jsxs67(Fragment24, { children: [
|
|
34615
|
+
isFullStylesPanel && /* @__PURE__ */ jsx131(
|
|
34003
34616
|
DropdownMenu_default.Item,
|
|
34004
34617
|
{
|
|
34005
34618
|
onSelect: () => app.setActiveTool({ type: "lasso" }),
|
|
@@ -34012,7 +34625,7 @@ var ExtraToolsDropdown = ({
|
|
|
34012
34625
|
),
|
|
34013
34626
|
MYOC_SIMPLIFIED_EXTRA_TOOL_TYPES.filter(
|
|
34014
34627
|
(type) => !isToolHiddenByOptions(type, UIOptions)
|
|
34015
|
-
).map((type) => /* @__PURE__ */
|
|
34628
|
+
).map((type) => /* @__PURE__ */ jsx131(
|
|
34016
34629
|
ExtraToolsDropdownItem,
|
|
34017
34630
|
{
|
|
34018
34631
|
app,
|
|
@@ -34021,17 +34634,17 @@ var ExtraToolsDropdown = ({
|
|
|
34021
34634
|
},
|
|
34022
34635
|
type
|
|
34023
34636
|
)),
|
|
34024
|
-
/* @__PURE__ */
|
|
34025
|
-
/* @__PURE__ */
|
|
34637
|
+
/* @__PURE__ */ jsx131("div", { className: "App-toolbar__dropdown-divider" }),
|
|
34638
|
+
/* @__PURE__ */ jsx131(
|
|
34026
34639
|
SearchMenuDropdownItem,
|
|
34027
34640
|
{
|
|
34028
34641
|
actionManager,
|
|
34029
34642
|
appState: app.state
|
|
34030
34643
|
}
|
|
34031
34644
|
),
|
|
34032
|
-
app.props.activeTool == null && /* @__PURE__ */
|
|
34033
|
-
] }) : /* @__PURE__ */
|
|
34034
|
-
/* @__PURE__ */
|
|
34645
|
+
app.props.activeTool == null && /* @__PURE__ */ jsx131(Fragment24, { children: /* @__PURE__ */ jsx131(LockActiveToolDropdownItem, { app }) })
|
|
34646
|
+
] }) : /* @__PURE__ */ jsxs67(Fragment24, { children: [
|
|
34647
|
+
/* @__PURE__ */ jsx131(
|
|
34035
34648
|
DropdownMenu_default.Item,
|
|
34036
34649
|
{
|
|
34037
34650
|
onSelect: () => app.setActiveTool({ type: "frame" }),
|
|
@@ -34043,7 +34656,7 @@ var ExtraToolsDropdown = ({
|
|
|
34043
34656
|
children: t("toolBar.frame")
|
|
34044
34657
|
}
|
|
34045
34658
|
),
|
|
34046
|
-
/* @__PURE__ */
|
|
34659
|
+
/* @__PURE__ */ jsx131(
|
|
34047
34660
|
DropdownMenu_default.Item,
|
|
34048
34661
|
{
|
|
34049
34662
|
onSelect: () => app.setActiveTool({ type: "embeddable" }),
|
|
@@ -34054,7 +34667,7 @@ var ExtraToolsDropdown = ({
|
|
|
34054
34667
|
children: t("toolBar.embeddable")
|
|
34055
34668
|
}
|
|
34056
34669
|
),
|
|
34057
|
-
/* @__PURE__ */
|
|
34670
|
+
/* @__PURE__ */ jsx131(
|
|
34058
34671
|
DropdownMenu_default.Item,
|
|
34059
34672
|
{
|
|
34060
34673
|
onSelect: () => app.setActiveTool({ type: "autoshape" }),
|
|
@@ -34066,7 +34679,7 @@ var ExtraToolsDropdown = ({
|
|
|
34066
34679
|
children: t("toolBar.autoshape")
|
|
34067
34680
|
}
|
|
34068
34681
|
),
|
|
34069
|
-
/* @__PURE__ */
|
|
34682
|
+
/* @__PURE__ */ jsx131(
|
|
34070
34683
|
DropdownMenu_default.Item,
|
|
34071
34684
|
{
|
|
34072
34685
|
onSelect: () => app.setActiveTool({ type: "laser" }),
|
|
@@ -34077,7 +34690,7 @@ var ExtraToolsDropdown = ({
|
|
|
34077
34690
|
children: t("toolBar.laser")
|
|
34078
34691
|
}
|
|
34079
34692
|
),
|
|
34080
|
-
/* @__PURE__ */
|
|
34693
|
+
/* @__PURE__ */ jsx131(
|
|
34081
34694
|
DropdownMenu_default.Item,
|
|
34082
34695
|
{
|
|
34083
34696
|
onSelect: () => app.setActiveTool({ type: "bucketfill" }),
|
|
@@ -34088,7 +34701,7 @@ var ExtraToolsDropdown = ({
|
|
|
34088
34701
|
children: t("toolBar.bucketfill")
|
|
34089
34702
|
}
|
|
34090
34703
|
),
|
|
34091
|
-
isFullStylesPanel && /* @__PURE__ */
|
|
34704
|
+
isFullStylesPanel && /* @__PURE__ */ jsx131(
|
|
34092
34705
|
DropdownMenu_default.Item,
|
|
34093
34706
|
{
|
|
34094
34707
|
onSelect: () => app.setActiveTool({ type: "lasso" }),
|
|
@@ -34099,22 +34712,22 @@ var ExtraToolsDropdown = ({
|
|
|
34099
34712
|
children: t("toolBar.lasso")
|
|
34100
34713
|
}
|
|
34101
34714
|
),
|
|
34102
|
-
/* @__PURE__ */
|
|
34103
|
-
/* @__PURE__ */
|
|
34715
|
+
/* @__PURE__ */ jsx131("div", { className: "App-toolbar__dropdown-divider" }),
|
|
34716
|
+
/* @__PURE__ */ jsx131(
|
|
34104
34717
|
ObjectsSnapModeDropdownItem,
|
|
34105
34718
|
{
|
|
34106
34719
|
actionManager,
|
|
34107
34720
|
app
|
|
34108
34721
|
}
|
|
34109
34722
|
),
|
|
34110
|
-
/* @__PURE__ */
|
|
34723
|
+
/* @__PURE__ */ jsx131(
|
|
34111
34724
|
SearchMenuDropdownItem,
|
|
34112
34725
|
{
|
|
34113
34726
|
actionManager,
|
|
34114
34727
|
appState: app.state
|
|
34115
34728
|
}
|
|
34116
34729
|
),
|
|
34117
|
-
app.props.activeTool == null && /* @__PURE__ */
|
|
34730
|
+
app.props.activeTool == null && /* @__PURE__ */ jsx131(LockActiveToolDropdownItem, { app })
|
|
34118
34731
|
] })
|
|
34119
34732
|
}
|
|
34120
34733
|
)
|
|
@@ -34135,18 +34748,18 @@ var Toolbar = ({
|
|
|
34135
34748
|
const activeTool = appState.activeTool;
|
|
34136
34749
|
const toolProps = { app, activeTool };
|
|
34137
34750
|
const isMyocSimplifiedMode = appState.myocSimplifiedMode;
|
|
34138
|
-
const selectionTool = isCompactStylesPanel ? /* @__PURE__ */
|
|
34139
|
-
return /* @__PURE__ */
|
|
34751
|
+
const selectionTool = isCompactStylesPanel ? /* @__PURE__ */ jsx131(SelectionToolPopover, { ...toolProps, setAppState }) : appState.preferredSelectionTool.type === "lasso" ? /* @__PURE__ */ jsx131(LassoToolButton, { ...toolProps }) : /* @__PURE__ */ jsx131(SelectionToolButton, { ...toolProps });
|
|
34752
|
+
return /* @__PURE__ */ jsxs67(
|
|
34140
34753
|
Island,
|
|
34141
34754
|
{
|
|
34142
34755
|
padding: 1,
|
|
34143
|
-
className:
|
|
34756
|
+
className: clsx58("App-toolbar", {
|
|
34144
34757
|
"zen-mode": appState.zenModeEnabled,
|
|
34145
34758
|
"App-toolbar--compact": isCompactStylesPanel
|
|
34146
34759
|
}),
|
|
34147
34760
|
"data-viewport-ui": "top",
|
|
34148
34761
|
children: [
|
|
34149
|
-
/* @__PURE__ */
|
|
34762
|
+
/* @__PURE__ */ jsx131(
|
|
34150
34763
|
HintViewer,
|
|
34151
34764
|
{
|
|
34152
34765
|
appState,
|
|
@@ -34156,8 +34769,8 @@ var Toolbar = ({
|
|
|
34156
34769
|
}
|
|
34157
34770
|
),
|
|
34158
34771
|
heading,
|
|
34159
|
-
/* @__PURE__ */
|
|
34160
|
-
!isCompactStylesPanel && /* @__PURE__ */
|
|
34772
|
+
/* @__PURE__ */ jsxs67(Stack_default.Row, { gap: isCompactStylesPanel ? 0.5 : 1, children: [
|
|
34773
|
+
!isCompactStylesPanel && /* @__PURE__ */ jsx131(
|
|
34161
34774
|
PenModeButton,
|
|
34162
34775
|
{
|
|
34163
34776
|
checked: appState.penMode,
|
|
@@ -34166,8 +34779,8 @@ var Toolbar = ({
|
|
|
34166
34779
|
penDetected: appState.penDetected
|
|
34167
34780
|
}
|
|
34168
34781
|
),
|
|
34169
|
-
app.props.activeTool == null && !isMyocSimplifiedMode && /* @__PURE__ */
|
|
34170
|
-
/* @__PURE__ */
|
|
34782
|
+
app.props.activeTool == null && !isMyocSimplifiedMode && /* @__PURE__ */ jsxs67(Fragment24, { children: [
|
|
34783
|
+
/* @__PURE__ */ jsx131(
|
|
34171
34784
|
LockButton,
|
|
34172
34785
|
{
|
|
34173
34786
|
checked: appState.activeTool.locked,
|
|
@@ -34176,29 +34789,29 @@ var Toolbar = ({
|
|
|
34176
34789
|
disabled: app.props.activeTool != null
|
|
34177
34790
|
}
|
|
34178
34791
|
),
|
|
34179
|
-
/* @__PURE__ */
|
|
34792
|
+
/* @__PURE__ */ jsx131("div", { className: "App-toolbar__divider" })
|
|
34180
34793
|
] }),
|
|
34181
|
-
/* @__PURE__ */
|
|
34794
|
+
/* @__PURE__ */ jsx131(HandToolButton, { ...toolProps }),
|
|
34182
34795
|
selectionTool,
|
|
34183
|
-
isMyocSimplifiedMode ? /* @__PURE__ */
|
|
34184
|
-
/* @__PURE__ */
|
|
34185
|
-
/* @__PURE__ */
|
|
34186
|
-
/* @__PURE__ */
|
|
34187
|
-
UIOptions.tools?.image !== false && /* @__PURE__ */
|
|
34188
|
-
/* @__PURE__ */
|
|
34189
|
-
] }) : /* @__PURE__ */
|
|
34190
|
-
/* @__PURE__ */
|
|
34191
|
-
/* @__PURE__ */
|
|
34192
|
-
/* @__PURE__ */
|
|
34193
|
-
/* @__PURE__ */
|
|
34194
|
-
/* @__PURE__ */
|
|
34195
|
-
isCompactStylesPanel ? /* @__PURE__ */
|
|
34196
|
-
/* @__PURE__ */
|
|
34197
|
-
UIOptions.tools?.image !== false && /* @__PURE__ */
|
|
34198
|
-
/* @__PURE__ */
|
|
34796
|
+
isMyocSimplifiedMode ? /* @__PURE__ */ jsxs67(Fragment24, { children: [
|
|
34797
|
+
/* @__PURE__ */ jsx131(FreedrawToolButton, { ...toolProps }),
|
|
34798
|
+
/* @__PURE__ */ jsx131(TextToolButton, { ...toolProps }),
|
|
34799
|
+
/* @__PURE__ */ jsx131(StrokeEyeDropperButton2, { app }),
|
|
34800
|
+
UIOptions.tools?.image !== false && /* @__PURE__ */ jsx131(ImageToolButton, { ...toolProps }),
|
|
34801
|
+
/* @__PURE__ */ jsx131(EraserToolButton, { ...toolProps })
|
|
34802
|
+
] }) : /* @__PURE__ */ jsxs67(Fragment24, { children: [
|
|
34803
|
+
/* @__PURE__ */ jsx131(RectangleToolButton, { ...toolProps }),
|
|
34804
|
+
/* @__PURE__ */ jsx131(DiamondToolButton, { ...toolProps }),
|
|
34805
|
+
/* @__PURE__ */ jsx131(EllipseToolButton, { ...toolProps }),
|
|
34806
|
+
/* @__PURE__ */ jsx131(ArrowToolButton, { ...toolProps }),
|
|
34807
|
+
/* @__PURE__ */ jsx131(LineToolButton, { ...toolProps }),
|
|
34808
|
+
isCompactStylesPanel ? /* @__PURE__ */ jsx131(FreedrawToolPopover, { ...toolProps }) : /* @__PURE__ */ jsx131(FreedrawToolButton, { ...toolProps }),
|
|
34809
|
+
/* @__PURE__ */ jsx131(TextToolButton, { ...toolProps }),
|
|
34810
|
+
UIOptions.tools?.image !== false && /* @__PURE__ */ jsx131(ImageToolButton, { ...toolProps }),
|
|
34811
|
+
/* @__PURE__ */ jsx131(EraserToolButton, { ...toolProps })
|
|
34199
34812
|
] }),
|
|
34200
|
-
/* @__PURE__ */
|
|
34201
|
-
/* @__PURE__ */
|
|
34813
|
+
/* @__PURE__ */ jsx131("div", { className: "App-toolbar__divider" }),
|
|
34814
|
+
/* @__PURE__ */ jsx131(
|
|
34202
34815
|
ExtraToolsDropdown,
|
|
34203
34816
|
{
|
|
34204
34817
|
app,
|
|
@@ -34209,9 +34822,9 @@ var Toolbar = ({
|
|
|
34209
34822
|
actionManager
|
|
34210
34823
|
}
|
|
34211
34824
|
),
|
|
34212
|
-
isMyocSimplifiedMode && /* @__PURE__ */
|
|
34213
|
-
/* @__PURE__ */
|
|
34214
|
-
/* @__PURE__ */
|
|
34825
|
+
isMyocSimplifiedMode && /* @__PURE__ */ jsxs67(Fragment24, { children: [
|
|
34826
|
+
/* @__PURE__ */ jsx131("div", { className: "App-toolbar__divider" }),
|
|
34827
|
+
/* @__PURE__ */ jsx131(ObjectsSnapModeButton2, { actionManager, app })
|
|
34215
34828
|
] })
|
|
34216
34829
|
] })
|
|
34217
34830
|
]
|
|
@@ -34220,26 +34833,26 @@ var Toolbar = ({
|
|
|
34220
34833
|
};
|
|
34221
34834
|
|
|
34222
34835
|
// components/LayerUI.tsx
|
|
34223
|
-
import { Fragment as
|
|
34836
|
+
import { Fragment as Fragment25, jsx as jsx132, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
34224
34837
|
var DefaultMainMenu = ({ UIOptions }) => {
|
|
34225
|
-
return /* @__PURE__ */
|
|
34226
|
-
/* @__PURE__ */
|
|
34227
|
-
/* @__PURE__ */
|
|
34228
|
-
UIOptions.canvasActions.export && /* @__PURE__ */
|
|
34229
|
-
UIOptions.canvasActions.saveAsImage && /* @__PURE__ */
|
|
34230
|
-
/* @__PURE__ */
|
|
34231
|
-
/* @__PURE__ */
|
|
34232
|
-
/* @__PURE__ */
|
|
34233
|
-
/* @__PURE__ */
|
|
34234
|
-
/* @__PURE__ */
|
|
34235
|
-
/* @__PURE__ */
|
|
34236
|
-
/* @__PURE__ */
|
|
34838
|
+
return /* @__PURE__ */ jsxs68(MainMenu_default, { __fallback: true, children: [
|
|
34839
|
+
/* @__PURE__ */ jsx132(MainMenu_default.DefaultItems.LoadScene, {}),
|
|
34840
|
+
/* @__PURE__ */ jsx132(MainMenu_default.DefaultItems.SaveToActiveFile, {}),
|
|
34841
|
+
UIOptions.canvasActions.export && /* @__PURE__ */ jsx132(MainMenu_default.DefaultItems.Export, {}),
|
|
34842
|
+
UIOptions.canvasActions.saveAsImage && /* @__PURE__ */ jsx132(MainMenu_default.DefaultItems.SaveAsImage, {}),
|
|
34843
|
+
/* @__PURE__ */ jsx132(MainMenu_default.DefaultItems.SearchMenu, {}),
|
|
34844
|
+
/* @__PURE__ */ jsx132(MainMenu_default.DefaultItems.Help, {}),
|
|
34845
|
+
/* @__PURE__ */ jsx132(MainMenu_default.Separator, {}),
|
|
34846
|
+
/* @__PURE__ */ jsx132(MainMenu_default.Group, { title: "Excalidraw links", children: /* @__PURE__ */ jsx132(MainMenu_default.DefaultItems.Socials, {}) }),
|
|
34847
|
+
/* @__PURE__ */ jsx132(MainMenu_default.Separator, {}),
|
|
34848
|
+
/* @__PURE__ */ jsx132(MainMenu_default.DefaultItems.ToggleTheme, { allowSystemTheme: false }),
|
|
34849
|
+
/* @__PURE__ */ jsx132(MainMenu_default.DefaultItems.ChangeCanvasBackground, {})
|
|
34237
34850
|
] });
|
|
34238
34851
|
};
|
|
34239
34852
|
var DefaultOverwriteConfirmDialog = () => {
|
|
34240
|
-
return /* @__PURE__ */
|
|
34241
|
-
/* @__PURE__ */
|
|
34242
|
-
/* @__PURE__ */
|
|
34853
|
+
return /* @__PURE__ */ jsxs68(OverwriteConfirmDialog, { __fallback: true, children: [
|
|
34854
|
+
/* @__PURE__ */ jsx132(OverwriteConfirmDialog.Actions.SaveToDisk, {}),
|
|
34855
|
+
/* @__PURE__ */ jsx132(OverwriteConfirmDialog.Actions.ExportToImage, {})
|
|
34243
34856
|
] });
|
|
34244
34857
|
};
|
|
34245
34858
|
var LayerUI = ({
|
|
@@ -34293,7 +34906,7 @@ var LayerUI = ({
|
|
|
34293
34906
|
if (!UIOptions.canvasActions.export) {
|
|
34294
34907
|
return null;
|
|
34295
34908
|
}
|
|
34296
|
-
return /* @__PURE__ */
|
|
34909
|
+
return /* @__PURE__ */ jsx132(
|
|
34297
34910
|
JSONExportDialog,
|
|
34298
34911
|
{
|
|
34299
34912
|
elements,
|
|
@@ -34310,7 +34923,7 @@ var LayerUI = ({
|
|
|
34310
34923
|
if (!UIOptions.canvasActions.saveAsImage || appState.openDialog?.name !== "imageExport") {
|
|
34311
34924
|
return null;
|
|
34312
34925
|
}
|
|
34313
|
-
return /* @__PURE__ */
|
|
34926
|
+
return /* @__PURE__ */ jsx132(
|
|
34314
34927
|
ImageExportDialog,
|
|
34315
34928
|
{
|
|
34316
34929
|
elements,
|
|
@@ -34323,26 +34936,26 @@ var LayerUI = ({
|
|
|
34323
34936
|
}
|
|
34324
34937
|
);
|
|
34325
34938
|
};
|
|
34326
|
-
const renderCanvasActions = () => /* @__PURE__ */
|
|
34327
|
-
/* @__PURE__ */
|
|
34939
|
+
const renderCanvasActions = () => /* @__PURE__ */ jsxs68("div", { style: { position: "relative" }, children: [
|
|
34940
|
+
/* @__PURE__ */ jsxs68("div", { className: "excalidraw-ui-top-left", children: [
|
|
34328
34941
|
renderTopLeftUI?.(false, appState),
|
|
34329
|
-
/* @__PURE__ */
|
|
34330
|
-
/* @__PURE__ */
|
|
34942
|
+
/* @__PURE__ */ jsx132(tunnels.MainMenuTunnel.Out, {}),
|
|
34943
|
+
/* @__PURE__ */ jsx132(tunnels.DefaultSidebarTriggerTunnel.Out, {})
|
|
34331
34944
|
] }),
|
|
34332
|
-
renderWelcomeScreen && /* @__PURE__ */
|
|
34945
|
+
renderWelcomeScreen && /* @__PURE__ */ jsx132(tunnels.WelcomeScreenMenuHintTunnel.Out, {})
|
|
34333
34946
|
] });
|
|
34334
34947
|
const renderSelectedShapeActions = () => {
|
|
34335
|
-
return /* @__PURE__ */
|
|
34948
|
+
return /* @__PURE__ */ jsx132(
|
|
34336
34949
|
Section,
|
|
34337
34950
|
{
|
|
34338
34951
|
heading: "selectedShapeActions",
|
|
34339
|
-
className:
|
|
34952
|
+
className: clsx59("selected-shape-actions zen-mode-transition", {
|
|
34340
34953
|
"transition-left": appState.zenModeEnabled
|
|
34341
34954
|
}),
|
|
34342
|
-
children: isCompactStylesPanel ? /* @__PURE__ */
|
|
34955
|
+
children: isCompactStylesPanel ? /* @__PURE__ */ jsx132(
|
|
34343
34956
|
Island,
|
|
34344
34957
|
{
|
|
34345
|
-
className:
|
|
34958
|
+
className: clsx59("compact-shape-actions-island"),
|
|
34346
34959
|
padding: 0,
|
|
34347
34960
|
"data-viewport-ui": "side",
|
|
34348
34961
|
"data-viewport-ui-name": "stylesPanel",
|
|
@@ -34351,7 +34964,7 @@ var LayerUI = ({
|
|
|
34351
34964
|
// approximate height of hamburgerMenu + footer
|
|
34352
34965
|
maxHeight: `${appState.height - 166}px`
|
|
34353
34966
|
},
|
|
34354
|
-
children: /* @__PURE__ */
|
|
34967
|
+
children: /* @__PURE__ */ jsx132(
|
|
34355
34968
|
CompactShapeActions,
|
|
34356
34969
|
{
|
|
34357
34970
|
appState,
|
|
@@ -34362,7 +34975,7 @@ var LayerUI = ({
|
|
|
34362
34975
|
}
|
|
34363
34976
|
)
|
|
34364
34977
|
}
|
|
34365
|
-
) : /* @__PURE__ */
|
|
34978
|
+
) : /* @__PURE__ */ jsx132(
|
|
34366
34979
|
Island,
|
|
34367
34980
|
{
|
|
34368
34981
|
className: CLASSES9.SHAPE_ACTIONS_MENU,
|
|
@@ -34374,7 +34987,7 @@ var LayerUI = ({
|
|
|
34374
34987
|
},
|
|
34375
34988
|
"data-viewport-ui": "side",
|
|
34376
34989
|
"data-viewport-ui-name": "stylesPanel",
|
|
34377
|
-
children: /* @__PURE__ */
|
|
34990
|
+
children: /* @__PURE__ */ jsx132(
|
|
34378
34991
|
SelectedShapeActions,
|
|
34379
34992
|
{
|
|
34380
34993
|
appState,
|
|
@@ -34391,24 +35004,24 @@ var LayerUI = ({
|
|
|
34391
35004
|
const renderFixedSideContainer = () => {
|
|
34392
35005
|
const shouldRenderSelectedShapeActions = defaultUIEnabled && showSelectedShapeActions(appState, elements);
|
|
34393
35006
|
const shouldShowStats = defaultUIEnabled && appState.stats.open && !appState.zenModeEnabled && !appState.viewModeEnabled && appState.openDialog?.name !== "elementLinkSelector";
|
|
34394
|
-
return /* @__PURE__ */
|
|
34395
|
-
/* @__PURE__ */
|
|
35007
|
+
return /* @__PURE__ */ jsx132(FixedSideContainer, { side: "top", children: /* @__PURE__ */ jsxs68("div", { className: "App-menu App-menu_top", children: [
|
|
35008
|
+
/* @__PURE__ */ jsxs68(
|
|
34396
35009
|
Stack_default.Col,
|
|
34397
35010
|
{
|
|
34398
35011
|
gap: spacing.menuTopGap,
|
|
34399
|
-
className:
|
|
35012
|
+
className: clsx59("App-menu_top__left"),
|
|
34400
35013
|
children: [
|
|
34401
35014
|
renderCanvasActions(),
|
|
34402
|
-
defaultUIEnabled && /* @__PURE__ */
|
|
35015
|
+
defaultUIEnabled && /* @__PURE__ */ jsx132(
|
|
34403
35016
|
"div",
|
|
34404
35017
|
{
|
|
34405
|
-
className:
|
|
35018
|
+
className: clsx59("selected-shape-actions-container", {
|
|
34406
35019
|
"selected-shape-actions-container--compact": isCompactStylesPanel
|
|
34407
35020
|
}),
|
|
34408
35021
|
children: shouldRenderSelectedShapeActions && renderSelectedShapeActions()
|
|
34409
35022
|
}
|
|
34410
35023
|
),
|
|
34411
|
-
defaultUIEnabled && isCompactStylesPanel && !appState.viewModeEnabled && shouldRenderSelectedShapeActions && /* @__PURE__ */
|
|
35024
|
+
defaultUIEnabled && isCompactStylesPanel && !appState.viewModeEnabled && shouldRenderSelectedShapeActions && /* @__PURE__ */ jsx132(
|
|
34412
35025
|
PenModeButton,
|
|
34413
35026
|
{
|
|
34414
35027
|
checked: appState.penMode,
|
|
@@ -34421,17 +35034,17 @@ var LayerUI = ({
|
|
|
34421
35034
|
]
|
|
34422
35035
|
}
|
|
34423
35036
|
),
|
|
34424
|
-
defaultUIEnabled && !appState.viewModeEnabled && appState.openDialog?.name !== "elementLinkSelector" && /* @__PURE__ */
|
|
34425
|
-
renderWelcomeScreen && /* @__PURE__ */
|
|
34426
|
-
/* @__PURE__ */
|
|
35037
|
+
defaultUIEnabled && !appState.viewModeEnabled && appState.openDialog?.name !== "elementLinkSelector" && /* @__PURE__ */ jsx132(Section, { heading: "shapes", className: "shapes-section", children: (heading) => /* @__PURE__ */ jsxs68("div", { style: { position: "relative" }, children: [
|
|
35038
|
+
renderWelcomeScreen && /* @__PURE__ */ jsx132(tunnels.WelcomeScreenToolbarHintTunnel.Out, {}),
|
|
35039
|
+
/* @__PURE__ */ jsx132(Stack_default.Col, { gap: spacing.toolbarColGap, align: "start", children: /* @__PURE__ */ jsxs68(
|
|
34427
35040
|
Stack_default.Row,
|
|
34428
35041
|
{
|
|
34429
35042
|
gap: spacing.toolbarRowGap,
|
|
34430
|
-
className:
|
|
35043
|
+
className: clsx59("App-toolbar-container", {
|
|
34431
35044
|
"zen-mode": appState.zenModeEnabled
|
|
34432
35045
|
}),
|
|
34433
35046
|
children: [
|
|
34434
|
-
/* @__PURE__ */
|
|
35047
|
+
/* @__PURE__ */ jsx132(
|
|
34435
35048
|
Toolbar,
|
|
34436
35049
|
{
|
|
34437
35050
|
app,
|
|
@@ -34444,7 +35057,7 @@ var LayerUI = ({
|
|
|
34444
35057
|
heading
|
|
34445
35058
|
}
|
|
34446
35059
|
),
|
|
34447
|
-
isCollaborating && /* @__PURE__ */
|
|
35060
|
+
isCollaborating && /* @__PURE__ */ jsx132(
|
|
34448
35061
|
Island,
|
|
34449
35062
|
{
|
|
34450
35063
|
style: {
|
|
@@ -34452,7 +35065,7 @@ var LayerUI = ({
|
|
|
34452
35065
|
alignSelf: "center",
|
|
34453
35066
|
height: "fit-content"
|
|
34454
35067
|
},
|
|
34455
|
-
children: /* @__PURE__ */
|
|
35068
|
+
children: /* @__PURE__ */ jsx132(
|
|
34456
35069
|
LaserPointerButton,
|
|
34457
35070
|
{
|
|
34458
35071
|
title: t("toolBar.laser"),
|
|
@@ -34467,10 +35080,10 @@ var LayerUI = ({
|
|
|
34467
35080
|
}
|
|
34468
35081
|
) })
|
|
34469
35082
|
] }) }),
|
|
34470
|
-
/* @__PURE__ */
|
|
35083
|
+
/* @__PURE__ */ jsxs68(
|
|
34471
35084
|
"div",
|
|
34472
35085
|
{
|
|
34473
|
-
className:
|
|
35086
|
+
className: clsx59(
|
|
34474
35087
|
"layer-ui__wrapper__top-right zen-mode-transition",
|
|
34475
35088
|
{
|
|
34476
35089
|
"transition-right": appState.zenModeEnabled,
|
|
@@ -34478,7 +35091,7 @@ var LayerUI = ({
|
|
|
34478
35091
|
}
|
|
34479
35092
|
),
|
|
34480
35093
|
children: [
|
|
34481
|
-
defaultUIEnabled && appState.collaborators.size > 0 && /* @__PURE__ */
|
|
35094
|
+
defaultUIEnabled && appState.collaborators.size > 0 && /* @__PURE__ */ jsx132(
|
|
34482
35095
|
UserList,
|
|
34483
35096
|
{
|
|
34484
35097
|
collaborators: appState.collaborators,
|
|
@@ -34490,7 +35103,7 @@ var LayerUI = ({
|
|
|
34490
35103
|
editorInterface.formFactor === "phone",
|
|
34491
35104
|
appState
|
|
34492
35105
|
),
|
|
34493
|
-
shouldShowStats && /* @__PURE__ */
|
|
35106
|
+
shouldShowStats && /* @__PURE__ */ jsx132(
|
|
34494
35107
|
Stats,
|
|
34495
35108
|
{
|
|
34496
35109
|
app,
|
|
@@ -34505,15 +35118,15 @@ var LayerUI = ({
|
|
|
34505
35118
|
)
|
|
34506
35119
|
] }) });
|
|
34507
35120
|
};
|
|
34508
|
-
const renderSidebars = () => /* @__PURE__ */
|
|
35121
|
+
const renderSidebars = () => /* @__PURE__ */ jsx132(DefaultSidebar, {});
|
|
34509
35122
|
const isSidebarDockedAndFits = false;
|
|
34510
|
-
const layerUIJSX = /* @__PURE__ */
|
|
35123
|
+
const layerUIJSX = /* @__PURE__ */ jsxs68(Fragment25, { children: [
|
|
34511
35124
|
children,
|
|
34512
|
-
defaultUIEnabled && /* @__PURE__ */
|
|
34513
|
-
/* @__PURE__ */
|
|
34514
|
-
defaultUIEnabled && appState.isLoading && /* @__PURE__ */
|
|
34515
|
-
defaultUIEnabled && appState.errorMessage && /* @__PURE__ */
|
|
34516
|
-
defaultUIEnabled && eyeDropperState && editorInterface.formFactor !== "phone" && /* @__PURE__ */
|
|
35125
|
+
defaultUIEnabled && /* @__PURE__ */ jsx132(Fragment25, { children: /* @__PURE__ */ jsx132(DefaultMainMenu, { UIOptions }) }),
|
|
35126
|
+
/* @__PURE__ */ jsx132(DefaultOverwriteConfirmDialog, {}),
|
|
35127
|
+
defaultUIEnabled && appState.isLoading && /* @__PURE__ */ jsx132(LoadingMessage, { delay: 250 }),
|
|
35128
|
+
defaultUIEnabled && appState.errorMessage && /* @__PURE__ */ jsx132(ErrorDialog, { onClose: () => setAppState({ errorMessage: null }), children: appState.errorMessage }),
|
|
35129
|
+
defaultUIEnabled && eyeDropperState && editorInterface.formFactor !== "phone" && /* @__PURE__ */ jsx132(
|
|
34517
35130
|
EyeDropper,
|
|
34518
35131
|
{
|
|
34519
35132
|
colorPickerType: eyeDropperState.colorPickerType,
|
|
@@ -34529,7 +35142,7 @@ var LayerUI = ({
|
|
|
34529
35142
|
mutateElement6(element, arrayToMap33(elements), {
|
|
34530
35143
|
[altKey && eyeDropperState.swapPreviewOnAlt ? colorPickerType === "elementBackground" ? "strokeColor" : "backgroundColor" : colorPickerType === "elementBackground" ? "backgroundColor" : "strokeColor"]: color
|
|
34531
35144
|
});
|
|
34532
|
-
|
|
35145
|
+
ShapeCache6.delete(element);
|
|
34533
35146
|
}
|
|
34534
35147
|
app.scene.triggerUpdate();
|
|
34535
35148
|
} else if (colorPickerType === "elementBackground") {
|
|
@@ -34548,7 +35161,7 @@ var LayerUI = ({
|
|
|
34548
35161
|
}
|
|
34549
35162
|
}
|
|
34550
35163
|
),
|
|
34551
|
-
appState.openDialog?.name === "help" && /* @__PURE__ */
|
|
35164
|
+
appState.openDialog?.name === "help" && /* @__PURE__ */ jsx132(
|
|
34552
35165
|
HelpDialog,
|
|
34553
35166
|
{
|
|
34554
35167
|
onClose: () => {
|
|
@@ -34556,7 +35169,7 @@ var LayerUI = ({
|
|
|
34556
35169
|
}
|
|
34557
35170
|
}
|
|
34558
35171
|
),
|
|
34559
|
-
defaultUIEnabled && appState.openDialog?.name === "elementLinkSelector" && /* @__PURE__ */
|
|
35172
|
+
defaultUIEnabled && appState.openDialog?.name === "elementLinkSelector" && /* @__PURE__ */ jsx132(
|
|
34560
35173
|
ElementLinkDialog_default,
|
|
34561
35174
|
{
|
|
34562
35175
|
sourceElementId: appState.openDialog.sourceElementId,
|
|
@@ -34570,10 +35183,10 @@ var LayerUI = ({
|
|
|
34570
35183
|
generateLinkForSelection
|
|
34571
35184
|
}
|
|
34572
35185
|
),
|
|
34573
|
-
/* @__PURE__ */
|
|
35186
|
+
/* @__PURE__ */ jsx132(tunnels.OverwriteConfirmDialogTunnel.Out, {}),
|
|
34574
35187
|
renderImageExportDialog(),
|
|
34575
35188
|
renderJSONExportDialog(),
|
|
34576
|
-
defaultUIEnabled && appState.openDialog?.name === "charts" && /* @__PURE__ */
|
|
35189
|
+
defaultUIEnabled && appState.openDialog?.name === "charts" && /* @__PURE__ */ jsx132(
|
|
34577
35190
|
PasteChartDialog,
|
|
34578
35191
|
{
|
|
34579
35192
|
data: appState.openDialog.data,
|
|
@@ -34583,7 +35196,15 @@ var LayerUI = ({
|
|
|
34583
35196
|
})
|
|
34584
35197
|
}
|
|
34585
35198
|
),
|
|
34586
|
-
|
|
35199
|
+
defaultUIEnabled && /* @__PURE__ */ jsx132(
|
|
35200
|
+
GifPlaybackControls,
|
|
35201
|
+
{
|
|
35202
|
+
app,
|
|
35203
|
+
files,
|
|
35204
|
+
setAppState
|
|
35205
|
+
}
|
|
35206
|
+
),
|
|
35207
|
+
editorInterface.formFactor === "phone" && /* @__PURE__ */ jsx132(
|
|
34587
35208
|
MobileMenu,
|
|
34588
35209
|
{
|
|
34589
35210
|
app,
|
|
@@ -34602,8 +35223,8 @@ var LayerUI = ({
|
|
|
34602
35223
|
scrollBackToContentUIEnabled
|
|
34603
35224
|
}
|
|
34604
35225
|
),
|
|
34605
|
-
editorInterface.formFactor !== "phone" && /* @__PURE__ */
|
|
34606
|
-
appProps.viewportStatusFrame?.border && /* @__PURE__ */
|
|
35226
|
+
editorInterface.formFactor !== "phone" && /* @__PURE__ */ jsxs68(Fragment25, { children: [
|
|
35227
|
+
appProps.viewportStatusFrame?.border && /* @__PURE__ */ jsx132(
|
|
34607
35228
|
ViewportStatusBorder,
|
|
34608
35229
|
{
|
|
34609
35230
|
border: appProps.viewportStatusFrame.border,
|
|
@@ -34615,15 +35236,15 @@ var LayerUI = ({
|
|
|
34615
35236
|
} : void 0
|
|
34616
35237
|
}
|
|
34617
35238
|
),
|
|
34618
|
-
/* @__PURE__ */
|
|
35239
|
+
/* @__PURE__ */ jsxs68(
|
|
34619
35240
|
"div",
|
|
34620
35241
|
{
|
|
34621
35242
|
className: "layer-ui__wrapper",
|
|
34622
35243
|
style: isSidebarDockedAndFits ? { width: `calc(100% - var(--right-sidebar-width))` } : {},
|
|
34623
35244
|
children: [
|
|
34624
|
-
renderWelcomeScreen && /* @__PURE__ */
|
|
35245
|
+
renderWelcomeScreen && /* @__PURE__ */ jsx132(tunnels.WelcomeScreenCenterTunnel.Out, {}),
|
|
34625
35246
|
renderFixedSideContainer(),
|
|
34626
|
-
/* @__PURE__ */
|
|
35247
|
+
/* @__PURE__ */ jsx132(
|
|
34627
35248
|
Footer_default,
|
|
34628
35249
|
{
|
|
34629
35250
|
appState,
|
|
@@ -34634,8 +35255,8 @@ var LayerUI = ({
|
|
|
34634
35255
|
zoomUIEnabled
|
|
34635
35256
|
}
|
|
34636
35257
|
),
|
|
34637
|
-
(appState.toast || scrollBackToContentUIEnabled && appState.scrolledOutside || appProps.viewportStatusFrame?.label) && /* @__PURE__ */
|
|
34638
|
-
appState.toast && /* @__PURE__ */
|
|
35258
|
+
(appState.toast || scrollBackToContentUIEnabled && appState.scrolledOutside || appProps.viewportStatusFrame?.label) && /* @__PURE__ */ jsxs68("div", { className: "floating-status-stack", children: [
|
|
35259
|
+
appState.toast && /* @__PURE__ */ jsx132(
|
|
34639
35260
|
Toast,
|
|
34640
35261
|
{
|
|
34641
35262
|
message: appState.toast.message,
|
|
@@ -34644,7 +35265,7 @@ var LayerUI = ({
|
|
|
34644
35265
|
closable: appState.toast.closable
|
|
34645
35266
|
}
|
|
34646
35267
|
),
|
|
34647
|
-
!appState.toast && scrollBackToContentUIEnabled && appState.scrolledOutside && /* @__PURE__ */
|
|
35268
|
+
!appState.toast && scrollBackToContentUIEnabled && appState.scrolledOutside && /* @__PURE__ */ jsx132(
|
|
34648
35269
|
"button",
|
|
34649
35270
|
{
|
|
34650
35271
|
type: "button",
|
|
@@ -34657,7 +35278,7 @@ var LayerUI = ({
|
|
|
34657
35278
|
children: t("buttons.scrollBackToContent")
|
|
34658
35279
|
}
|
|
34659
35280
|
),
|
|
34660
|
-
appProps.viewportStatusFrame?.label && /* @__PURE__ */
|
|
35281
|
+
appProps.viewportStatusFrame?.label && /* @__PURE__ */ jsx132(
|
|
34661
35282
|
ViewportStatusBadge,
|
|
34662
35283
|
{
|
|
34663
35284
|
label: appProps.viewportStatusFrame.label,
|
|
@@ -34671,7 +35292,7 @@ var LayerUI = ({
|
|
|
34671
35292
|
] }),
|
|
34672
35293
|
renderSidebars()
|
|
34673
35294
|
] });
|
|
34674
|
-
return /* @__PURE__ */
|
|
35295
|
+
return /* @__PURE__ */ jsx132(UIAppStateContext.Provider, { value: appState, children: /* @__PURE__ */ jsx132(TunnelsJotaiProvider, { children: /* @__PURE__ */ jsx132(TunnelsContext.Provider, { value: tunnels, children: layerUIJSX }) }) });
|
|
34675
35296
|
};
|
|
34676
35297
|
var stripIrrelevantAppStateProps = (appState) => {
|
|
34677
35298
|
const {
|
|
@@ -34706,11 +35327,11 @@ var areEqual2 = (prevProps, nextProps) => {
|
|
|
34706
35327
|
}
|
|
34707
35328
|
) && isShallowEqual6(prev, next);
|
|
34708
35329
|
};
|
|
34709
|
-
var LayerUI_default =
|
|
35330
|
+
var LayerUI_default = React38.memo(LayerUI, areEqual2);
|
|
34710
35331
|
|
|
34711
35332
|
// components/SVGLayer.tsx
|
|
34712
35333
|
import { useEffect as useEffect34, useRef as useRef28 } from "react";
|
|
34713
|
-
import { jsx as
|
|
35334
|
+
import { jsx as jsx133 } from "react/jsx-runtime";
|
|
34714
35335
|
var SVGLayer = ({ trails }) => {
|
|
34715
35336
|
const svgRef = useRef28(null);
|
|
34716
35337
|
useEffect34(() => {
|
|
@@ -34725,16 +35346,16 @@ var SVGLayer = ({ trails }) => {
|
|
|
34725
35346
|
}
|
|
34726
35347
|
};
|
|
34727
35348
|
}, trails);
|
|
34728
|
-
return /* @__PURE__ */
|
|
35349
|
+
return /* @__PURE__ */ jsx133("div", { className: "SVGLayer", children: /* @__PURE__ */ jsx133("svg", { ref: svgRef }) });
|
|
34729
35350
|
};
|
|
34730
35351
|
|
|
34731
35352
|
// components/canvases/InteractiveCanvas.tsx
|
|
34732
|
-
import
|
|
35353
|
+
import React39, { useEffect as useEffect35, useRef as useRef29 } from "react";
|
|
34733
35354
|
import {
|
|
34734
35355
|
isShallowEqual as isShallowEqual7,
|
|
34735
|
-
sceneCoordsToViewportCoords as
|
|
35356
|
+
sceneCoordsToViewportCoords as sceneCoordsToViewportCoords5
|
|
34736
35357
|
} from "@excalidraw/common";
|
|
34737
|
-
import { jsx as
|
|
35358
|
+
import { jsx as jsx134 } from "react/jsx-runtime";
|
|
34738
35359
|
var INTERACTIVE_SCENE_ANIMATION_KEY = "animateInteractiveScene";
|
|
34739
35360
|
var InteractiveCanvas = (props) => {
|
|
34740
35361
|
const isComponentMounted = useRef29(false);
|
|
@@ -34797,7 +35418,7 @@ var InteractiveCanvas = (props) => {
|
|
|
34797
35418
|
}
|
|
34798
35419
|
remotePointerViewportCoords.set(
|
|
34799
35420
|
socketId,
|
|
34800
|
-
|
|
35421
|
+
sceneCoordsToViewportCoords5(
|
|
34801
35422
|
{
|
|
34802
35423
|
sceneX: user.pointer.x,
|
|
34803
35424
|
sceneY: user.pointer.y
|
|
@@ -34858,7 +35479,7 @@ var InteractiveCanvas = (props) => {
|
|
|
34858
35479
|
);
|
|
34859
35480
|
}
|
|
34860
35481
|
});
|
|
34861
|
-
return /* @__PURE__ */
|
|
35482
|
+
return /* @__PURE__ */ jsx134(
|
|
34862
35483
|
"canvas",
|
|
34863
35484
|
{
|
|
34864
35485
|
className: "excalidraw__canvas interactive",
|
|
@@ -34938,12 +35559,13 @@ var areEqual3 = (prevProps, nextProps) => {
|
|
|
34938
35559
|
getRelevantAppStateProps(nextProps.appState)
|
|
34939
35560
|
);
|
|
34940
35561
|
};
|
|
34941
|
-
var InteractiveCanvas_default =
|
|
35562
|
+
var InteractiveCanvas_default = React39.memo(InteractiveCanvas, areEqual3);
|
|
34942
35563
|
|
|
34943
35564
|
// components/canvases/StaticCanvas.tsx
|
|
34944
|
-
import
|
|
35565
|
+
import React40, { useEffect as useEffect36, useRef as useRef30 } from "react";
|
|
34945
35566
|
import { isShallowEqual as isShallowEqual8 } from "@excalidraw/common";
|
|
34946
|
-
import {
|
|
35567
|
+
import { hasActiveGifDecode } from "@excalidraw/element";
|
|
35568
|
+
import { jsx as jsx135 } from "react/jsx-runtime";
|
|
34947
35569
|
var StaticCanvas = (props) => {
|
|
34948
35570
|
const wrapperRef = useRef30(null);
|
|
34949
35571
|
const isComponentMounted = useRef30(false);
|
|
@@ -34952,7 +35574,7 @@ var StaticCanvas = (props) => {
|
|
|
34952
35574
|
});
|
|
34953
35575
|
const transitionFrameRef = useRef30(null);
|
|
34954
35576
|
propsRef.current = props;
|
|
34955
|
-
const renderCanvas =
|
|
35577
|
+
const renderCanvas = React40.useCallback(() => {
|
|
34956
35578
|
const currentProps = propsRef.current;
|
|
34957
35579
|
const wrapper = wrapperRef.current;
|
|
34958
35580
|
if (!wrapper) {
|
|
@@ -34987,7 +35609,11 @@ var StaticCanvas = (props) => {
|
|
|
34987
35609
|
)?.transitionStart;
|
|
34988
35610
|
return transitionStart !== void 0 && performance.now() - transitionStart < transitionDuration;
|
|
34989
35611
|
});
|
|
34990
|
-
|
|
35612
|
+
const hasActiveGifDecodeInRender = hasActiveGifDecode(
|
|
35613
|
+
currentProps.visibleElements,
|
|
35614
|
+
currentProps.renderConfig.imageCache
|
|
35615
|
+
);
|
|
35616
|
+
if ((hasActiveTransition || hasActiveGifDecodeInRender) && transitionFrameRef.current === null) {
|
|
34991
35617
|
transitionFrameRef.current = requestAnimationFrame(() => {
|
|
34992
35618
|
transitionFrameRef.current = null;
|
|
34993
35619
|
renderCanvasRef.current();
|
|
@@ -35040,7 +35666,7 @@ var StaticCanvas = (props) => {
|
|
|
35040
35666
|
},
|
|
35041
35667
|
[]
|
|
35042
35668
|
);
|
|
35043
|
-
return /* @__PURE__ */
|
|
35669
|
+
return /* @__PURE__ */ jsx135("div", { className: "excalidraw__canvas-wrapper", ref: wrapperRef });
|
|
35044
35670
|
};
|
|
35045
35671
|
var getRelevantAppStateProps2 = (appState) => {
|
|
35046
35672
|
const relevantAppStateProps = {
|
|
@@ -35085,7 +35711,7 @@ var areEqual4 = (prevProps, nextProps) => {
|
|
|
35085
35711
|
getRelevantAppStateProps2(nextProps.appState)
|
|
35086
35712
|
) && isShallowEqual8(prevProps.renderConfig, nextProps.renderConfig);
|
|
35087
35713
|
};
|
|
35088
|
-
var StaticCanvas_default =
|
|
35714
|
+
var StaticCanvas_default = React40.memo(StaticCanvas, areEqual4);
|
|
35089
35715
|
|
|
35090
35716
|
// components/canvases/NewElementCanvas.tsx
|
|
35091
35717
|
import { useEffect as useEffect37, useRef as useRef31 } from "react";
|
|
@@ -35162,7 +35788,7 @@ var renderNewElementScene = (renderConfig, throttle5) => {
|
|
|
35162
35788
|
};
|
|
35163
35789
|
|
|
35164
35790
|
// components/canvases/NewElementCanvas.tsx
|
|
35165
|
-
import { jsx as
|
|
35791
|
+
import { jsx as jsx136 } from "react/jsx-runtime";
|
|
35166
35792
|
var NewElementCanvas = (props) => {
|
|
35167
35793
|
const canvasRef = useRef31(null);
|
|
35168
35794
|
useEffect37(() => {
|
|
@@ -35183,7 +35809,7 @@ var NewElementCanvas = (props) => {
|
|
|
35183
35809
|
isRenderThrottlingEnabled()
|
|
35184
35810
|
);
|
|
35185
35811
|
});
|
|
35186
|
-
return /* @__PURE__ */
|
|
35812
|
+
return /* @__PURE__ */ jsx136(
|
|
35187
35813
|
"canvas",
|
|
35188
35814
|
{
|
|
35189
35815
|
className: "excalidraw__canvas",
|
|
@@ -35200,10 +35826,10 @@ var NewElementCanvas = (props) => {
|
|
|
35200
35826
|
var NewElementCanvas_default = NewElementCanvas;
|
|
35201
35827
|
|
|
35202
35828
|
// components/CursorHint.tsx
|
|
35203
|
-
import
|
|
35829
|
+
import clsx60 from "clsx";
|
|
35204
35830
|
import { useLayoutEffect as useLayoutEffect10, useEffect as useEffect38, useRef as useRef32, useState as useState34 } from "react";
|
|
35205
35831
|
import { ARROW_TYPE as ARROW_TYPE2, EVENT as EVENT10 } from "@excalidraw/common";
|
|
35206
|
-
import { jsx as
|
|
35832
|
+
import { jsx as jsx137 } from "react/jsx-runtime";
|
|
35207
35833
|
var CURSOR_HINT_DURATION = 700;
|
|
35208
35834
|
var CURSOR_HINT_FADE_DURATION = 100;
|
|
35209
35835
|
var CURSOR_HINT_GAP = 16;
|
|
@@ -35315,11 +35941,11 @@ var CursorHint = () => {
|
|
|
35315
35941
|
if (!hint) {
|
|
35316
35942
|
return null;
|
|
35317
35943
|
}
|
|
35318
|
-
return /* @__PURE__ */
|
|
35944
|
+
return /* @__PURE__ */ jsx137(
|
|
35319
35945
|
"div",
|
|
35320
35946
|
{
|
|
35321
35947
|
ref: hintRef,
|
|
35322
|
-
className:
|
|
35948
|
+
className: clsx60("CursorHint", {
|
|
35323
35949
|
"CursorHint--fade-out": isFadingOut
|
|
35324
35950
|
}),
|
|
35325
35951
|
"data-testid": "cursor-hint",
|
|
@@ -35446,14 +36072,14 @@ var AppStateObserver = class {
|
|
|
35446
36072
|
|
|
35447
36073
|
// components/UnlockPopup.tsx
|
|
35448
36074
|
import {
|
|
35449
|
-
getCommonBounds as
|
|
36075
|
+
getCommonBounds as getCommonBounds13,
|
|
35450
36076
|
getElementsInGroup as getElementsInGroup11,
|
|
35451
36077
|
isNonDeletedElement as isNonDeletedElement5,
|
|
35452
36078
|
selectGroupsFromGivenElements as selectGroupsFromGivenElements4
|
|
35453
36079
|
} from "@excalidraw/element";
|
|
35454
|
-
import { sceneCoordsToViewportCoords as
|
|
36080
|
+
import { sceneCoordsToViewportCoords as sceneCoordsToViewportCoords6 } from "@excalidraw/common";
|
|
35455
36081
|
import { flushSync } from "react-dom";
|
|
35456
|
-
import { jsx as
|
|
36082
|
+
import { jsx as jsx138 } from "react/jsx-runtime";
|
|
35457
36083
|
var UnlockPopup = ({
|
|
35458
36084
|
app,
|
|
35459
36085
|
activeLockedId
|
|
@@ -35472,12 +36098,12 @@ var UnlockPopup = ({
|
|
|
35472
36098
|
if (elements.length === 0) {
|
|
35473
36099
|
return null;
|
|
35474
36100
|
}
|
|
35475
|
-
const [x, y] =
|
|
35476
|
-
const { x: viewX, y: viewY } =
|
|
36101
|
+
const [x, y] = getCommonBounds13(elements);
|
|
36102
|
+
const { x: viewX, y: viewY } = sceneCoordsToViewportCoords6(
|
|
35477
36103
|
{ sceneX: x, sceneY: y },
|
|
35478
36104
|
app.state
|
|
35479
36105
|
);
|
|
35480
|
-
return /* @__PURE__ */
|
|
36106
|
+
return /* @__PURE__ */ jsx138(
|
|
35481
36107
|
"div",
|
|
35482
36108
|
{
|
|
35483
36109
|
className: "UnlockPopup",
|
|
@@ -35510,9 +36136,9 @@ var UnlockPopup = ({
|
|
|
35510
36136
|
var UnlockPopup_default = UnlockPopup;
|
|
35511
36137
|
|
|
35512
36138
|
// components/App.tsx
|
|
35513
|
-
import { Fragment as
|
|
35514
|
-
var AppContext =
|
|
35515
|
-
var AppPropsContext =
|
|
36139
|
+
import { Fragment as Fragment26, jsx as jsx139, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
36140
|
+
var AppContext = React41.createContext(null);
|
|
36141
|
+
var AppPropsContext = React41.createContext(null);
|
|
35516
36142
|
var editorInterfaceContextInitialValue = {
|
|
35517
36143
|
formFactor: "desktop",
|
|
35518
36144
|
desktopUIMode: "full",
|
|
@@ -35523,7 +36149,7 @@ var editorInterfaceContextInitialValue = {
|
|
|
35523
36149
|
canFitSidebar: false,
|
|
35524
36150
|
isLandscape: true
|
|
35525
36151
|
};
|
|
35526
|
-
var EditorInterfaceContext =
|
|
36152
|
+
var EditorInterfaceContext = React41.createContext(
|
|
35527
36153
|
editorInterfaceContextInitialValue
|
|
35528
36154
|
);
|
|
35529
36155
|
EditorInterfaceContext.displayName = "EditorInterfaceContext";
|
|
@@ -35532,11 +36158,11 @@ var editorLifecycleEventBehavior = {
|
|
|
35532
36158
|
"editor:initialize": { cardinality: "once", replay: "last" },
|
|
35533
36159
|
"editor:unmount": { cardinality: "once", replay: "last" }
|
|
35534
36160
|
};
|
|
35535
|
-
var ExcalidrawContainerContext =
|
|
36161
|
+
var ExcalidrawContainerContext = React41.createContext({ container: null, id: null });
|
|
35536
36162
|
ExcalidrawContainerContext.displayName = "ExcalidrawContainerContext";
|
|
35537
|
-
var ExcalidrawElementsContext =
|
|
36163
|
+
var ExcalidrawElementsContext = React41.createContext([]);
|
|
35538
36164
|
ExcalidrawElementsContext.displayName = "ExcalidrawElementsContext";
|
|
35539
|
-
var ExcalidrawAppStateContext =
|
|
36165
|
+
var ExcalidrawAppStateContext = React41.createContext({
|
|
35540
36166
|
...getDefaultAppState(),
|
|
35541
36167
|
width: 0,
|
|
35542
36168
|
height: 0,
|
|
@@ -35544,17 +36170,17 @@ var ExcalidrawAppStateContext = React40.createContext({
|
|
|
35544
36170
|
offsetTop: 0
|
|
35545
36171
|
});
|
|
35546
36172
|
ExcalidrawAppStateContext.displayName = "ExcalidrawAppStateContext";
|
|
35547
|
-
var ExcalidrawSetAppStateContext =
|
|
36173
|
+
var ExcalidrawSetAppStateContext = React41.createContext(() => {
|
|
35548
36174
|
console.warn("Uninitialized ExcalidrawSetAppStateContext context!");
|
|
35549
36175
|
});
|
|
35550
36176
|
ExcalidrawSetAppStateContext.displayName = "ExcalidrawSetAppStateContext";
|
|
35551
|
-
var ExcalidrawActionManagerContext =
|
|
36177
|
+
var ExcalidrawActionManagerContext = React41.createContext(
|
|
35552
36178
|
null
|
|
35553
36179
|
);
|
|
35554
36180
|
ExcalidrawActionManagerContext.displayName = "ExcalidrawActionManagerContext";
|
|
35555
|
-
var ExcalidrawAPIContext =
|
|
36181
|
+
var ExcalidrawAPIContext = React41.createContext(null);
|
|
35556
36182
|
ExcalidrawAPIContext.displayName = "ExcalidrawAPIContext";
|
|
35557
|
-
var ExcalidrawAPISetContext =
|
|
36183
|
+
var ExcalidrawAPISetContext = React41.createContext(null);
|
|
35558
36184
|
ExcalidrawAPISetContext.displayName = "ExcalidrawAPISetContext";
|
|
35559
36185
|
var useApp = () => useContext4(AppContext);
|
|
35560
36186
|
var useAppProps = () => useContext4(AppPropsContext);
|
|
@@ -35588,7 +36214,7 @@ var gesture = {
|
|
|
35588
36214
|
initialDistance: null,
|
|
35589
36215
|
initialScale: null
|
|
35590
36216
|
};
|
|
35591
|
-
var App = class _App extends
|
|
36217
|
+
var App = class _App extends React41.Component {
|
|
35592
36218
|
constructor(props) {
|
|
35593
36219
|
super(props);
|
|
35594
36220
|
__publicField(this, "canvas");
|
|
@@ -35601,7 +36227,7 @@ var App = class _App extends React40.Component {
|
|
|
35601
36227
|
__publicField(this, "stylesPanelMode", deriveStylesPanelMode2(
|
|
35602
36228
|
editorInterfaceContextInitialValue
|
|
35603
36229
|
));
|
|
35604
|
-
__publicField(this, "excalidrawContainerRef",
|
|
36230
|
+
__publicField(this, "excalidrawContainerRef", React41.createRef());
|
|
35605
36231
|
__publicField(this, "scene");
|
|
35606
36232
|
__publicField(this, "fonts");
|
|
35607
36233
|
__publicField(this, "renderer");
|
|
@@ -35643,6 +36269,7 @@ var App = class _App extends React40.Component {
|
|
|
35643
36269
|
__publicField(this, "bucketFill", new AppBucketFill(this));
|
|
35644
36270
|
__publicField(this, "flowchart", new AppFlowchart(this));
|
|
35645
36271
|
__publicField(this, "cursor", new AppCursor(this));
|
|
36272
|
+
__publicField(this, "gifPlayback", new AppGifPlayback(this));
|
|
35646
36273
|
__publicField(this, "zDragZoom", null);
|
|
35647
36274
|
__publicField(this, "arrowText", new AppArrowText(this));
|
|
35648
36275
|
__publicField(this, "viewport", new AppViewport(this, {
|
|
@@ -35763,7 +36390,7 @@ var App = class _App extends React40.Component {
|
|
|
35763
36390
|
});
|
|
35764
36391
|
__publicField(this, "updateEmbedValidationStatus", (element, status) => {
|
|
35765
36392
|
this.embedsValidationStatus.set(element.id, status);
|
|
35766
|
-
|
|
36393
|
+
ShapeCache7.delete(element);
|
|
35767
36394
|
});
|
|
35768
36395
|
__publicField(this, "updateEmbeddables", () => {
|
|
35769
36396
|
const iframeLikes = /* @__PURE__ */ new Set();
|
|
@@ -35870,7 +36497,7 @@ var App = class _App extends React40.Component {
|
|
|
35870
36497
|
}
|
|
35871
36498
|
return null;
|
|
35872
36499
|
}
|
|
35873
|
-
const { x: x1, y: y1 } =
|
|
36500
|
+
const { x: x1, y: y1 } = sceneCoordsToViewportCoords7(
|
|
35874
36501
|
{ sceneX: f.x, sceneY: f.y },
|
|
35875
36502
|
this.state
|
|
35876
36503
|
);
|
|
@@ -35879,7 +36506,7 @@ var App = class _App extends React40.Component {
|
|
|
35879
36506
|
const frameName = getFrameLikeTitle(f);
|
|
35880
36507
|
if (f.id === this.state.editingFrame) {
|
|
35881
36508
|
const frameNameInEdit = frameName;
|
|
35882
|
-
frameNameJSX = /* @__PURE__ */
|
|
36509
|
+
frameNameJSX = /* @__PURE__ */ jsx139(
|
|
35883
36510
|
"input",
|
|
35884
36511
|
{
|
|
35885
36512
|
autoFocus: true,
|
|
@@ -35924,7 +36551,7 @@ var App = class _App extends React40.Component {
|
|
|
35924
36551
|
} else {
|
|
35925
36552
|
frameNameJSX = frameName;
|
|
35926
36553
|
}
|
|
35927
|
-
return /* @__PURE__ */
|
|
36554
|
+
return /* @__PURE__ */ jsx139(
|
|
35928
36555
|
"div",
|
|
35929
36556
|
{
|
|
35930
36557
|
id: this.getFrameNameDOMId(f),
|
|
@@ -36030,7 +36657,7 @@ var App = class _App extends React40.Component {
|
|
|
36030
36657
|
this.updateScene({
|
|
36031
36658
|
elements: this.scene.getElementsIncludingDeleted().map((el) => {
|
|
36032
36659
|
if (this.state.selectedElementIds[el.id]) {
|
|
36033
|
-
return
|
|
36660
|
+
return newElementWith11(el, {
|
|
36034
36661
|
[shouldUpdateStrokeColor ? "strokeColor" : "backgroundColor"]: color
|
|
36035
36662
|
});
|
|
36036
36663
|
}
|
|
@@ -36113,6 +36740,7 @@ var App = class _App extends React40.Component {
|
|
|
36113
36740
|
}
|
|
36114
36741
|
}));
|
|
36115
36742
|
__publicField(this, "scheduleCapture", () => this.store.scheduleCapture());
|
|
36743
|
+
__publicField(this, "scheduleUpdate", () => this.store.scheduleAction(CaptureUpdateAction39.NEVER));
|
|
36116
36744
|
// Lifecycle
|
|
36117
36745
|
__publicField(this, "onBlur", withBatchedUpdates(() => {
|
|
36118
36746
|
isHoldingSpace = false;
|
|
@@ -36518,7 +37146,7 @@ var App = class _App extends React40.Component {
|
|
|
36518
37146
|
this.reconcileStylesPanelMode(this.editorInterface);
|
|
36519
37147
|
});
|
|
36520
37148
|
__publicField(this, "onResize", withBatchedUpdates(() => {
|
|
36521
|
-
this.scene.getElementsIncludingDeleted().forEach((element) =>
|
|
37149
|
+
this.scene.getElementsIncludingDeleted().forEach((element) => ShapeCache7.delete(element));
|
|
36522
37150
|
this.refreshEditorInterface();
|
|
36523
37151
|
this.updateDOMRect();
|
|
36524
37152
|
this.setState({});
|
|
@@ -36704,7 +37332,7 @@ var App = class _App extends React40.Component {
|
|
|
36704
37332
|
const elements = restoreElements(opts.elements, null, {
|
|
36705
37333
|
deleteInvisibleElements: true
|
|
36706
37334
|
});
|
|
36707
|
-
const [minX, minY, maxX, maxY] =
|
|
37335
|
+
const [minX, minY, maxX, maxY] = getCommonBounds14(elements);
|
|
36708
37336
|
const elementsCenterX = distance2(minX, maxX) / 2;
|
|
36709
37337
|
const elementsCenterY = distance2(minY, maxY) / 2;
|
|
36710
37338
|
const clientX = typeof opts.position === "object" ? opts.position.clientX : opts.position === "cursor" ? this.viewport.lastPosition.x : this.state.width / 2 + this.state.offsetLeft;
|
|
@@ -36719,7 +37347,7 @@ var App = class _App extends React40.Component {
|
|
|
36719
37347
|
const { duplicatedElements } = duplicateElements2({
|
|
36720
37348
|
type: "everything",
|
|
36721
37349
|
elements: elements.map((element) => {
|
|
36722
|
-
return
|
|
37350
|
+
return newElementWith11(element, {
|
|
36723
37351
|
x: element.x + gridX - minX,
|
|
36724
37352
|
y: element.y + gridY - minY
|
|
36725
37353
|
});
|
|
@@ -36904,7 +37532,7 @@ var App = class _App extends React40.Component {
|
|
|
36904
37532
|
return;
|
|
36905
37533
|
}
|
|
36906
37534
|
this.viewport.setViewport({
|
|
36907
|
-
target:
|
|
37535
|
+
target: getCommonBounds14(elements),
|
|
36908
37536
|
fit: "scale-down",
|
|
36909
37537
|
animation: { duration: 300 },
|
|
36910
37538
|
offsets: { ui: true }
|
|
@@ -36982,7 +37610,9 @@ var App = class _App extends React40.Component {
|
|
|
36982
37610
|
const refreshImageCache = _updateImageCache({
|
|
36983
37611
|
imageCache: this.imageCache,
|
|
36984
37612
|
fileIds: Array.from(placeholderFileIds),
|
|
36985
|
-
files: this.files
|
|
37613
|
+
files: this.files,
|
|
37614
|
+
onImageCacheUpdate: (fileId) => this.handleImageCacheUpdate(fileId),
|
|
37615
|
+
gifAutoDecodeMaxFileSizeBytes: this.props.imageOptions.gifAutoDecodeMaxFileSizeBytes
|
|
36986
37616
|
});
|
|
36987
37617
|
refreshImageCache.then(async ({ updatedFiles }) => {
|
|
36988
37618
|
for (const [fileId, placeholderImagePromise] of placeholderImages) {
|
|
@@ -37045,9 +37675,13 @@ var App = class _App extends React40.Component {
|
|
|
37045
37675
|
const placeholderEntry = {
|
|
37046
37676
|
image: imagePromise,
|
|
37047
37677
|
mimeType: normalizedFile.type,
|
|
37048
|
-
isPlaceholder: true
|
|
37678
|
+
isPlaceholder: true,
|
|
37679
|
+
gifDecodeStatus: normalizedFile.type === MIME_TYPES11.gif ? "pending" : void 0
|
|
37049
37680
|
};
|
|
37050
37681
|
this.imageCache.set(fileId, placeholderEntry);
|
|
37682
|
+
if (placeholderEntry.gifDecodeStatus === "pending") {
|
|
37683
|
+
this.imagePlaceholderUpdateEmitter.trigger();
|
|
37684
|
+
}
|
|
37051
37685
|
image.src = await getDataURL(normalizedFile);
|
|
37052
37686
|
try {
|
|
37053
37687
|
const loadedImage = await imagePromise;
|
|
@@ -37139,8 +37773,8 @@ var App = class _App extends React40.Component {
|
|
|
37139
37773
|
});
|
|
37140
37774
|
__publicField(this, "clearImageShapeCacheForFileId", (fileId) => {
|
|
37141
37775
|
for (const element of this.scene.getNonDeletedElements()) {
|
|
37142
|
-
if (
|
|
37143
|
-
|
|
37776
|
+
if (isInitializedImageElement5(element) && element.fileId === fileId) {
|
|
37777
|
+
ShapeCache7.delete(element);
|
|
37144
37778
|
}
|
|
37145
37779
|
}
|
|
37146
37780
|
});
|
|
@@ -37154,11 +37788,11 @@ var App = class _App extends React40.Component {
|
|
|
37154
37788
|
}
|
|
37155
37789
|
addedFiles[fileData.id] = fileData;
|
|
37156
37790
|
nextFiles[fileData.id] = fileData;
|
|
37157
|
-
if (fileData.mimeType ===
|
|
37791
|
+
if (fileData.mimeType === MIME_TYPES11.svg) {
|
|
37158
37792
|
try {
|
|
37159
37793
|
const restoredDataURL = getDataURL_sync(
|
|
37160
37794
|
normalizeSVG(dataURLToString(fileData.dataURL)),
|
|
37161
|
-
|
|
37795
|
+
MIME_TYPES11.svg
|
|
37162
37796
|
);
|
|
37163
37797
|
if (fileData.dataURL !== restoredDataURL) {
|
|
37164
37798
|
fileData.version = (fileData.version ?? 1) + 1;
|
|
@@ -38870,7 +39504,7 @@ var App = class _App extends React40.Component {
|
|
|
38870
39504
|
}
|
|
38871
39505
|
} else if (selectedElements.length > 1 && !isOverScrollBar && this.state.openDialog?.name !== "elementLinkSelector") {
|
|
38872
39506
|
const transformHandleType = getTransformHandleTypeFromCoords(
|
|
38873
|
-
|
|
39507
|
+
getCommonBounds14(selectedElements),
|
|
38874
39508
|
scenePointerX,
|
|
38875
39509
|
scenePointerY,
|
|
38876
39510
|
this.state.zoom,
|
|
@@ -39579,7 +40213,7 @@ var App = class _App extends React40.Component {
|
|
|
39579
40213
|
}
|
|
39580
40214
|
} else if (selectedElements.length > 1) {
|
|
39581
40215
|
pointerDownState.resize.handleType = getTransformHandleTypeFromCoords(
|
|
39582
|
-
|
|
40216
|
+
getCommonBounds14(selectedElements),
|
|
39583
40217
|
pointerDownState.origin.x,
|
|
39584
40218
|
pointerDownState.origin.y,
|
|
39585
40219
|
this.state.zoom,
|
|
@@ -40414,7 +41048,7 @@ var App = class _App extends React40.Component {
|
|
|
40414
41048
|
const elements = this.scene.getElementsIncludingDeleted().map((ele) => {
|
|
40415
41049
|
if (this.elementsPendingErasure.has(ele.id) || ele.frameId && this.elementsPendingErasure.has(ele.frameId) || isBoundToContainer10(ele) && this.elementsPendingErasure.has(ele.containerId)) {
|
|
40416
41050
|
didChange = true;
|
|
40417
|
-
return
|
|
41051
|
+
return newElementWith11(ele, { isDeleted: true });
|
|
40418
41052
|
}
|
|
40419
41053
|
return ele;
|
|
40420
41054
|
});
|
|
@@ -40429,7 +41063,11 @@ var App = class _App extends React40.Component {
|
|
|
40429
41063
|
throw new Error(t("errors.unsupportedFileType"));
|
|
40430
41064
|
}
|
|
40431
41065
|
this.cursor.set("wait");
|
|
40432
|
-
|
|
41066
|
+
const placeholderGifFileId = this.gifPlayback.createPlaceholderDecodeState(
|
|
41067
|
+
placeholderImageElement,
|
|
41068
|
+
imageFile
|
|
41069
|
+
);
|
|
41070
|
+
if (imageFile.type === MIME_TYPES11.svg) {
|
|
40433
41071
|
try {
|
|
40434
41072
|
imageFile = SVGStringToFile(
|
|
40435
41073
|
normalizeSVG(await imageFile.text()),
|
|
@@ -40439,7 +41077,7 @@ var App = class _App extends React40.Component {
|
|
|
40439
41077
|
console.warn(error);
|
|
40440
41078
|
throw new Error(t("errors.svgImageInsertError"));
|
|
40441
41079
|
}
|
|
40442
|
-
} else {
|
|
41080
|
+
} else if (imageFile.type !== MIME_TYPES11.gif) {
|
|
40443
41081
|
const { maxWidthOrHeight } = this.props.imageOptions;
|
|
40444
41082
|
try {
|
|
40445
41083
|
imageFile = await (this.props.compressImageFile ?? resizeImageFile)(
|
|
@@ -40451,6 +41089,7 @@ var App = class _App extends React40.Component {
|
|
|
40451
41089
|
}
|
|
40452
41090
|
}
|
|
40453
41091
|
const mimeType = imageFile.type;
|
|
41092
|
+
const isGif = mimeType === MIME_TYPES11.gif;
|
|
40454
41093
|
const fileId = await (this.props.generateIdForFile?.(
|
|
40455
41094
|
imageFile
|
|
40456
41095
|
) || generateIdFromFile(imageFile));
|
|
@@ -40489,8 +41128,21 @@ var App = class _App extends React40.Component {
|
|
|
40489
41128
|
lastRetrieved: Date.now()
|
|
40490
41129
|
}
|
|
40491
41130
|
]);
|
|
41131
|
+
if (isGif) {
|
|
41132
|
+
initializedImageElement = this.gifPlayback.ensureElementPlaybackMetadata(
|
|
41133
|
+
initializedImageElement
|
|
41134
|
+
);
|
|
41135
|
+
this.scene.replaceAllElements(
|
|
41136
|
+
this.scene.getElementsIncludingDeleted().map(
|
|
41137
|
+
(element) => element.id === initializedImageElement.id ? initializedImageElement : element
|
|
41138
|
+
)
|
|
41139
|
+
);
|
|
41140
|
+
this.imagePlaceholderUpdateEmitter.trigger();
|
|
41141
|
+
}
|
|
40492
41142
|
if (!this.imageCache.get(fileId)) {
|
|
40493
|
-
|
|
41143
|
+
if (!isGif) {
|
|
41144
|
+
this.addNewImagesToImageCache();
|
|
41145
|
+
}
|
|
40494
41146
|
const { erroredFiles } = await this.updateImageCache([
|
|
40495
41147
|
initializedImageElement
|
|
40496
41148
|
]);
|
|
@@ -40511,9 +41163,13 @@ var App = class _App extends React40.Component {
|
|
|
40511
41163
|
);
|
|
40512
41164
|
Object.assign(initializedImageElement, naturalDimensions);
|
|
40513
41165
|
}
|
|
40514
|
-
initializedImageElement =
|
|
41166
|
+
initializedImageElement = newElementWith11(initializedImageElement, {
|
|
40515
41167
|
fileName: imageFile.name,
|
|
40516
41168
|
thumbHash,
|
|
41169
|
+
gifPlayback: isGif ? this.gifPlayback.ensureElementPlaybackMetadata(
|
|
41170
|
+
initializedImageElement,
|
|
41171
|
+
{ playing: true }
|
|
41172
|
+
).gifPlayback : null,
|
|
40517
41173
|
status: "saved"
|
|
40518
41174
|
});
|
|
40519
41175
|
this.files = {
|
|
@@ -40524,8 +41180,12 @@ var App = class _App extends React40.Component {
|
|
|
40524
41180
|
thumbHash: thumbHash ?? void 0
|
|
40525
41181
|
}
|
|
40526
41182
|
};
|
|
41183
|
+
if (placeholderGifFileId && placeholderGifFileId !== fileId) {
|
|
41184
|
+
this.gifPlayback.removePlaceholderDecodeState(placeholderGifFileId);
|
|
41185
|
+
}
|
|
40527
41186
|
resolve(initializedImageElement);
|
|
40528
41187
|
} catch (error) {
|
|
41188
|
+
this.gifPlayback.removePlaceholderDecodeState(placeholderGifFileId);
|
|
40529
41189
|
console.error(error);
|
|
40530
41190
|
reject(new Error(t("errors.imageInsertError")));
|
|
40531
41191
|
}
|
|
@@ -40539,7 +41199,7 @@ var App = class _App extends React40.Component {
|
|
|
40539
41199
|
*/
|
|
40540
41200
|
__publicField(this, "getLatestInitializedImageElement", (imagePlaceholder, fileId) => {
|
|
40541
41201
|
const latestImageElement = this.scene.getElement(imagePlaceholder.id) ?? imagePlaceholder;
|
|
40542
|
-
return
|
|
41202
|
+
return newElementWith11(
|
|
40543
41203
|
latestImageElement,
|
|
40544
41204
|
{
|
|
40545
41205
|
fileId
|
|
@@ -40601,6 +41261,16 @@ var App = class _App extends React40.Component {
|
|
|
40601
41261
|
});
|
|
40602
41262
|
/** updates image cache, refreshing updated elements and/or setting status
|
|
40603
41263
|
to error for images that fail during <img> element creation */
|
|
41264
|
+
__publicField(this, "handleImageCacheUpdate", (fileId) => {
|
|
41265
|
+
for (const element of this.scene.getNonDeletedElements()) {
|
|
41266
|
+
if (isInitializedImageElement5(element) && element.fileId === fileId) {
|
|
41267
|
+
ShapeCache7.delete(element);
|
|
41268
|
+
}
|
|
41269
|
+
}
|
|
41270
|
+
this.imagePlaceholderUpdateEmitter.trigger();
|
|
41271
|
+
this.scene.triggerUpdate();
|
|
41272
|
+
this.ensureGifPlaybackLoop();
|
|
41273
|
+
});
|
|
40604
41274
|
__publicField(this, "updateImageCache", async (elements, files = this.files) => {
|
|
40605
41275
|
const placeholderImages = /* @__PURE__ */ new Map();
|
|
40606
41276
|
for (const element of elements) {
|
|
@@ -40615,7 +41285,9 @@ var App = class _App extends React40.Component {
|
|
|
40615
41285
|
const { updatedFiles, erroredFiles } = await _updateImageCache({
|
|
40616
41286
|
imageCache: this.imageCache,
|
|
40617
41287
|
fileIds: elements.map((element) => element.fileId),
|
|
40618
|
-
files
|
|
41288
|
+
files,
|
|
41289
|
+
onImageCacheUpdate: (fileId) => this.handleImageCacheUpdate(fileId),
|
|
41290
|
+
gifAutoDecodeMaxFileSizeBytes: this.props.imageOptions.gifAutoDecodeMaxFileSizeBytes
|
|
40619
41291
|
});
|
|
40620
41292
|
for (const [fileId, placeholderImagePromise] of placeholderImages) {
|
|
40621
41293
|
const cacheEntry = this.imageCache.get(fileId);
|
|
@@ -40632,14 +41304,14 @@ var App = class _App extends React40.Component {
|
|
|
40632
41304
|
this.store.scheduleAction(CaptureUpdateAction39.NEVER);
|
|
40633
41305
|
this.scene.replaceAllElements(
|
|
40634
41306
|
this.scene.getElementsIncludingDeleted().map((element) => {
|
|
40635
|
-
if (
|
|
41307
|
+
if (isInitializedImageElement5(element)) {
|
|
40636
41308
|
if (erroredFiles.has(element.fileId)) {
|
|
40637
|
-
return
|
|
41309
|
+
return newElementWith11(element, {
|
|
40638
41310
|
status: "error"
|
|
40639
41311
|
});
|
|
40640
41312
|
}
|
|
40641
41313
|
if (updatedFiles.has(element.fileId) && element.status === "error") {
|
|
40642
|
-
return
|
|
41314
|
+
return newElementWith11(element, {
|
|
40643
41315
|
status: "saved"
|
|
40644
41316
|
});
|
|
40645
41317
|
}
|
|
@@ -40650,6 +41322,32 @@ var App = class _App extends React40.Component {
|
|
|
40650
41322
|
}
|
|
40651
41323
|
return { updatedFiles, erroredFiles };
|
|
40652
41324
|
});
|
|
41325
|
+
__publicField(this, "ensureGifPlaybackLoop", () => {
|
|
41326
|
+
this.gifPlayback.ensureLoop();
|
|
41327
|
+
});
|
|
41328
|
+
__publicField(this, "loadDeferredGif", async (fileId) => {
|
|
41329
|
+
const cacheEntry = this.imageCache.get(fileId);
|
|
41330
|
+
const fileData = this.files[fileId];
|
|
41331
|
+
if (fileData?.mimeType !== MIME_TYPES11.gif || !cacheEntry) {
|
|
41332
|
+
return;
|
|
41333
|
+
}
|
|
41334
|
+
this.imageCache.set(fileId, {
|
|
41335
|
+
...cacheEntry,
|
|
41336
|
+
gifDecodeStatus: "pending"
|
|
41337
|
+
});
|
|
41338
|
+
this.handleImageCacheUpdate(fileId);
|
|
41339
|
+
await _updateImageCache({
|
|
41340
|
+
imageCache: this.imageCache,
|
|
41341
|
+
fileIds: [fileId],
|
|
41342
|
+
files: this.files,
|
|
41343
|
+
onImageCacheUpdate: (updatedFileId) => this.handleImageCacheUpdate(updatedFileId),
|
|
41344
|
+
forceGifDecode: true
|
|
41345
|
+
});
|
|
41346
|
+
});
|
|
41347
|
+
__publicField(this, "getGifPlaybackFrameIndex", (element) => this.gifPlayback.getFrameIndex(element));
|
|
41348
|
+
__publicField(this, "setGifPlaybackFrameIndex", (element, frameIndex) => {
|
|
41349
|
+
this.gifPlayback.setFrameIndex(element, frameIndex);
|
|
41350
|
+
});
|
|
40653
41351
|
/** adds new images to imageCache and re-renders if needed */
|
|
40654
41352
|
__publicField(this, "addNewImagesToImageCache", async (imageElements = getInitializedImageElements(
|
|
40655
41353
|
this.scene.getNonDeletedElements()
|
|
@@ -40665,7 +41363,7 @@ var App = class _App extends React40.Component {
|
|
|
40665
41363
|
if (updatedFiles.size) {
|
|
40666
41364
|
for (const element of uncachedImageElements) {
|
|
40667
41365
|
if (updatedFiles.has(element.fileId)) {
|
|
40668
|
-
|
|
41366
|
+
ShapeCache7.delete(element);
|
|
40669
41367
|
}
|
|
40670
41368
|
}
|
|
40671
41369
|
}
|
|
@@ -40726,7 +41424,7 @@ var App = class _App extends React40.Component {
|
|
|
40726
41424
|
this.setState({
|
|
40727
41425
|
errorMessage: error.message || t("errors.imageInsertError")
|
|
40728
41426
|
});
|
|
40729
|
-
return
|
|
41427
|
+
return newElementWith11(placeholder, {
|
|
40730
41428
|
isDeleted: true
|
|
40731
41429
|
});
|
|
40732
41430
|
}
|
|
@@ -40791,7 +41489,7 @@ var App = class _App extends React40.Component {
|
|
|
40791
41489
|
}
|
|
40792
41490
|
if (fileItems.length === 1) {
|
|
40793
41491
|
const { file: file2, fileHandle } = fileItems[0];
|
|
40794
|
-
if (file2 && (file2.type ===
|
|
41492
|
+
if (file2 && (file2.type === MIME_TYPES11.png || file2.type === MIME_TYPES11.svg)) {
|
|
40795
41493
|
try {
|
|
40796
41494
|
const scene = await loadFromBlob(
|
|
40797
41495
|
file2,
|
|
@@ -40834,7 +41532,7 @@ var App = class _App extends React40.Component {
|
|
|
40834
41532
|
await this.loadFileToCanvas(file2, fileHandle);
|
|
40835
41533
|
}
|
|
40836
41534
|
}
|
|
40837
|
-
const textItem = dataTransferList.findByType(
|
|
41535
|
+
const textItem = dataTransferList.findByType(MIME_TYPES11.text);
|
|
40838
41536
|
if (textItem) {
|
|
40839
41537
|
const text = textItem.value;
|
|
40840
41538
|
if (text && embeddableURLValidator2(text, this.props.validateEmbeddable) && (/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(text) || getEmbedLink2(text)?.type === "video")) {
|
|
@@ -40991,7 +41689,7 @@ var App = class _App extends React40.Component {
|
|
|
40991
41689
|
pointerCoords.y,
|
|
40992
41690
|
event[KEYS52.CTRL_OR_CMD] ? null : this.getEffectiveGridSize()
|
|
40993
41691
|
);
|
|
40994
|
-
const image =
|
|
41692
|
+
const image = isInitializedImageElement5(newElement9) && this.imageCache.get(newElement9.fileId)?.image;
|
|
40995
41693
|
const aspectRatio = image && !(image instanceof Promise) ? image.width / image.height : null;
|
|
40996
41694
|
this.maybeCacheReferenceSnapPoints(event, [newElement9]);
|
|
40997
41695
|
const { snapOffset, snapLines } = snapNewElement(
|
|
@@ -41063,7 +41761,7 @@ var App = class _App extends React40.Component {
|
|
|
41063
41761
|
const croppingAtStateStart = pointerDownState.originalElements.get(
|
|
41064
41762
|
croppingElement.id
|
|
41065
41763
|
);
|
|
41066
|
-
const image =
|
|
41764
|
+
const image = isInitializedImageElement5(croppingElement) && this.imageCache.get(croppingElement.fileId)?.image;
|
|
41067
41765
|
if (croppingAtStateStart && isImageElement9(croppingAtStateStart) && image && !(image instanceof Promise)) {
|
|
41068
41766
|
const [gridX, gridY] = getGridPoint4(
|
|
41069
41767
|
pointerCoords.x,
|
|
@@ -42075,8 +42773,8 @@ var App = class _App extends React40.Component {
|
|
|
42075
42773
|
const embeddableElements = this.scene.getNonDeletedElements().filter(
|
|
42076
42774
|
(el) => isEmbeddableElement4(el) && this.embedsValidationStatus.get(el.id) === true || isIframeElement2(el)
|
|
42077
42775
|
);
|
|
42078
|
-
return /* @__PURE__ */
|
|
42079
|
-
const { x, y } =
|
|
42776
|
+
return /* @__PURE__ */ jsx139(Fragment26, { children: embeddableElements.map((el) => {
|
|
42777
|
+
const { x, y } = sceneCoordsToViewportCoords7(
|
|
42080
42778
|
{ sceneX: el.x, sceneY: el.y },
|
|
42081
42779
|
this.state
|
|
42082
42780
|
);
|
|
@@ -42104,10 +42802,10 @@ var App = class _App extends React40.Component {
|
|
|
42104
42802
|
0.75,
|
|
42105
42803
|
MAX_EMBEDDABLE_VIEWPORT_SCALE
|
|
42106
42804
|
);
|
|
42107
|
-
return /* @__PURE__ */
|
|
42805
|
+
return /* @__PURE__ */ jsx139(
|
|
42108
42806
|
"div",
|
|
42109
42807
|
{
|
|
42110
|
-
className:
|
|
42808
|
+
className: clsx61("excalidraw__embeddable-container", {
|
|
42111
42809
|
"is-hovered": isHovered
|
|
42112
42810
|
}),
|
|
42113
42811
|
style: {
|
|
@@ -42125,7 +42823,7 @@ var App = class _App extends React40.Component {
|
|
|
42125
42823
|
el
|
|
42126
42824
|
)}px`
|
|
42127
42825
|
},
|
|
42128
|
-
children: /* @__PURE__ */
|
|
42826
|
+
children: /* @__PURE__ */ jsxs69(
|
|
42129
42827
|
"div",
|
|
42130
42828
|
{
|
|
42131
42829
|
className: "excalidraw__embeddable-container__inner",
|
|
@@ -42136,15 +42834,15 @@ var App = class _App extends React40.Component {
|
|
|
42136
42834
|
pointerEvents: isActive ? POINTER_EVENTS.enabled : POINTER_EVENTS.disabled
|
|
42137
42835
|
},
|
|
42138
42836
|
children: [
|
|
42139
|
-
isHovered && /* @__PURE__ */
|
|
42140
|
-
/* @__PURE__ */
|
|
42837
|
+
isHovered && /* @__PURE__ */ jsx139("div", { className: "excalidraw__embeddable-hint", children: t("buttons.embeddableInteractionButton") }),
|
|
42838
|
+
/* @__PURE__ */ jsx139(
|
|
42141
42839
|
"div",
|
|
42142
42840
|
{
|
|
42143
42841
|
className: "excalidraw__embeddable__outer",
|
|
42144
42842
|
style: {
|
|
42145
42843
|
padding: `${el.strokeWidth}px`
|
|
42146
42844
|
},
|
|
42147
|
-
children: /* @__PURE__ */
|
|
42845
|
+
children: /* @__PURE__ */ jsx139(
|
|
42148
42846
|
"div",
|
|
42149
42847
|
{
|
|
42150
42848
|
className: "excalidraw__embeddable__content",
|
|
@@ -42153,7 +42851,7 @@ var App = class _App extends React40.Component {
|
|
|
42153
42851
|
height: `${embeddableViewportScale * 100}%`,
|
|
42154
42852
|
transform: `scale(${1 / embeddableViewportScale})`
|
|
42155
42853
|
},
|
|
42156
|
-
children: (isEmbeddableElement4(el) ? this.props.renderEmbeddable?.(el, this.state) : null) ?? /* @__PURE__ */
|
|
42854
|
+
children: (isEmbeddableElement4(el) ? this.props.renderEmbeddable?.(el, this.state) : null) ?? /* @__PURE__ */ jsx139(
|
|
42157
42855
|
"iframe",
|
|
42158
42856
|
{
|
|
42159
42857
|
ref: (ref) => this.cacheEmbeddableRef(el, ref),
|
|
@@ -42220,11 +42918,11 @@ var App = class _App extends React40.Component {
|
|
|
42220
42918
|
);
|
|
42221
42919
|
const firstSelectedElement = selectedElements[0];
|
|
42222
42920
|
const showShapeSwitchPanel = editorJotaiStore.get(convertElementTypePopupAtom)?.type === "panel";
|
|
42223
|
-
return /* @__PURE__ */
|
|
42921
|
+
return /* @__PURE__ */ jsx139(
|
|
42224
42922
|
"div",
|
|
42225
42923
|
{
|
|
42226
42924
|
translate: "no",
|
|
42227
|
-
className:
|
|
42925
|
+
className: clsx61(
|
|
42228
42926
|
"excalidraw excalidraw-container notranslate",
|
|
42229
42927
|
this.props.className,
|
|
42230
42928
|
{
|
|
@@ -42252,25 +42950,25 @@ var App = class _App extends React40.Component {
|
|
|
42252
42950
|
onKeyDown: this.props.handleKeyboardGlobally || !this.isInteractionEnabled() ? void 0 : this.onKeyDown,
|
|
42253
42951
|
onPointerEnter: this.isInteractionEnabled() ? this.toggleOverscrollBehavior : void 0,
|
|
42254
42952
|
onPointerLeave: this.isInteractionEnabled() ? this.toggleOverscrollBehavior : void 0,
|
|
42255
|
-
children: /* @__PURE__ */
|
|
42953
|
+
children: /* @__PURE__ */ jsx139(ExcalidrawAPIContext.Provider, { value: this.api, children: /* @__PURE__ */ jsx139(AppContext.Provider, { value: this, children: /* @__PURE__ */ jsx139(AppPropsContext.Provider, { value: this.props, children: /* @__PURE__ */ jsx139(
|
|
42256
42954
|
ExcalidrawContainerContext.Provider,
|
|
42257
42955
|
{
|
|
42258
42956
|
value: this.excalidrawContainerValue,
|
|
42259
|
-
children: /* @__PURE__ */
|
|
42957
|
+
children: /* @__PURE__ */ jsx139(EditorInterfaceContext.Provider, { value: this.editorInterface, children: /* @__PURE__ */ jsx139(
|
|
42260
42958
|
ExcalidrawSetAppStateContext.Provider,
|
|
42261
42959
|
{
|
|
42262
42960
|
value: this.setAppState,
|
|
42263
|
-
children: /* @__PURE__ */
|
|
42961
|
+
children: /* @__PURE__ */ jsx139(ExcalidrawAppStateContext.Provider, { value: this.state, children: /* @__PURE__ */ jsxs69(
|
|
42264
42962
|
ExcalidrawElementsContext.Provider,
|
|
42265
42963
|
{
|
|
42266
42964
|
value: this.scene.getNonDeletedElements(),
|
|
42267
42965
|
children: [
|
|
42268
|
-
/* @__PURE__ */
|
|
42966
|
+
/* @__PURE__ */ jsxs69(
|
|
42269
42967
|
ExcalidrawActionManagerContext.Provider,
|
|
42270
42968
|
{
|
|
42271
42969
|
value: this.actionManager,
|
|
42272
42970
|
children: [
|
|
42273
|
-
/* @__PURE__ */
|
|
42971
|
+
/* @__PURE__ */ jsx139(
|
|
42274
42972
|
LayerUI_default,
|
|
42275
42973
|
{
|
|
42276
42974
|
canvas: this.canvas,
|
|
@@ -42301,10 +42999,10 @@ var App = class _App extends React40.Component {
|
|
|
42301
42999
|
children: this.props.children
|
|
42302
43000
|
}
|
|
42303
43001
|
),
|
|
42304
|
-
/* @__PURE__ */
|
|
42305
|
-
/* @__PURE__ */
|
|
42306
|
-
/* @__PURE__ */
|
|
42307
|
-
/* @__PURE__ */
|
|
43002
|
+
/* @__PURE__ */ jsx139("div", { className: "excalidraw-textEditorContainer" }),
|
|
43003
|
+
/* @__PURE__ */ jsx139("div", { className: "excalidraw-contextMenuContainer" }),
|
|
43004
|
+
/* @__PURE__ */ jsx139("div", { className: "excalidraw-eye-dropper-container" }),
|
|
43005
|
+
/* @__PURE__ */ jsx139(
|
|
42308
43006
|
SVGLayer,
|
|
42309
43007
|
{
|
|
42310
43008
|
trails: [
|
|
@@ -42315,8 +43013,8 @@ var App = class _App extends React40.Component {
|
|
|
42315
43013
|
]
|
|
42316
43014
|
}
|
|
42317
43015
|
),
|
|
42318
|
-
this.isDefaultUIEnabled() && /* @__PURE__ */
|
|
42319
|
-
this.isDefaultUIEnabled() && selectedElements.length === 1 && this.state.openDialog?.name !== "elementLinkSelector" && this.state.showHyperlinkPopup && /* @__PURE__ */
|
|
43016
|
+
this.isDefaultUIEnabled() && /* @__PURE__ */ jsx139(CursorHint, {}),
|
|
43017
|
+
this.isDefaultUIEnabled() && selectedElements.length === 1 && this.state.openDialog?.name !== "elementLinkSelector" && this.state.showHyperlinkPopup && /* @__PURE__ */ jsx139(
|
|
42320
43018
|
Hyperlink,
|
|
42321
43019
|
{
|
|
42322
43020
|
element: firstSelectedElement,
|
|
@@ -42328,7 +43026,7 @@ var App = class _App extends React40.Component {
|
|
|
42328
43026
|
},
|
|
42329
43027
|
firstSelectedElement.id
|
|
42330
43028
|
),
|
|
42331
|
-
this.isDefaultUIEnabled() && this.state.contextMenu && /* @__PURE__ */
|
|
43029
|
+
this.isDefaultUIEnabled() && this.state.contextMenu && /* @__PURE__ */ jsx139(
|
|
42332
43030
|
ContextMenu2,
|
|
42333
43031
|
{
|
|
42334
43032
|
items: this.state.contextMenu.items,
|
|
@@ -42343,7 +43041,7 @@ var App = class _App extends React40.Component {
|
|
|
42343
43041
|
}
|
|
42344
43042
|
}
|
|
42345
43043
|
),
|
|
42346
|
-
/* @__PURE__ */
|
|
43044
|
+
/* @__PURE__ */ jsx139(
|
|
42347
43045
|
StaticCanvas_default,
|
|
42348
43046
|
{
|
|
42349
43047
|
app: this,
|
|
@@ -42358,6 +43056,7 @@ var App = class _App extends React40.Component {
|
|
|
42358
43056
|
appState: this.state,
|
|
42359
43057
|
renderConfig: {
|
|
42360
43058
|
imageCache: this.imageCache,
|
|
43059
|
+
getGifFrameIndex: this.gifPlayback.getFrameIndex,
|
|
42361
43060
|
isExporting: false,
|
|
42362
43061
|
renderGrid: isGridModeEnabled(this),
|
|
42363
43062
|
renderLinks: this.isLinksEnabled(),
|
|
@@ -42370,7 +43069,7 @@ var App = class _App extends React40.Component {
|
|
|
42370
43069
|
}
|
|
42371
43070
|
}
|
|
42372
43071
|
),
|
|
42373
|
-
newElementCanvasElement && /* @__PURE__ */
|
|
43072
|
+
newElementCanvasElement && /* @__PURE__ */ jsx139(
|
|
42374
43073
|
NewElementCanvas_default,
|
|
42375
43074
|
{
|
|
42376
43075
|
appState: this.state,
|
|
@@ -42381,6 +43080,7 @@ var App = class _App extends React40.Component {
|
|
|
42381
43080
|
allElementsMap,
|
|
42382
43081
|
renderConfig: {
|
|
42383
43082
|
imageCache: this.imageCache,
|
|
43083
|
+
getGifFrameIndex: this.gifPlayback.getFrameIndex,
|
|
42384
43084
|
isExporting: false,
|
|
42385
43085
|
imageTransitionDuration: this.props.imageOptions.placeholderTransitionDuration,
|
|
42386
43086
|
renderGrid: false,
|
|
@@ -42392,7 +43092,7 @@ var App = class _App extends React40.Component {
|
|
|
42392
43092
|
}
|
|
42393
43093
|
}
|
|
42394
43094
|
),
|
|
42395
|
-
/* @__PURE__ */
|
|
43095
|
+
/* @__PURE__ */ jsx139(
|
|
42396
43096
|
InteractiveCanvas_default,
|
|
42397
43097
|
{
|
|
42398
43098
|
app: this,
|
|
@@ -42422,21 +43122,21 @@ var App = class _App extends React40.Component {
|
|
|
42422
43122
|
onDoubleClick: this.handleCanvasDoubleClick
|
|
42423
43123
|
}
|
|
42424
43124
|
),
|
|
42425
|
-
this.props.viewportStatusFrame?.border && this.editorInterface.formFactor === "phone" && /* @__PURE__ */
|
|
43125
|
+
this.props.viewportStatusFrame?.border && this.editorInterface.formFactor === "phone" && /* @__PURE__ */ jsx139(
|
|
42426
43126
|
ViewportStatusBorder,
|
|
42427
43127
|
{
|
|
42428
43128
|
border: this.props.viewportStatusFrame.border
|
|
42429
43129
|
}
|
|
42430
43130
|
),
|
|
42431
43131
|
this.renderFrameNames(),
|
|
42432
|
-
this.isDefaultUIEnabled() && this.state.activeLockedId && /* @__PURE__ */
|
|
43132
|
+
this.isDefaultUIEnabled() && this.state.activeLockedId && /* @__PURE__ */ jsx139(
|
|
42433
43133
|
UnlockPopup_default,
|
|
42434
43134
|
{
|
|
42435
43135
|
app: this,
|
|
42436
43136
|
activeLockedId: this.state.activeLockedId
|
|
42437
43137
|
}
|
|
42438
43138
|
),
|
|
42439
|
-
this.isDefaultUIEnabled() && showShapeSwitchPanel && /* @__PURE__ */
|
|
43139
|
+
this.isDefaultUIEnabled() && showShapeSwitchPanel && /* @__PURE__ */ jsx139(ConvertElementTypePopup_default, { app: this })
|
|
42440
43140
|
]
|
|
42441
43141
|
}
|
|
42442
43142
|
),
|
|
@@ -42454,9 +43154,9 @@ var App = class _App extends React40.Component {
|
|
|
42454
43154
|
clearImageShapeCache(filesMap) {
|
|
42455
43155
|
const files = filesMap ?? this.files;
|
|
42456
43156
|
this.scene.getNonDeletedElements().forEach((element) => {
|
|
42457
|
-
if (
|
|
43157
|
+
if (isInitializedImageElement5(element) && files[element.fileId]) {
|
|
42458
43158
|
this.imageCache.delete(element.fileId);
|
|
42459
|
-
|
|
43159
|
+
ShapeCache7.delete(element);
|
|
42460
43160
|
}
|
|
42461
43161
|
});
|
|
42462
43162
|
}
|
|
@@ -42525,7 +43225,7 @@ var App = class _App extends React40.Component {
|
|
|
42525
43225
|
}
|
|
42526
43226
|
if (isBrave() && !isMeasureTextSupported()) {
|
|
42527
43227
|
this.setState({
|
|
42528
|
-
errorMessage: /* @__PURE__ */
|
|
43228
|
+
errorMessage: /* @__PURE__ */ jsx139(BraveMeasureTextError_default, {})
|
|
42529
43229
|
});
|
|
42530
43230
|
}
|
|
42531
43231
|
const mountPayload = {
|
|
@@ -42537,6 +43237,7 @@ var App = class _App extends React40.Component {
|
|
|
42537
43237
|
this.props.onExcalidrawAPI?.(this.api);
|
|
42538
43238
|
}
|
|
42539
43239
|
componentWillUnmount() {
|
|
43240
|
+
this.gifPlayback.stop();
|
|
42540
43241
|
this.api = { ...this.api, isDestroyed: true };
|
|
42541
43242
|
for (const key of Object.keys(this.api)) {
|
|
42542
43243
|
if ((key.startsWith("get") || key === "onStateChange" || key === "onEvent") && typeof this.api[key] === "function") {
|
|
@@ -42571,7 +43272,7 @@ var App = class _App extends React40.Component {
|
|
|
42571
43272
|
this.store.onDurableIncrementEmitter.clear();
|
|
42572
43273
|
this.appStateObserver.clear();
|
|
42573
43274
|
this.editorLifecycleEvents.clear();
|
|
42574
|
-
|
|
43275
|
+
ShapeCache7.destroy();
|
|
42575
43276
|
SnapCache.destroy();
|
|
42576
43277
|
clearTimeout(touchTimeout);
|
|
42577
43278
|
isSomeElementSelected.clearCache();
|
|
@@ -42790,6 +43491,7 @@ var App = class _App extends React40.Component {
|
|
|
42790
43491
|
}
|
|
42791
43492
|
this.handleInteractionStateChange(prevProps, prevState);
|
|
42792
43493
|
this.handleForcedToolChange(prevProps, prevState);
|
|
43494
|
+
this.ensureGifPlaybackLoop();
|
|
42793
43495
|
this.appStateObserver.flush(prevState);
|
|
42794
43496
|
this.updateEmbeddables();
|
|
42795
43497
|
const elements = this.scene.getElementsIncludingDeleted();
|
|
@@ -43170,7 +43872,7 @@ var App = class _App extends React40.Component {
|
|
|
43170
43872
|
// Not sure why we include deleted elements as well hence using deleted elements map
|
|
43171
43873
|
...this.scene.getElementsIncludingDeleted().map((_element) => {
|
|
43172
43874
|
if (_element.id === element.id && isTextElement18(_element)) {
|
|
43173
|
-
return
|
|
43875
|
+
return newElementWith11(_element, {
|
|
43174
43876
|
originalText: nextOriginalText,
|
|
43175
43877
|
isDeleted: isDeleted ?? _element.isDeleted,
|
|
43176
43878
|
// returns (wrapped) text and new dimensions
|
|
@@ -43189,7 +43891,7 @@ var App = class _App extends React40.Component {
|
|
|
43189
43891
|
this.textWysiwygSubmitHandler = textWysiwyg({
|
|
43190
43892
|
canvas: this.canvas,
|
|
43191
43893
|
getViewportCoords: (x, y) => {
|
|
43192
|
-
const { x: viewportX, y: viewportY } =
|
|
43894
|
+
const { x: viewportX, y: viewportY } = sceneCoordsToViewportCoords7(
|
|
43193
43895
|
{
|
|
43194
43896
|
sceneX: x,
|
|
43195
43897
|
sceneY: y
|
|
@@ -43574,7 +44276,7 @@ var App = class _App extends React40.Component {
|
|
|
43574
44276
|
initialPointerDownState(event) {
|
|
43575
44277
|
const origin = viewportCoordsToSceneCoords3(event, this.state);
|
|
43576
44278
|
const selectedElements = this.scene.getSelectedElements(this.state);
|
|
43577
|
-
const [minX, minY, maxX, maxY] =
|
|
44279
|
+
const [minX, minY, maxX, maxY] = getCommonBounds14(selectedElements);
|
|
43578
44280
|
const isElbowArrowOnly = selectedElements.findIndex(isElbowArrow10) === 0;
|
|
43579
44281
|
return {
|
|
43580
44282
|
origin,
|
|
@@ -43675,7 +44377,7 @@ var App = class _App extends React40.Component {
|
|
|
43675
44377
|
1
|
|
43676
44378
|
);
|
|
43677
44379
|
const boundsPadding = DEFAULT_TRANSFORM_HANDLE_SPACING4 * 2 / this.state.zoom.value;
|
|
43678
|
-
const [x1, y1, x2, y2] =
|
|
44380
|
+
const [x1, y1, x2, y2] = getCommonBounds14(selectedElements);
|
|
43679
44381
|
return point.x > x1 - boundsPadding - threshold && point.x < x2 + boundsPadding + threshold && point.y > y1 - boundsPadding - threshold && point.y < y2 + boundsPadding + threshold;
|
|
43680
44382
|
}
|
|
43681
44383
|
getCurrentItemRoundness(elementType) {
|
|
@@ -43985,7 +44687,7 @@ var App = class _App extends React40.Component {
|
|
|
43985
44687
|
const croppingElement = this.scene.getNonDeletedElementsMap().get(this.state.croppingElementId);
|
|
43986
44688
|
if (croppingElement && isImageElement9(croppingElement) && croppingElement.crop !== null && pointerDownState.hit.element === croppingElement) {
|
|
43987
44689
|
const crop = croppingElement.crop;
|
|
43988
|
-
const image =
|
|
44690
|
+
const image = isInitializedImageElement5(croppingElement) && this.imageCache.get(croppingElement.fileId)?.image;
|
|
43989
44691
|
if (image && !(image instanceof Promise)) {
|
|
43990
44692
|
const uncroppedSize = getUncroppedWidthAndHeight4(croppingElement);
|
|
43991
44693
|
const instantDragOffset = vector4(
|
|
@@ -44127,7 +44829,7 @@ var App = class _App extends React40.Component {
|
|
|
44127
44829
|
if (idsOfElementsToDuplicate.has(el.id)) {
|
|
44128
44830
|
const origEl = pointerDownState.originalElements.get(el.id);
|
|
44129
44831
|
if (origEl) {
|
|
44130
|
-
return
|
|
44832
|
+
return newElementWith11(el, {
|
|
44131
44833
|
x: origEl.x,
|
|
44132
44834
|
y: origEl.y
|
|
44133
44835
|
});
|
|
@@ -45149,7 +45851,7 @@ var App = class _App extends React40.Component {
|
|
|
45149
45851
|
);
|
|
45150
45852
|
const isSnappedToCenter = distanceToCenter < TEXT_TO_CENTER_SNAP_THRESHOLD;
|
|
45151
45853
|
if (isSnappedToCenter) {
|
|
45152
|
-
const { x: viewportX, y: viewportY } =
|
|
45854
|
+
const { x: viewportX, y: viewportY } = sceneCoordsToViewportCoords7(
|
|
45153
45855
|
{ sceneX: elementCenterX, sceneY: elementCenterY },
|
|
45154
45856
|
appState
|
|
45155
45857
|
);
|
|
@@ -45206,7 +45908,7 @@ var App_default = App;
|
|
|
45206
45908
|
|
|
45207
45909
|
// components/InitializeApp.tsx
|
|
45208
45910
|
import { useEffect as useEffect39, useState as useState35 } from "react";
|
|
45209
|
-
import { jsx as
|
|
45911
|
+
import { jsx as jsx140 } from "react/jsx-runtime";
|
|
45210
45912
|
var InitializeApp = (props) => {
|
|
45211
45913
|
const [loading, setLoading] = useState35(true);
|
|
45212
45914
|
useEffect39(() => {
|
|
@@ -45217,19 +45919,19 @@ var InitializeApp = (props) => {
|
|
|
45217
45919
|
const currentLang2 = languages.find((lang) => lang.code === props.langCode) || defaultLang;
|
|
45218
45920
|
updateLang();
|
|
45219
45921
|
}, [props.langCode]);
|
|
45220
|
-
return loading ? /* @__PURE__ */
|
|
45922
|
+
return loading ? /* @__PURE__ */ jsx140(LoadingMessage, { theme: props.theme }) : props.children;
|
|
45221
45923
|
};
|
|
45222
45924
|
|
|
45223
45925
|
// components/footer/FooterCenter.tsx
|
|
45224
|
-
import
|
|
45225
|
-
import { jsx as
|
|
45926
|
+
import clsx62 from "clsx";
|
|
45927
|
+
import { jsx as jsx141 } from "react/jsx-runtime";
|
|
45226
45928
|
var FooterCenter = ({ children }) => {
|
|
45227
45929
|
const { FooterCenterTunnel } = useTunnels();
|
|
45228
45930
|
const appState = useUIAppState();
|
|
45229
|
-
return /* @__PURE__ */
|
|
45931
|
+
return /* @__PURE__ */ jsx141(FooterCenterTunnel.In, { children: /* @__PURE__ */ jsx141(
|
|
45230
45932
|
"div",
|
|
45231
45933
|
{
|
|
45232
|
-
className:
|
|
45934
|
+
className: clsx62("footer-center zen-mode-transition", {
|
|
45233
45935
|
"layer-ui__wrapper__footer-left--transition-bottom": appState.zenModeEnabled
|
|
45234
45936
|
}),
|
|
45235
45937
|
children
|
|
@@ -45240,9 +45942,9 @@ var FooterCenter_default = FooterCenter;
|
|
|
45240
45942
|
FooterCenter.displayName = "FooterCenter";
|
|
45241
45943
|
|
|
45242
45944
|
// components/live-collaboration/LiveCollaborationTrigger.tsx
|
|
45243
|
-
import
|
|
45945
|
+
import clsx63 from "clsx";
|
|
45244
45946
|
import { MQ_MIN_WIDTH_DESKTOP } from "@excalidraw/common";
|
|
45245
|
-
import { jsx as
|
|
45947
|
+
import { jsx as jsx142, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
45246
45948
|
var LiveCollaborationTrigger2 = ({
|
|
45247
45949
|
isCollaborating,
|
|
45248
45950
|
onSelect,
|
|
@@ -45251,18 +45953,18 @@ var LiveCollaborationTrigger2 = ({
|
|
|
45251
45953
|
}) => {
|
|
45252
45954
|
const appState = useUIAppState();
|
|
45253
45955
|
const showIconOnly = editorInterface?.formFactor !== "desktop" || appState.width < MQ_MIN_WIDTH_DESKTOP;
|
|
45254
|
-
return /* @__PURE__ */
|
|
45956
|
+
return /* @__PURE__ */ jsxs70(
|
|
45255
45957
|
Button,
|
|
45256
45958
|
{
|
|
45257
45959
|
...rest,
|
|
45258
|
-
className:
|
|
45960
|
+
className: clsx63("collab-button", { active: isCollaborating }),
|
|
45259
45961
|
type: "button",
|
|
45260
45962
|
onSelect,
|
|
45261
45963
|
style: { position: "relative", width: showIconOnly ? void 0 : "auto" },
|
|
45262
45964
|
title: t("labels.liveCollaboration"),
|
|
45263
45965
|
children: [
|
|
45264
45966
|
showIconOnly ? share : t("labels.share"),
|
|
45265
|
-
appState.collaborators.size > 0 && /* @__PURE__ */
|
|
45967
|
+
appState.collaborators.size > 0 && /* @__PURE__ */ jsx142("div", { className: "CollabButton-collaborators", children: appState.collaborators.size })
|
|
45266
45968
|
]
|
|
45267
45969
|
}
|
|
45268
45970
|
);
|
|
@@ -45271,15 +45973,15 @@ var LiveCollaborationTrigger_default = LiveCollaborationTrigger2;
|
|
|
45271
45973
|
LiveCollaborationTrigger2.displayName = "LiveCollaborationTrigger";
|
|
45272
45974
|
|
|
45273
45975
|
// components/ExcalidrawLogo.tsx
|
|
45274
|
-
import { jsx as
|
|
45275
|
-
var LogoIcon = () => /* @__PURE__ */
|
|
45976
|
+
import { jsx as jsx143, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
45977
|
+
var LogoIcon = () => /* @__PURE__ */ jsx143(
|
|
45276
45978
|
"svg",
|
|
45277
45979
|
{
|
|
45278
45980
|
viewBox: "0 0 40 40",
|
|
45279
45981
|
fill: "none",
|
|
45280
45982
|
xmlns: "http://www.w3.org/2000/svg",
|
|
45281
45983
|
className: "ExcalidrawLogo-icon",
|
|
45282
|
-
children: /* @__PURE__ */
|
|
45984
|
+
children: /* @__PURE__ */ jsx143(
|
|
45283
45985
|
"path",
|
|
45284
45986
|
{
|
|
45285
45987
|
d: "M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",
|
|
@@ -45288,7 +45990,7 @@ var LogoIcon = () => /* @__PURE__ */ jsx142(
|
|
|
45288
45990
|
)
|
|
45289
45991
|
}
|
|
45290
45992
|
);
|
|
45291
|
-
var LogoText = () => /* @__PURE__ */
|
|
45993
|
+
var LogoText = () => /* @__PURE__ */ jsxs71(
|
|
45292
45994
|
"svg",
|
|
45293
45995
|
{
|
|
45294
45996
|
viewBox: "0 0 450 55",
|
|
@@ -45296,28 +45998,28 @@ var LogoText = () => /* @__PURE__ */ jsxs70(
|
|
|
45296
45998
|
fill: "none",
|
|
45297
45999
|
className: "ExcalidrawLogo-text",
|
|
45298
46000
|
children: [
|
|
45299
|
-
/* @__PURE__ */
|
|
46001
|
+
/* @__PURE__ */ jsx143(
|
|
45300
46002
|
"path",
|
|
45301
46003
|
{
|
|
45302
46004
|
d: "M429.27 96.74c2.47-1.39 4.78-3.02 6.83-4.95 1.43-1.35 2.73-2.86 3.81-4.51-.66.9-1.4 1.77-2.23 2.59-2.91 2.84-5.72 5.09-8.42 6.87h.01ZM343.6 69.36c.33 3.13.58 6.27.79 9.4.09 1.37.18 2.75.25 4.12-.12-4.46-.27-8.93-.5-13.39-.11-2.08-.24-4.16-.4-6.24-.06 1.79-.11 3.85-.13 6.11h-.01ZM378.47 98.34c.01-.37.07-1.13.01-6.51-.11 1.9-.22 3.81-.31 5.71-.07 1.42-.22 2.91-.16 4.35.39.03.78.07 1.17.1-.92-.85-.76-2.01-.72-3.66l.01.01ZM344.09 86.12c-.09-2.41-.22-4.83-.39-7.24v12.21c.15-.05.32-.09.47-.14.05-1.61-.03-3.23-.09-4.83h.01ZM440.69 66.79c-.22-.34-.45-.67-.69-.99-3.71-4.87-9.91-7.14-15.65-8.55-1.05-.26-2.12-.49-3.18-.71 2.29.59 4.48 1.26 6.64 2.02 7.19 2.54 10.57 5.41 12.88 8.23ZM305.09 72.46l1.2 3.6c.84 2.53 1.67 5.06 2.46 7.61.24.78.5 1.57.73 2.36.22-.04.44-.08.67-.12a776.9 776.9 0 0 1-5.01-13.57c-.02.04-.03.09-.05.13v-.01ZM345.49 90.25v.31c1.48-.42 3.05-.83 4.66-1.2-1.56.25-3.12.52-4.66.89ZM371.02 90.22c0-.57-.04-1.14-.11-1.71-.06-.02-.12-.04-.19-.05-.21-.05-.43-.08-.65-.11.42.16.74.88.95 1.87ZM398.93 54.23c-.13 0-.27-.01-.4-.02l.03.4c.11-.15.23-.27.37-.38ZM401.57 62.28v-.15c-1.22-.24-2.86-.61-3.23-1.25-.09-.15-.18-.51-.27-.98-.09.37-.2.73-.33 1.09 1.24.56 2.52.98 3.83 1.29ZM421.73 88.68c-2.97 1.65-6.28 3.12-9.69 3.68v.18c4.72-.14 11.63-3.85 16.33-8.38-2.04 1.75-4.33 3.24-6.63 4.53l-.01-.01ZM411.28 80.92c-.05-1.2-.09-2.4-.15-3.6-.21 5.66-.46 11.38-.47 14.51.24-.02.48-.04.71-.07.15-3.61.05-7.23-.09-10.83v-.01Z",
|
|
45303
46005
|
transform: "translate(-144.023 -51.76)"
|
|
45304
46006
|
}
|
|
45305
46007
|
),
|
|
45306
|
-
/* @__PURE__ */
|
|
46008
|
+
/* @__PURE__ */ jsx143(
|
|
45307
46009
|
"path",
|
|
45308
46010
|
{
|
|
45309
46011
|
d: "M425.38 67.41c-3.5-1.45-7.19-2.57-14.06-3.62.09 1.97.06 4.88-.03 8.12.03.04.06.09.06.15.19 1.36.28 2.73.37 4.1.25 3.77.39 7.55.41 11.33 0 1.38-.01 2.76-.07 4.13 1.4-.25 2.78-.65 4.12-1.15 4.07-1.5 7.94-3.78 11.28-6.54 2.33-1.92 5.13-4.49 5.88-7.58.63-3.53-2.45-6.68-7.97-8.96l.01.02ZM411.35 92.53v-.06l-.34.03c.11.01.22.03.34.03ZM314.26 64.06c-.23-.59-.47-1.17-.7-1.75.57 1.62 1.11 3.25 1.6 4.9l.15.54 2.35 6.05c.32.82.66 1.64.98 2.46-1.38-4.1-2.83-8.17-4.39-12.2h.01ZM156.82 103.07c-.18.13-.38.23-.58.33 1.32-.03 2.66-.2 3.93-.34.86-.09 1.72-.22 2.58-.33-2.12.1-4.12.17-5.94.34h.01ZM210.14 68.88s.03.04.05.07c.18-.31.39-.64.58-.96-.21.3-.42.6-.64.89h.01ZM201.65 82.8c-.5.77-1.02 1.56-1.49 2.37 1.11-1.55 2.21-3.1 3.2-4.59-.23.23-.49.51-.75.79-.32.47-.65.95-.96 1.43ZM194.03 98.66c-.33-.4-.65-.84-1.05-1.17-.24-.2-.07-.49.17-.56-.23-.26-.42-.5-.63-.75 1.51-2.55 3.93-5.87 6.4-9.28-.17-.08-.29-.28-.2-.49.04-.09.09-.17.13-.26-1.21 1.78-2.42 3.55-3.61 5.33-.87 1.31-1.74 2.64-2.54 4-.29.5-.63 1.04-.87 1.61.81.65 1.63 1.27 2.47 1.88-.09-.11-.18-.21-.27-.32v.01ZM307.79 82.93c-1-3.17-2.05-6.32-3.1-9.48-1.62 4.08-3.69 9.17-6.16 15.19 3.32-1.04 6.77-1.87 10.27-2.5-.32-1.08-.67-2.15-1.01-3.21ZM149.5 80.7c.05-1.71.04-3.43 0-5.14-.1 2.26-.16 4.51-.22 6.77-.02.73-.03 1.46-.04 2.19.14-1.27.2-2.55.24-3.82h.02ZM228.98 98.3c.39 1.25.91 3.03.94 3.91.06-.03.12-.07.17-.1.08-1.29-.55-2.65-1.11-3.81ZM307.72 53.36c.81.5 1.53 1.04 2.07 1.49-.38-.8-.78-1.58-1.21-2.35-.17.03-.34.06-.51.11-.43.12-.86.26-1.29.41.35-.01.53.1.94.34ZM283.69 96.14c3.91-7.25 6.89-13.35 8.88-18.15l1.1-2.66c-1.27 2.64-2.56 5.27-3.83 7.9-1.53 3.15-3.06 6.31-4.58 9.47-.87 1.81-1.76 3.62-2.54 5.47.04.02.07.04.11.07.05.05.1.09.15.14.05-.73.27-1.48.71-2.24ZM289.92 103.23s-.04.01-.05.03c0-.02.04-.03.05-.04.05-.05.11-.1.16-.15l.21-.21c-.55 0-1.5-.27-2.55-.72.4.26.8.51 1.22.74.24.13.48.26.73.37.05.02.1.03.14.05a.27.27 0 0 1 .08-.07h.01ZM269.23 68.49c-.39-.19-.82-.48-1.33-.87-3.06-1.56-6.31-2.78-9.36-2.35-3.5.49-5.7 1.11-7.74 2.44 5.71-2.6 12.82-2.07 18.44.79l-.01-.01ZM177.87 53.69l1.06.03c-.96-.22-2-.25-2.89-.3-4.95-.26-9.99.33-14.86 1.19-2.44.43-4.88.95-7.28 1.59 9.09-1.76 15.69-2.77 23.97-2.51ZM219.85 55.51c-.18.12-.36.27-.56.45-.45.53-.86 1.11-1.26 1.66-1.91 2.61-3.71 5.31-5.57 7.95l-.12.18 8.05-10.11c-.18-.05-.36-.1-.55-.13h.01ZM510.71 54.1c.12-.15.29-.3.53-.45.69-.4 3.72-.63 5.87-.74-.36-.02-.73-.04-1.09-.05-1.84-.03-3.67.09-5.49.35.05.3.12.59.18.88v.01ZM510.76 86.02c1.37-3.07 2.49-6.27 3.57-9.46.55-1.64 1.12-3.3 1.6-4.97-1.59 4.01-3.67 9.14-6.2 15.3.24-.08.5-.14.74-.22.1-.22.19-.44.29-.65ZM566.95 75.76c.11-.02.23.03.31.11-.05-.13-.09-.26-.14-.39-.05.09-.11.18-.17.28ZM511.33 86.41c3.08-.89 6.24-1.62 9.46-2.14-1.51-3.98-2.98-7.96-4.39-11.87-.05.15-.09.31-.14.46-1.02 3.32-2.15 6.61-3.39 9.85-.48 1.25-.98 2.49-1.53 3.7h-.01ZM578.24 74.45c.11-.44.23-.87.35-1.31-.31.7-.64 1.39-.97 2.08.09.21.19.4.28.61.12-.46.23-.92.35-1.38h-.01ZM520.62 53.11c-.09 0-.18-.01-.28-.02.38.34.29 1.08.93 2.53l6.65 17.15c2.2 5.68 4.69 11.36 7.41 16.87l1.06 2.17c-2.95-7.05-5.92-14.08-8.87-21.13-1.58-3.79-3.16-7.59-4.7-11.4-.78-1.92-1.73-3.89-2.25-5.91-.03-.1 0-.19.04-.26h.01ZM578.78 77.87c1.45-5.77 3.07-10.43 3.58-13.36.05-.34.16-.88.31-1.55-.67 1.79-1.37 3.56-2.08 5.33-.12.43-.23.86-.35 1.29-.65 2.43-1.29 4.86-1.9 7.3.14.33.29.65.43 1l.01-.01ZM545.3 94.66c.02-.44.03-.83.05-1.12.02-1.01.05-2.02.11-3.02.03-6.66-.46-14.33-1.46-22.8-.13-.42-.27-1.24-.56-2.89 0-.02 0-.04-.01-.06.62 6.61.95 13.25 1.32 19.87.17 3.08.33 6.16.52 9.23.02.25.03.52.04.78l-.01.01ZM580.77 102.81c.13.2.27.38.37.49.27-.11.53-.22.8-.32-.43.09-.82.05-1.17-.16v-.01ZM530.48 104.07h.33c-.36-.13-.71-.32-1.04-.56.14.24.3.47.45.7.06-.08.14-.13.26-.13v-.01ZM542.63 58.82c.06.23.11.47.15.71.14-.33.36-.62.7-.86-.28.05-.57.11-.85.15ZM583.81 57.87c.15-.7.29-1.41.42-2.11-.14.45-.28.9-.42 1.34-.46 1.44-.89 2.89-1.31 4.34.44-1.19.88-2.37 1.31-3.57ZM523.62 91.48c-4.66 1.17-9.05 2.89-14.02 5.27 4.65-1.84 9.48-3.29 14.28-4.63-.09-.22-.17-.41-.26-.64ZM460.64 78.3c-.04-2.9-.11-5.81-.28-8.71-.1-1.68-.17-3.43-.5-5.09-.07.02-.14.03-.2.05.3 6.54.45 12.17.51 17.12.17-.07.34-.14.51-.2 0-1.06-.01-2.11-.03-3.17h-.01ZM470.63 63.24c-3.38-.26-6.81.32-10.1 1.1.41 2.01.47 4.14.57 6.18.18 3.55.25 7.11.27 10.67 3.31-1.38 6.5-3.12 9.3-5.35 1.96-1.56 3.86-3.41 5.02-5.66.73-1.41 1.19-3.22.26-4.65-1.09-1.7-3.46-2.14-5.32-2.29ZM460.29 63.68c1-.24 2.01-.46 3.04-.65-1.15.16-2.37.38-3.71.69v.13c.07-.02.15-.04.22-.05.11-.13.3-.18.45-.11v-.01ZM457.24 100.96c.43-.03.86-.07 1.29-.11.14-.49.27-.99.38-1.49-.44.7-1 1.23-1.67 1.6ZM482.88 104.98c-.18.23-.36.38-.55.47.14.09.27.19.4.28a70.76 70.76 0 0 0 4.37-4.63c.76-.89 1.52-1.81 2.19-2.77-.3-.27-.61-.53-.92-.79-.07 1.94-4.62 6.32-5.49 7.45v-.01Z",
|
|
45310
46012
|
transform: "translate(-144.023 -51.76)"
|
|
45311
46013
|
}
|
|
45312
46014
|
),
|
|
45313
|
-
/* @__PURE__ */
|
|
46015
|
+
/* @__PURE__ */ jsx143(
|
|
45314
46016
|
"path",
|
|
45315
46017
|
{
|
|
45316
46018
|
d: "M474.36 63.31c-.4-.16-.84-.27-1.29-.37 1.56.42 3.08 1.22 3.76 2.74.62 1.4.32 2.95-.28 4.32.7-1.22.94-2.34.74-3.47-.24-1.33-1.19-2.54-2.93-3.21v-.01ZM477.34 89.18c-1.2-.81-2.4-1.62-3.6-2.42-.14.1-.26.19-.4.29 1.4.67 2.73 1.39 4 2.13ZM465.88 93.85c.37.25.74.5 1.1.75.46.32.92.65 1.38.97-1.57-1.2-2.01-1.61-2.49-1.72h.01ZM574.92 90.06c-2.28-5.21-4.93-11.13-5.67-12.26-.1-.15-1.57-3.01-1.63-3.08 0 0-.01.02-.02.02.4 1.37 1.09 2.69 1.65 3.99 2.14 4.95 4.36 9.86 6.67 14.73.6 1.26 1.21 2.52 1.83 3.78-.75-2.01-1.64-4.45-2.83-7.18ZM448.73 65.29c.1.2.22.38.34.57.22-.02.43-.06.65-.08v-.08c-.14-.05-.25 0-.99-.41ZM460.16 94.81c-.02.31-.06.59-.1.89-.03 1.71-.33 3.43-.79 5.07.15-.02.3-.03.45-.05.01-.04.02-.08.03-.11.09-.34.15-.69.2-1.03.17-1.07.25-2.16.33-3.24.05-.69.08-1.39.12-2.08-.27.1-.27.26-.24.57v-.02Z",
|
|
45317
46019
|
transform: "translate(-144.023 -51.76)"
|
|
45318
46020
|
}
|
|
45319
46021
|
),
|
|
45320
|
-
/* @__PURE__ */
|
|
46022
|
+
/* @__PURE__ */ jsx143(
|
|
45321
46023
|
"path",
|
|
45322
46024
|
{
|
|
45323
46025
|
d: "m328.67 98.12-3.22-6.58c-1.29-2.63-2.53-5.29-3.72-7.97-.25-.85-.52-1.69-.79-2.53-.81-2.57-1.67-5.12-2.55-7.67-1.92-5.53-3.9-11.08-6.32-16.41-.72-1.58-1.46-3.44-2.63-4.79-.03-.17-.16-.29-.34-.36a.282.282 0 0 0-.23-.04c-.06-.01-.12 0-.18.01-.74.06-1.5.38-2.19.61-2.22.77-4.4 1.64-6.63 2.38-.03-.08-.06-.16-.09-.25-.15-.42-.82-.24-.67.19.03.09.07.19.1.28l-.18.06c-.36.11-.28.6 0 .68.18 1.18.63 2.36.98 3.49.03.09.06.17.08.26-.08.23-.17.46-.24.64-.37.98-.79 1.94-1.21 2.9-1.27 2.89-2.62 5.75-3.98 8.6-3.18 6.67-6.44 13.31-9.64 19.97-1.08 2.25-2.2 4.5-3.15 6.81-.13.32.24.5.5.37 1.34 1.33 2.84 2.5 4.4 3.57.65.44 1.31.87 2.01 1.24.4.22.86.48 1.33.5.24.01.35-.19.33-.37.11-.1.21-.21.28-.28.41-.41.81-.84 1.2-1.26.85-.92 1.69-1.87 2.5-2.84 6.31-2.34 12.6-4.31 18.71-5.84 2.14 5.3 3.43 8.43 3.97 9.58.55 1.05 1.15 1.88 1.82 2.52 1.32.56 6.96-.03 9.23-1.96.87-1.28 1.19-2.67.93-4.15-.09-.5-.22-.95-.4-1.33l-.01-.03Zm-20.09-45.61c.43.77.83 1.56 1.21 2.35-.54-.45-1.27-.99-2.07-1.49-.42-.24-.6-.35-.94-.34.43-.15.85-.29 1.29-.41.17-.05.34-.08.51-.11Zm-25.86 45.66c.78-1.85 1.67-3.66 2.54-5.47 1.51-3.16 3.05-6.31 4.58-9.47 1.28-2.63 2.56-5.26 3.83-7.9l-1.1 2.66c-1.99 4.79-4.97 10.9-8.88 18.15-.43.76-.66 1.51-.71 2.24-.05-.05-.1-.09-.15-.14a.259.259 0 0 0-.11-.07Zm6.24 4.71c-.42-.23-.82-.48-1.22-.74 1.05.45 2 .72 2.55.72l-.21.21c-.05.05-.11.1-.16.15-.01.01-.04.03-.05.04 0-.02.03-.02.05-.03a.27.27 0 0 0-.08.07c-.05-.02-.1-.03-.14-.05-.25-.1-.49-.24-.73-.37h-.01Zm15.73-29.43c1.05 3.15 2.1 6.31 3.1 9.48.34 1.06.69 2.13 1.01 3.21-3.5.63-6.95 1.46-10.27 2.5 2.48-6.03 4.54-11.11 6.16-15.19Zm4.79 12.57c-.23-.79-.49-1.58-.73-2.36-.79-2.54-1.63-5.08-2.46-7.61l-1.2-3.6c.02-.04.04-.09.05-.13 1.6 4.45 3.28 9 5.01 13.57l-.67.12v.01Zm5.83-18.27-.15-.54c-.49-1.64-1.03-3.28-1.6-4.9.23.58.47 1.17.7 1.75 1.56 4.03 3.01 8.1 4.39 12.2-.33-.82-.67-1.64-.98-2.46l-2.35-6.05h-.01ZM390.43 79.37c-.13-10.43-.22-17.5-.24-19.97-.24-1.6.21-2.88-.65-3.65-.14-.13-.32-.23-.52-.32h.03c.45 0 .45-.69 0-.7-1.75-.03-3.5-.04-5.25-.14-1.38-.08-2.76-.21-4.15-.31-.07 0-.12.01-.17.04-.21-.07-.47.03-.45.31l.03.45c-.11.14-.19.3-.22.5-.21 1.26-.32 13.67-.36 23.59-.32 5.79-.67 11.57-.97 17.36-.09 1.73-.29 3.54-.21 5.3-.39.02-.38.64.04.69v.12c.05.44.74.45.7 0v-.06c1.1.09 2.2.21 3.3.3 1.14.19 2.44.2 3.29.17 1.73-.05 2.92-.05 3.8-.37.45-.05.9-.11 1.35-.17.44-.06.25-.73-.19-.67h-.01c.24-.32.45-.72.62-1.25.66-1.84.41-6.36.34-11.33l-.13-9.9.02.01Zm-12.26 18.17c.09-1.91.2-3.81.31-5.71.06 5.38 0 6.14-.01 6.51-.05 1.65-.21 2.81.72 3.66-.39-.04-.78-.07-1.17-.1-.06-1.44.09-2.93.16-4.35l-.01-.01ZM588.97 53.85c-2.06-.25-3.17-.51-3.76-.6a.3.3 0 0 1 .04-.08c.22-.39-.39-.75-.6-.35-.56 1.02-.9 2.19-1.26 3.29-.61 1.88-1.17 3.78-1.72 5.68-.63 2.19-1.24 4.39-1.83 6.59-.81 2.03-1.67 4.05-2.61 6.03-1.7-3.64-3.11-6.04-4.03-7.57-2.26-3.74-2.85-5.48-3.57-6.08l.31-.09c.43-.12.25-.8-.19-.67-1.06.3-2.12.6-3.17.95-.93.32-1.85.69-2.76 1.07-.13.05-.19.16-.22.27-.04.02-.08.05-.11.07-.04-.06-.07-.12-.11-.18a.354.354 0 0 0-.48-.12c-.16.09-.22.32-.13.48l.33.54c0 .09.02.18.06.28.51 1.16.78 1.38.72 1.47-2.42 3.44-5.41 7.86-6.2 9.1-1.27 1.97-2.01 3.14-2.45 3.84l-.91-6.56-.43-4.1c-.19-1.85-.37-3.23-.53-4.13-.19-1.1-.3-2.15-.45-3.16-.2-1.36-.29-2.06-.47-2.42h.04c.45.02.45-.68 0-.7-3.43-.16-6.81.94-10.17 1.48-.24-.22-.73-.04-.58.32.24.59.33 1.25.43 1.87.17 1.06.29 2.13.4 3.2.32 3.09.53 6.2.74 9.3.44 6.75.77 13.51 1.17 20.26.11 1.95.13 3.96.46 5.89.05.3.37.31.55.14.74 1.71 2.87 1.27 6.13 1.27 1.34 0 2.39.04 2.99-.11.02.32.48.53.63.18 3.61-8.26 7.41-16.46 12.05-24.2.03-.05.04-.1.05-.15.3.73.64 1.45.94 2.16.97 2.26 1.97 4.52 2.98 6.76 2.26 5.03 4.54 10.07 7.09 14.96.47.9.94 1.79 1.47 2.65.2.32.4.67.66.96-.18.25 0 .68.34.54.91-.38 1.82-.75 2.76-1.07 1.04-.35 2.11-.65 3.17-.95.39-.11.28-.66-.07-.68.62-.4.95-.96.87-1.91-.3-3.34.72-7.47.86-8.52l2.14-11.43c1.75-10.74 3.13-17.51 3.23-20.86.02-.49.08-2.84.13-3.24.17-1.25.48-1-4.96-1.65l.03-.02Zm-46.19 5.67c-.04-.24-.09-.48-.15-.71l.85-.15c-.34.24-.56.53-.7.86Zm1.95 25.12c-.36-6.63-.7-13.26-1.32-19.87 0 .02 0 .04.01.06.29 1.65.44 2.47.56 2.89 1 8.46 1.5 16.14 1.46 22.8-.06.99-.1 2-.11 3.02-.01.29-.03.68-.05 1.12-.01-.26-.03-.53-.04-.78-.19-3.08-.35-6.16-.52-9.23l.01-.01Zm36.4 18.66c-.11-.11-.24-.29-.37-.49.35.21.74.26 1.17.16-.27.11-.53.22-.8.32v.01Zm-.89-33.72c.12-.43.23-.86.35-1.29.71-1.77 1.41-3.55 2.08-5.33-.15.68-.26 1.22-.31 1.55-.5 2.94-2.13 7.59-3.58 13.36-.15-.35-.29-.66-.43-1 .61-2.44 1.25-4.87 1.9-7.3l-.01.01Zm3.56-12.48c.14-.44.28-.89.42-1.34-.13.7-.27 1.41-.42 2.11-.43 1.19-.86 2.38-1.31 3.57.42-1.45.85-2.9 1.31-4.34Zm-5.22 16.05c-.11.44-.23.87-.35 1.31-.12.46-.23.92-.35 1.38-.1-.22-.19-.4-.28-.61.34-.69.66-1.38.97-2.08h.01Zm-11.64 2.62c.06-.1.12-.19.17-.28.05.13.09.26.14.39a.398.398 0 0 0-.31-.11Zm2.3 2.98c-.56-1.3-1.25-2.63-1.65-3.99 0 0 .01-.02.02-.02.06.08 1.52 2.93 1.63 3.08.73 1.13 3.38 7.04 5.67 12.26 1.2 2.73 2.08 5.17 2.83 7.18-.62-1.25-1.23-2.51-1.83-3.78-2.31-4.87-4.53-9.78-6.67-14.73ZM275.92 87.03c-1.06-2.18-1.13-3.45-2.44-2.93-1.52.57-2.94 1.3-4.5 2.1-1.4.72-2.68 1.44-3.92 2.12.01-.25-.24-.5-.51-.34-4.8 2.93-12.41 4.7-17.28 1.31-1.98-1.77-3.32-4.15-3.97-5.78-.29-.95-.49-1.94-.63-2.93-.14-3.34 1.58-6.53 3.9-9.12.8-.79 1.68-1.51 2.66-2.12 3.7-2.3 8.22-3.07 12.51-2.51 2.71.35 5.32 1.24 7.71 2.55.39.22.75-.39.35-.6-.18-.1-.37-.18-.55-.27.56.27 1.03.33 1.51.19l-.48.39c-.15.11-.23.3-.13.48.09.15.33.24.48.13 1.3-.97 2.46-2.09 3.45-3.37.37-.29.64-.6.65-.97v-.02c.08-.33-.03-.7-.21-1.08-.31-.87-.98-2.01-2.19-3.26-2.43-2.52-3.79-3.45-5.68-4.26-1.14-.49-3.12-1.06-4.42-1.23-3.28-.42-10.64-1.21-18.18 4.11-7.74 5.46-11.94 12.3-12.23 20.61-.08 2.06.04 3.98.34 5.71.74 4.18 2.57 8 5.44 11.34 4.26 4.99 9.76 7.52 16.34 7.52 4.85 0 9.69-1.77 14.89-4.62.23-.12.45-.23.68-.35 2.19-1.1 4.37-2.23 6.46-3.5.49-.3 1.03-.61 1.5-.98 1.47-.87 1.11-1.12.49-2.95-.39-1.14-.76-2.7-2.06-5.36l.02-.01Zm-17.38-21.76c3.05-.42 6.31.79 9.36 2.35.51.39.94.68 1.33.87-5.61-2.86-12.72-3.39-18.44-.79 2.05-1.33 4.24-1.95 7.74-2.44l.01.01ZM443.67 72.67c-.4-2.2-1.15-4.33-2.37-6.22-1.49-2.32-3.58-4.19-5.91-5.64-6.17-3.81-13.75-5.11-20.83-6.01-3.23-.41-6.47-.69-9.72-.92l-1.39-.12c-.85-.07-1.52-.1-2.05-.1-1.08-.06-2.17-.12-3.25-.17-.08 0-.14.02-.19.05-.1.05-.18.14-.16.3.27 2.55-.01 5.12-.92 7.52-.15.38.4.56.62.28 1.32.59 2.68 1.05 4.08 1.37 0 2.78-.14 7.58-.33 12.91 0 0 0 .02-.01.03-.61 3.66-.79 7.42-1 11.12-.23 4.01-.43 8.03-.44 12.05 0 .64 0 1.28.03 1.93.02.31 0 .68.15.96.06.11.14.16.24.17-.2.17-.21.54.11.59 3.83.67 7.78.71 11.68.25 2.3-.19 4.87-.65 7.65-1.56 1.85-.54 3.67-1.18 5.43-1.91 7.2-3.02 14.31-8.07 17.35-15.53.76-1.86 1.17-3.8 1.31-5.75.3-1.93.28-3.82-.09-5.58l.01-.02Zm-19.32-15.42c5.74 1.41 11.94 3.68 15.65 8.55.25.32.47.65.69.99-2.3-2.82-5.68-5.69-12.88-8.23-2.16-.76-4.35-1.43-6.64-2.02 1.06.21 2.13.45 3.18.71Zm-25.82-3.04c.13 0 .27.01.4.02-.14.1-.26.23-.37.38 0-.13-.02-.26-.03-.4Zm34.82 22.17c-.75 3.09-3.55 5.66-5.88 7.58-3.35 2.76-7.21 5.03-11.28 6.54-1.33.49-2.71.9-4.12 1.15.06-1.38.08-2.76.07-4.13-.02-3.78-.16-7.56-.41-11.33-.09-1.37-.18-2.74-.37-4.1 0-.06-.03-.11-.06-.15.09-3.25.12-6.16.03-8.12 6.86 1.05 10.56 2.17 14.06 3.62 5.52 2.28 8.59 5.44 7.97 8.96l-.01-.02Zm-22 16.15c-.12 0-.23-.02-.34-.03l.34-.03v.06Zm-.69-.7c0-3.13.26-8.84.47-14.51.06 1.2.11 2.41.15 3.6.15 3.6.25 7.23.09 10.83-.24.03-.48.05-.71.07v.01Zm-12.33-30.94c.37.63 2.01 1.01 3.23 1.25v.15c-1.31-.31-2.59-.73-3.83-1.29.12-.36.23-.72.33-1.09.08.48.18.84.27.98Zm13.7 31.65v-.18c3.41-.56 6.71-2.02 9.69-3.68 2.31-1.28 4.59-2.78 6.63-4.53-4.69 4.53-11.61 8.24-16.33 8.38l.01.01Zm24.07-.75c-2.05 1.93-4.37 3.56-6.83 4.95 2.7-1.78 5.52-4.03 8.42-6.87.82-.82 1.56-1.69 2.23-2.59-1.08 1.65-2.38 3.16-3.81 4.51h-.01ZM187.16 92.14c-.79-2.47-2.1-7.12-3.1-6.87-.19-.01-2.09.77-4.08 1.54-3.06 1.18-5.91 2.13-10.09 2.82-2.74.42-5.87 1.01-10.61 1.06.04-3.34.05-6.01.05-7.99 7.97-.65 12.33-2.11 16.37-3.55 1.11-.39 2.69-1.01 2.63-1.8-.08-.35-.55-1.39-1.17-2.61-.47-1.16-.98-2.31-1.61-3.38-.42-.71-1.04-1.69-1.86-2.06-.11-.08-.22-.13-.29-.12-.02 0-.04 0-.07.01-.19-.04-.39-.05-.6-.01-.17.03-.24.15-.25.28-.04.02-.09.04-.14.05-4.33 1.48-8.85 2.33-13.24 3.61a499.1 499.1 0 0 0-.31-8.19c4.51-.99 8.88-1.38 13.11-1.82 3.68-.38 6.28.12 7.47.34.59.11.9.16 1.16.18h.1c-.1.37.44.66.62.28.02-.04.03-.08.05-.13.15.2.53.22.62-.1.17-.58.19-1.21.21-1.81v-.36c.03-.15.05-.3.07-.45.52-2.47.33-5.09-.64-7.44-.11-.27-.44-.28-.6-.14-.08-.21-.15-.42-.24-.62-.19-.41-.79-.05-.6.35.03.07.05.15.09.22-.98-.42-2.15-.54-3.17-.63-2.17-.19-4.37-.14-6.54 0-5.7.35-11.4 1.3-16.91 2.79-2.08.56-4.13 1.22-6.14 2-4.54 1.05-3.79 1.51-2.17 6.07.18.51.46 1.68.54 1.94.82 2.47 1.08 2.13 3.1 2.13s0 .05 0 .08h.52c-.48 2.66-.51 5.45-.62 8.13-.15 3.48-.22 6.96-.28 10.45 0 .41-.01.82-.02 1.23-.16.29-.33.57-.51.85-.05.38-.09.77-.14 1.18-.42 3.52-.59 6.48-.52 8.8v.34c.02.47.05.76.06.87.16 1.57-.26 3.47 1.35 3.79 1.61.32 3.5.55 4.85.55.11 0 .22-.02.33-.02 1.79.24 3.67.05 5.45-.12 2.85-.28 5.69-.7 8.51-1.19 3.03-.53 6.05-1.14 9.04-1.86 2.4-.58 4.82-1.19 7.13-2.06.51-.19 1.73-.57 2.46-1.14 1.81-.68 2.18-1 1.57-2.67-.23-.62-.48-1.49-.91-2.78l-.03-.02Zm-11.12-38.71c.89.05 1.93.08 2.89.3-.33 0-.68-.02-1.06-.03-8.28-.26-14.88.75-23.97 2.51 2.41-.64 4.85-1.16 7.28-1.59 4.87-.86 9.91-1.45 14.86-1.19Zm-26.53 22.13c.03 1.71.04 3.43 0 5.14-.04 1.27-.11 2.55-.24 3.82 0-.73.02-1.46.04-2.19.05-2.26.12-4.51.22-6.77h-.02Zm6.73 27.85c.2-.1.4-.21.58-.33 1.82-.17 3.82-.24 5.94-.34-.86.11-1.72.24-2.58.33-1.27.14-2.61.31-3.93.34h-.01ZM534.48 85.44c-3.52-8.38-7.07-16.75-10.5-25.17-.63-1.54-1.25-3.09-1.86-4.65-.31-.8-.65-1.6-.87-2.43-.04-.17-.17-.24-.31-.25.1-.2 0-.51-.29-.53-1.59-.08-3.18-.22-4.78-.25-1.96-.03-3.91.13-5.84.42-.31.05-.31.38-.13.56-.03.06-.05.14-.04.22.23 1.54.63 3.06 1.16 4.53.13.35.27.7.41 1.06l-2.68 6.18c-.11.03-.2.09-.25.22-.67 1.9-1.52 3.73-2.34 5.56a536.85 536.85 0 0 1-3.9 8.45c-2.64 5.64-5.34 11.25-7.91 16.93-.44.97-.88 1.94-1.29 2.93-.2.48-.47 1-.55 1.52v.05c-.02.12.02.26.16.34 1.19.73 2.41 1.41 3.66 2.05 1.2.62 2.45 1.25 3.76 1.61.43.12.62-.55.19-.67-1.13-.31-2.2-.83-3.24-1.36 1.09.36 2.1.69 2.75.93 2.82 1.01 2.38 1.1 4.3-3.75 2.1-1.09 4.34-1.96 6.53-2.79 4.35-1.64 8.8-3.03 13.27-4.29.82 2.01 1.77 3.97 2.72 5.92.35.83.62 1.45.79 1.82.22.42.45.8.69 1.15.17.33.33.67.5 1 .42.8.84 1.63 1.4 2.35.23.29.6 0 .55-.31 1.53-.02 3.06-.07 4.58-.27.92-.12 1.82-.32 2.71-.54 1.39-.27 3.85-1.11 3.74-1.42-.67-1.96-1.55-3.87-2.34-5.78-1.57-3.78-3.16-7.56-4.75-11.33v-.01Zm-11.65-26.16c1.54 3.81 3.12 7.6 4.7 11.4 2.94 7.05 5.91 14.09 8.87 21.13l-1.06-2.17c-2.71-5.51-5.2-11.19-7.41-16.87l-6.65-17.15c-.65-1.45-.55-2.19-.93-2.53.09 0 .18.01.28.02a.29.29 0 0 0-.04.26c.52 2.02 1.47 3.98 2.25 5.91h-.01Zm-6.58 13.58c.05-.15.09-.31.14-.46 1.41 3.92 2.88 7.9 4.39 11.87-3.22.52-6.38 1.25-9.46 2.14.55-1.22 1.05-2.46 1.53-3.7 1.24-3.24 2.37-6.53 3.39-9.85h.01Zm-.23-20c.36 0 .73.03 1.09.05-2.15.1-5.18.33-5.87.74-.24.15-.41.3-.53.45-.06-.29-.13-.58-.18-.88 1.82-.26 3.65-.39 5.49-.35v-.01Zm-.09 18.72c-.49 1.67-1.05 3.33-1.6 4.97-1.07 3.19-2.19 6.38-3.57 9.46-.09.21-.19.43-.29.65-.25.07-.5.14-.74.22 2.53-6.16 4.61-11.29 6.2-15.3Zm-6.34 25.16c4.97-2.38 9.37-4.1 14.02-5.27l.26.64c-4.8 1.35-9.63 2.8-14.28 4.63Zm20.17 6.76c.33.23.68.42 1.04.56h-.33c-.12 0-.21.06-.26.13-.15-.23-.31-.45-.45-.7v.01ZM226.57 91.75c-3.55-4.74-6.68-9.11-9.31-12.99 9.2-15.25 10.05-17.81 10.35-18.38.17-.34 1.09-2.27.64-2.53-1.13-.65-1.03-.65-2.97-1.71-1.19-.65-3.04-1.61-4.53-2.12-1.71-.59-1.24-.36-3 2.77-.06.1-.11.2-.17.3-.75 1.02-1.48 2.05-2.2 3.09-1.88 2.71-3.73 5.45-5.69 8.1-3.68-4.91-6.88-8.76-9.51-11.43-.15-.15-.3-.29-.46-.42-1.27-1.28-7.24 3.53-7.93 5.58-.09.09-.19.16-.28.25-.27.26.03.64.33.58.19.65.5 1.29.94 1.91 3.85 5.06 7.19 9.76 9.94 14-1.23 2.61-3.06 5-4.67 7.38l-2.28 3.33c-.5.66-.93 1.23-1.29 1.69-.67.93-2.09 2.61-2.3 3.87-.51.85-1.16 1.84-1.29 2.83-.06.44.61.63.67.19.01-.08.04-.15.06-.22 1.36 1.08 2.76 2.11 4.19 3.11 1.3.91 2.62 1.85 4.04 2.56.21.1.4 0 .48-.17.24.07.48.14.72.2.44.1.62-.57.19-.67-2.02-.48-3.77-1.57-5.23-3.02-.47-.46-.9-.96-1.32-1.46 1.74 1.35 4.2 2.89 5.89 4.14 1.39 1.03 2.85-2.27 4.22-4.2 1.86-2.64 3.96-5.86 5.52-8.29l10.39 14.51c.67.81 1.14 1.21 1.57 1.36-.05.24.12.51.41.4 1.53-.58 3.05-1.19 4.54-1.87 1.52-.69 3.06-1.45 4.36-2.5a.28.28 0 0 0 .12-.23c1.66-1.1.81-1.74-1.41-4.91-1.13-1.58-1.71-2.36-3.7-5.01l-.03-.02Zm2.41 6.54c.56 1.15 1.19 2.52 1.11 3.81-.06.04-.12.07-.17.1-.03-.88-.55-2.66-.94-3.91Zm-16.51-32.73c1.86-2.65 3.65-5.35 5.57-7.95.4-.55.81-1.13 1.26-1.66.19-.18.38-.33.56-.45.18.03.36.08.55.13l-8.05 10.11.12-.18h-.01ZM192.7 95.48c.79-1.37 1.66-2.69 2.54-4 1.19-1.79 2.4-3.56 3.61-5.33-.04.09-.09.17-.13.26-.1.22.03.41.2.49-2.47 3.42-4.89 6.73-6.4 9.28.21.24.4.48.63.75-.24.07-.4.36-.17.56.4.33.72.77 1.05 1.17.09.11.18.21.27.32-.84-.61-1.66-1.24-2.47-1.88.24-.57.58-1.11.87-1.61v-.01Zm7.46-10.32c.47-.81.98-1.59 1.49-2.37.31-.48.64-.95.96-1.43.26-.29.52-.56.75-.79-.99 1.48-2.09 3.03-3.2 4.59Zm10.03-16.22s-.03-.05-.05-.07c.22-.29.43-.59.64-.89-.2.32-.4.65-.58.96h-.01ZM371.54 87.96c-.01-.08-.01-.16-.03-.23-.06-.38-.58-.29-.66.03-.3-.05-.6-.08-.81-.11-1.14-.15-2.29-.19-3.44-.2 1.04-.09 2.09-.18 3.14-.23.45-.02.45-.72 0-.7-6.57.35-13.14 1.23-19.65 2.11-1.53.21-3.05.42-4.57.68-.01 0-.02.01-.04.01-.04-3.33-.13-6.66-.24-9.99-.19-5.7-.4-11.41-.88-17.1-.13-1.51-.23-3.07-.49-4.58 0-.25 0-.48-.02-.68-.06-1.19-.04-2.61-.68-2.78-.16-.07-.72-.16-1.5-.24.22-.17.16-.62-.2-.63-1.19-.04-2.39.09-3.57.23-1.2.14-2.41.32-3.59.6-.16-.1-.41-.06-.5.12-.06.02-.13.03-.19.05-.35.1-.29.55-.03.66-.26.6-.19 2.27-.21 3-.02.66-.66 33.73-.9 40.3-.03.65.06 1.12.04 1.45-.16 3.05.87 4.96 6.34 3.93 1.09-.08 2.75-.77 5.36-1.43 4.13-1.04 5.78-1.52 6.2-1.65 6.43-1.69 6.78-1.97 11.72-2.43.55-.05 4.8-.38 6.03-.3.64.04 1.19.07 1.65.1.09 0 .16-.03.24-.05.1.27.56.33.66-.02.39-1.32.61-2.71.78-4.08.2-1.61.29-3.24.15-4.86.24.03.52-.23.38-.53-.09-.2-.27-.33-.49-.43v-.02Zm-.63.56c.07.57.11 1.14.11 1.71-.21-.99-.53-1.71-.95-1.87.22.03.44.06.65.11.06.01.12.04.19.05Zm-25.41 1.73c1.54-.36 3.1-.64 4.66-.89-1.61.37-3.18.77-4.66 1.2v-.31Zm-.86-7.37c-.07-1.37-.16-2.75-.25-4.12-.21-3.13-.45-6.27-.79-9.4.02-2.25.08-4.31.13-6.11.16 2.08.29 4.16.4 6.24.23 4.46.38 8.93.5 13.39h.01Zm-.94-4c.16 2.41.29 4.83.39 7.24.06 1.6.14 3.22.09 4.83-.15.05-.32.09-.47.14V78.88h-.01ZM483.72 92.83c-3.05-2.28-6.22-4.4-9.38-6.51 8.86-6.49 13.49-12.95 13.73-19.23.04-.76 0-1.5-.13-2.2-.67-3.82-3.5-6.68-8.39-8.48.13.04.27.08.4.13 3.92 1.39 7.74 4.23 8.5 8.56.34 1.95-.05 3.96-.98 5.69-.21.4.39.75.6.35 1.86-3.46 1.46-7.55-.97-10.63-3.53-4.47-9.76-5.88-15.16-6.16-2.32-.12-4.64-.04-6.95.19-6 .32-12.71 1.68-17.63 3.21-.37.11-.67.23-.92.35-.2-.17-.62.02-.57.37v.03c-.64.68-.18 1.64.48 3.21.38.91.67 1.89 1.15 2.58.32.76.68 1.51 1.13 2.19.14.21.38.19.53.07.19-.02.38-.05.57-.08v1.57c-.06.06-.1.13-.11.23-.27 4.18-.34 8.38-.48 12.57l-.3 9.03c-.24 3.91-.44 6.77-.46 7.26-.05.88-.11 1.95.07 2.81-.01.22-.02.43-.04.65 0 .11-.02.23-.03.35 0 .05-.03.27-.01.16-.05.4.5.59.64.28.05.04.12.08.2.08 1.75.13 3.5.28 5.25.3 1.69.02 3.38-.12 5.06-.32.08.23.36.39.55.15.06-.08.11-.17.16-.26.18-.09.24-.32.18-.48.05-.2.1-.4.13-.6.16-.86.25-1.74.33-2.62.11-1.17.17-2.34.23-3.51.15-.01.32-.03.52-.04.36-.03 1.73-.15 2.06-.15.39 0 .7-.02.95-.04 1.76 1.11 3.45 2.35 5.14 3.55 2.83 2.01 5.64 4.04 8.47 6.04 1.42 1 2.85 2 4.29 2.97.1.06.19.07.27.04.08 0 .17-.02.25-.1 1.61-1.56 3.15-3.18 4.6-4.88.75-.88 1.49-1.78 2.15-2.73.01.01.03.02.04.03.34.3.83-.2.49-.49-2.16-1.9-4.34-3.76-6.64-5.48l.03-.01Zm-6.38-3.65a55.72 55.72 0 0 0-4-2.13c.14-.1.26-.19.4-.29 1.2.81 2.4 1.61 3.6 2.42Zm-20.1 11.78c.67-.37 1.23-.91 1.67-1.6-.11.5-.24 1-.38 1.49-.43.04-.86.08-1.29.11Zm2.38-37.24c1.34-.31 2.56-.52 3.71-.69-1.03.19-2.04.41-3.04.65-.14-.07-.34-.02-.45.11-.07.02-.15.04-.22.05v-.13.01Zm.04.84c.07-.02.14-.03.2-.05.34 1.66.41 3.41.5 5.09.17 2.9.24 5.81.28 8.71l.03 3.17c-.17.07-.34.14-.51.2-.06-4.96-.21-10.58-.51-17.12h.01Zm16.04 5.62c-1.16 2.25-3.06 4.1-5.02 5.66-2.8 2.23-5.99 3.97-9.3 5.35-.01-3.56-.09-7.12-.27-10.67-.1-2.04-.16-4.16-.57-6.18 3.3-.78 6.72-1.36 10.1-1.1 1.85.14 4.23.59 5.32 2.29.92 1.43.46 3.24-.26 4.65Zm.85-.18c.6-1.37.9-2.92.28-4.32-.67-1.52-2.2-2.32-3.76-2.74.46.1.89.21 1.29.37 1.74.67 2.69 1.88 2.93 3.21.2 1.13-.05 2.25-.74 3.47V70Zm-27.47-4.14c-.12-.19-.23-.38-.34-.57.74.42.85.36.99.41v.08c-.22.03-.43.06-.65.08Zm11.21 30.46c-.08 1.08-.16 2.17-.33 3.24-.05.35-.11.69-.2 1.03 0 .04-.02.07-.03.11-.15.02-.3.04-.45.05.45-1.64.76-3.36.79-5.07.03-.29.08-.57.1-.89-.03-.31-.03-.47.24-.57-.04.69-.07 1.39-.12 2.08v.02Zm5.6-2.47c.48.11.92.52 2.49 1.72-.46-.32-.92-.65-1.38-.97-.37-.25-.73-.5-1.1-.75h-.01Zm21.23 7.24a70.76 70.76 0 0 1-4.37 4.63c-.14-.09-.27-.19-.4-.28.19-.09.37-.24.55-.47.87-1.14 5.43-5.51 5.49-7.45.31.26.62.53.92.79-.67.97-1.42 1.88-2.19 2.77v.01Z",
|
|
@@ -45333,24 +46035,24 @@ var ExcalidrawLogo = ({
|
|
|
45333
46035
|
size = "small",
|
|
45334
46036
|
withText
|
|
45335
46037
|
}) => {
|
|
45336
|
-
return /* @__PURE__ */
|
|
45337
|
-
/* @__PURE__ */
|
|
45338
|
-
withText && /* @__PURE__ */
|
|
46038
|
+
return /* @__PURE__ */ jsxs71("div", { className: `ExcalidrawLogo is-${size}`, style, children: [
|
|
46039
|
+
/* @__PURE__ */ jsx143(LogoIcon, {}),
|
|
46040
|
+
withText && /* @__PURE__ */ jsx143(LogoText, {})
|
|
45339
46041
|
] });
|
|
45340
46042
|
};
|
|
45341
46043
|
|
|
45342
46044
|
// components/welcome-screen/WelcomeScreen.Center.tsx
|
|
45343
|
-
import { Fragment as
|
|
46045
|
+
import { Fragment as Fragment27, jsx as jsx144, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
45344
46046
|
var WelcomeScreenMenuItemContent = ({
|
|
45345
46047
|
icon,
|
|
45346
46048
|
shortcut,
|
|
45347
46049
|
children
|
|
45348
46050
|
}) => {
|
|
45349
46051
|
const editorInterface = useEditorInterface();
|
|
45350
|
-
return /* @__PURE__ */
|
|
45351
|
-
/* @__PURE__ */
|
|
45352
|
-
/* @__PURE__ */
|
|
45353
|
-
shortcut && editorInterface.formFactor !== "phone" && /* @__PURE__ */
|
|
46052
|
+
return /* @__PURE__ */ jsxs72(Fragment27, { children: [
|
|
46053
|
+
/* @__PURE__ */ jsx144("div", { className: "welcome-screen-menu-item__icon", children: icon }),
|
|
46054
|
+
/* @__PURE__ */ jsx144("div", { className: "welcome-screen-menu-item__text", children }),
|
|
46055
|
+
shortcut && editorInterface.formFactor !== "phone" && /* @__PURE__ */ jsx144("div", { className: "welcome-screen-menu-item__shortcut", children: shortcut })
|
|
45354
46056
|
] });
|
|
45355
46057
|
};
|
|
45356
46058
|
WelcomeScreenMenuItemContent.displayName = "WelcomeScreenMenuItemContent";
|
|
@@ -45362,14 +46064,14 @@ var WelcomeScreenMenuItem = ({
|
|
|
45362
46064
|
className = "",
|
|
45363
46065
|
...props
|
|
45364
46066
|
}) => {
|
|
45365
|
-
return /* @__PURE__ */
|
|
46067
|
+
return /* @__PURE__ */ jsx144(
|
|
45366
46068
|
"button",
|
|
45367
46069
|
{
|
|
45368
46070
|
...props,
|
|
45369
46071
|
type: "button",
|
|
45370
46072
|
className: `welcome-screen-menu-item ${className}`,
|
|
45371
46073
|
onClick: onSelect,
|
|
45372
|
-
children: /* @__PURE__ */
|
|
46074
|
+
children: /* @__PURE__ */ jsx144(WelcomeScreenMenuItemContent, { icon, shortcut, children })
|
|
45373
46075
|
}
|
|
45374
46076
|
);
|
|
45375
46077
|
};
|
|
@@ -45382,7 +46084,7 @@ var WelcomeScreenMenuItemLink = ({
|
|
|
45382
46084
|
className = "",
|
|
45383
46085
|
...props
|
|
45384
46086
|
}) => {
|
|
45385
|
-
return /* @__PURE__ */
|
|
46087
|
+
return /* @__PURE__ */ jsx144(
|
|
45386
46088
|
"a",
|
|
45387
46089
|
{
|
|
45388
46090
|
...props,
|
|
@@ -45390,38 +46092,38 @@ var WelcomeScreenMenuItemLink = ({
|
|
|
45390
46092
|
href,
|
|
45391
46093
|
target: "_blank",
|
|
45392
46094
|
rel: "noopener",
|
|
45393
|
-
children: /* @__PURE__ */
|
|
46095
|
+
children: /* @__PURE__ */ jsx144(WelcomeScreenMenuItemContent, { icon, shortcut, children })
|
|
45394
46096
|
}
|
|
45395
46097
|
);
|
|
45396
46098
|
};
|
|
45397
46099
|
WelcomeScreenMenuItemLink.displayName = "WelcomeScreenMenuItemLink";
|
|
45398
46100
|
var Center = ({ children }) => {
|
|
45399
46101
|
const { WelcomeScreenCenterTunnel } = useTunnels();
|
|
45400
|
-
return /* @__PURE__ */
|
|
45401
|
-
/* @__PURE__ */
|
|
45402
|
-
/* @__PURE__ */
|
|
45403
|
-
/* @__PURE__ */
|
|
45404
|
-
/* @__PURE__ */
|
|
45405
|
-
/* @__PURE__ */
|
|
46102
|
+
return /* @__PURE__ */ jsx144(WelcomeScreenCenterTunnel.In, { children: /* @__PURE__ */ jsx144("div", { className: "welcome-screen-center", children: children || /* @__PURE__ */ jsxs72(Fragment27, { children: [
|
|
46103
|
+
/* @__PURE__ */ jsx144(Logo, {}),
|
|
46104
|
+
/* @__PURE__ */ jsx144(Heading, { children: t("welcomeScreen.defaults.center_heading") }),
|
|
46105
|
+
/* @__PURE__ */ jsxs72(Menu, { children: [
|
|
46106
|
+
/* @__PURE__ */ jsx144(MenuItemLoadScene, {}),
|
|
46107
|
+
/* @__PURE__ */ jsx144(MenuItemHelp, {})
|
|
45406
46108
|
] })
|
|
45407
46109
|
] }) }) });
|
|
45408
46110
|
};
|
|
45409
46111
|
Center.displayName = "Center";
|
|
45410
46112
|
var Logo = ({ children }) => {
|
|
45411
|
-
return /* @__PURE__ */
|
|
46113
|
+
return /* @__PURE__ */ jsx144("div", { className: "welcome-screen-center__logo excalifont welcome-screen-decor", children: children || /* @__PURE__ */ jsx144(ExcalidrawLogo, { withText: true }) });
|
|
45412
46114
|
};
|
|
45413
46115
|
Logo.displayName = "Logo";
|
|
45414
46116
|
var Heading = ({ children }) => {
|
|
45415
|
-
return /* @__PURE__ */
|
|
46117
|
+
return /* @__PURE__ */ jsx144("div", { className: "welcome-screen-center__heading welcome-screen-decor excalifont", children });
|
|
45416
46118
|
};
|
|
45417
46119
|
Heading.displayName = "Heading";
|
|
45418
46120
|
var Menu = ({ children }) => {
|
|
45419
|
-
return /* @__PURE__ */
|
|
46121
|
+
return /* @__PURE__ */ jsx144("div", { className: "welcome-screen-menu", children });
|
|
45420
46122
|
};
|
|
45421
46123
|
Menu.displayName = "Menu";
|
|
45422
46124
|
var MenuItemHelp = () => {
|
|
45423
46125
|
const actionManager = useExcalidrawActionManager();
|
|
45424
|
-
return /* @__PURE__ */
|
|
46126
|
+
return /* @__PURE__ */ jsx144(
|
|
45425
46127
|
WelcomeScreenMenuItem,
|
|
45426
46128
|
{
|
|
45427
46129
|
onSelect: () => actionManager.executeAction(actionShortcuts),
|
|
@@ -45438,7 +46140,7 @@ var MenuItemLoadScene = () => {
|
|
|
45438
46140
|
if (appState.viewModeEnabled) {
|
|
45439
46141
|
return null;
|
|
45440
46142
|
}
|
|
45441
|
-
return /* @__PURE__ */
|
|
46143
|
+
return /* @__PURE__ */ jsx144(
|
|
45442
46144
|
WelcomeScreenMenuItem,
|
|
45443
46145
|
{
|
|
45444
46146
|
onSelect: () => actionManager.executeAction(actionLoadScene),
|
|
@@ -45453,7 +46155,7 @@ var MenuItemLiveCollaborationTrigger = ({
|
|
|
45453
46155
|
onSelect
|
|
45454
46156
|
}) => {
|
|
45455
46157
|
const { t: t2 } = useI18n();
|
|
45456
|
-
return /* @__PURE__ */
|
|
46158
|
+
return /* @__PURE__ */ jsx144(WelcomeScreenMenuItem, { shortcut: null, onSelect, icon: usersIcon, children: t2("labels.liveCollaboration") });
|
|
45457
46159
|
};
|
|
45458
46160
|
MenuItemLiveCollaborationTrigger.displayName = "MenuItemLiveCollaborationTrigger";
|
|
45459
46161
|
Center.Logo = Logo;
|
|
@@ -45466,40 +46168,40 @@ Center.MenuItemLoadScene = MenuItemLoadScene;
|
|
|
45466
46168
|
Center.MenuItemLiveCollaborationTrigger = MenuItemLiveCollaborationTrigger;
|
|
45467
46169
|
|
|
45468
46170
|
// components/welcome-screen/WelcomeScreen.Hints.tsx
|
|
45469
|
-
import { jsx as
|
|
46171
|
+
import { jsx as jsx145, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
45470
46172
|
var MenuHint = ({ children }) => {
|
|
45471
46173
|
const { WelcomeScreenMenuHintTunnel } = useTunnels();
|
|
45472
|
-
return /* @__PURE__ */
|
|
46174
|
+
return /* @__PURE__ */ jsx145(WelcomeScreenMenuHintTunnel.In, { children: /* @__PURE__ */ jsxs73("div", { className: "excalifont welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--menu", children: [
|
|
45473
46175
|
WelcomeScreenMenuArrow,
|
|
45474
|
-
/* @__PURE__ */
|
|
46176
|
+
/* @__PURE__ */ jsx145("div", { className: "welcome-screen-decor-hint__label", children: children || t("welcomeScreen.defaults.menuHint") })
|
|
45475
46177
|
] }) });
|
|
45476
46178
|
};
|
|
45477
46179
|
MenuHint.displayName = "MenuHint";
|
|
45478
46180
|
var ToolbarHint = ({ children }) => {
|
|
45479
46181
|
const { WelcomeScreenToolbarHintTunnel } = useTunnels();
|
|
45480
|
-
return /* @__PURE__ */
|
|
45481
|
-
/* @__PURE__ */
|
|
46182
|
+
return /* @__PURE__ */ jsx145(WelcomeScreenToolbarHintTunnel.In, { children: /* @__PURE__ */ jsxs73("div", { className: "excalifont welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--toolbar", children: [
|
|
46183
|
+
/* @__PURE__ */ jsx145("div", { className: "welcome-screen-decor-hint__label", children: children || t("welcomeScreen.defaults.toolbarHint") }),
|
|
45482
46184
|
WelcomeScreenTopToolbarArrow
|
|
45483
46185
|
] }) });
|
|
45484
46186
|
};
|
|
45485
46187
|
ToolbarHint.displayName = "ToolbarHint";
|
|
45486
46188
|
var HelpHint = ({ children }) => {
|
|
45487
46189
|
const { WelcomeScreenHelpHintTunnel } = useTunnels();
|
|
45488
|
-
return /* @__PURE__ */
|
|
45489
|
-
/* @__PURE__ */
|
|
46190
|
+
return /* @__PURE__ */ jsx145(WelcomeScreenHelpHintTunnel.In, { children: /* @__PURE__ */ jsxs73("div", { className: "excalifont welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--help", children: [
|
|
46191
|
+
/* @__PURE__ */ jsx145("div", { children: children || t("welcomeScreen.defaults.helpHint") }),
|
|
45490
46192
|
WelcomeScreenHelpArrow
|
|
45491
46193
|
] }) });
|
|
45492
46194
|
};
|
|
45493
46195
|
HelpHint.displayName = "HelpHint";
|
|
45494
46196
|
|
|
45495
46197
|
// components/welcome-screen/WelcomeScreen.tsx
|
|
45496
|
-
import { Fragment as
|
|
46198
|
+
import { Fragment as Fragment28, jsx as jsx146, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
45497
46199
|
var WelcomeScreen = (props) => {
|
|
45498
|
-
return /* @__PURE__ */
|
|
45499
|
-
/* @__PURE__ */
|
|
45500
|
-
/* @__PURE__ */
|
|
45501
|
-
/* @__PURE__ */
|
|
45502
|
-
/* @__PURE__ */
|
|
46200
|
+
return /* @__PURE__ */ jsx146(Fragment28, { children: props.children || /* @__PURE__ */ jsxs74(Fragment28, { children: [
|
|
46201
|
+
/* @__PURE__ */ jsx146(Center, {}),
|
|
46202
|
+
/* @__PURE__ */ jsx146(MenuHint, {}),
|
|
46203
|
+
/* @__PURE__ */ jsx146(ToolbarHint, {}),
|
|
46204
|
+
/* @__PURE__ */ jsx146(HelpHint, {})
|
|
45503
46205
|
] }) });
|
|
45504
46206
|
};
|
|
45505
46207
|
WelcomeScreen.displayName = "WelcomeScreen";
|
|
@@ -45681,37 +46383,37 @@ import { isLinearElement as isLinearElement12 } from "@excalidraw/element";
|
|
|
45681
46383
|
import {
|
|
45682
46384
|
FONT_FAMILY as FONT_FAMILY8,
|
|
45683
46385
|
THEME as THEME26,
|
|
45684
|
-
MIME_TYPES as
|
|
46386
|
+
MIME_TYPES as MIME_TYPES12,
|
|
45685
46387
|
ROUNDNESS as ROUNDNESS9,
|
|
45686
46388
|
DEFAULT_LASER_COLOR as DEFAULT_LASER_COLOR2,
|
|
45687
46389
|
UserIdleState as UserIdleState2,
|
|
45688
46390
|
normalizeLink as normalizeLink5,
|
|
45689
|
-
sceneCoordsToViewportCoords as
|
|
46391
|
+
sceneCoordsToViewportCoords as sceneCoordsToViewportCoords8,
|
|
45690
46392
|
viewportCoordsToSceneCoords as viewportCoordsToSceneCoords4,
|
|
45691
46393
|
getFormFactor as getFormFactor2,
|
|
45692
46394
|
throttleRAF as throttleRAF3
|
|
45693
46395
|
} from "@excalidraw/common";
|
|
45694
46396
|
import {
|
|
45695
46397
|
mutateElement as mutateElement8,
|
|
45696
|
-
newElementWith as
|
|
46398
|
+
newElementWith as newElementWith12,
|
|
45697
46399
|
bumpVersion as bumpVersion4
|
|
45698
46400
|
} from "@excalidraw/element";
|
|
45699
46401
|
import { CaptureUpdateAction as CaptureUpdateAction40 } from "@excalidraw/element";
|
|
45700
46402
|
import {
|
|
45701
|
-
getCommonBounds as
|
|
46403
|
+
getCommonBounds as getCommonBounds15,
|
|
45702
46404
|
getVisibleSceneBounds as getVisibleSceneBounds2,
|
|
45703
46405
|
convertToExcalidrawElements as convertToExcalidrawElements2
|
|
45704
46406
|
} from "@excalidraw/element";
|
|
45705
46407
|
import { elementsOverlappingBBox as elementsOverlappingBBox3 } from "@excalidraw/element";
|
|
45706
46408
|
import { isElementLink as isElementLink4 } from "@excalidraw/element";
|
|
45707
46409
|
import { setCustomTextMetricsProvider } from "@excalidraw/element";
|
|
45708
|
-
import { jsx as
|
|
46410
|
+
import { jsx as jsx147 } from "react/jsx-runtime";
|
|
45709
46411
|
polyfill_default();
|
|
45710
46412
|
var ExcalidrawAPIProvider = ({
|
|
45711
46413
|
children
|
|
45712
46414
|
}) => {
|
|
45713
46415
|
const [api, setApi] = useState36(null);
|
|
45714
|
-
return /* @__PURE__ */
|
|
46416
|
+
return /* @__PURE__ */ jsx147(ExcalidrawAPIContext.Provider, { value: api, children: /* @__PURE__ */ jsx147(ExcalidrawAPISetContext.Provider, { value: setApi, children }) });
|
|
45715
46417
|
};
|
|
45716
46418
|
var ExcalidrawBase = (props) => {
|
|
45717
46419
|
const {
|
|
@@ -45793,6 +46495,7 @@ var ExcalidrawBase = (props) => {
|
|
|
45793
46495
|
const normalizedImageOptions = {
|
|
45794
46496
|
maxFileSizeBytes: imageOptions?.maxFileSizeBytes ?? DEFAULT_IMAGE_OPTIONS.maxFileSizeBytes,
|
|
45795
46497
|
maxWidthOrHeight: imageOptions?.maxWidthOrHeight ?? DEFAULT_IMAGE_OPTIONS.maxWidthOrHeight,
|
|
46498
|
+
gifAutoDecodeMaxFileSizeBytes: imageOptions?.gifAutoDecodeMaxFileSizeBytes ?? DEFAULT_IMAGE_OPTIONS.gifAutoDecodeMaxFileSizeBytes,
|
|
45796
46499
|
placeholderTransitionDuration: imageOptions?.placeholderTransitionDuration ?? DEFAULT_IMAGE_OPTIONS.placeholderTransitionDuration
|
|
45797
46500
|
};
|
|
45798
46501
|
const setExcalidrawAPI = useContext5(ExcalidrawAPISetContext);
|
|
@@ -45826,7 +46529,7 @@ var ExcalidrawBase = (props) => {
|
|
|
45826
46529
|
document.removeEventListener("touchmove", handleTouchMove);
|
|
45827
46530
|
};
|
|
45828
46531
|
}, [browserZoomAllowed]);
|
|
45829
|
-
return /* @__PURE__ */
|
|
46532
|
+
return /* @__PURE__ */ jsx147(EditorJotaiProvider, { store: editorJotaiStore, children: /* @__PURE__ */ jsx147(InitializeApp, { langCode, theme, children: /* @__PURE__ */ jsx147(
|
|
45830
46533
|
App_default,
|
|
45831
46534
|
{
|
|
45832
46535
|
onExport,
|
|
@@ -45946,10 +46649,10 @@ var areEqual5 = (prevProps, nextProps) => {
|
|
|
45946
46649
|
}
|
|
45947
46650
|
return prevUIOptions[key] === nextUIOptions[key];
|
|
45948
46651
|
});
|
|
45949
|
-
const isImageOptionsSame = (prevImageOptions?.maxWidthOrHeight ?? DEFAULT_IMAGE_OPTIONS.maxWidthOrHeight) === (nextImageOptions?.maxWidthOrHeight ?? DEFAULT_IMAGE_OPTIONS.maxWidthOrHeight) && (prevImageOptions?.maxFileSizeBytes ?? DEFAULT_IMAGE_OPTIONS.maxFileSizeBytes) === (nextImageOptions?.maxFileSizeBytes ?? DEFAULT_IMAGE_OPTIONS.maxFileSizeBytes) && (prevImageOptions?.placeholderTransitionDuration ?? DEFAULT_IMAGE_OPTIONS.placeholderTransitionDuration) === (nextImageOptions?.placeholderTransitionDuration ?? DEFAULT_IMAGE_OPTIONS.placeholderTransitionDuration);
|
|
46652
|
+
const isImageOptionsSame = (prevImageOptions?.maxWidthOrHeight ?? DEFAULT_IMAGE_OPTIONS.maxWidthOrHeight) === (nextImageOptions?.maxWidthOrHeight ?? DEFAULT_IMAGE_OPTIONS.maxWidthOrHeight) && (prevImageOptions?.maxFileSizeBytes ?? DEFAULT_IMAGE_OPTIONS.maxFileSizeBytes) === (nextImageOptions?.maxFileSizeBytes ?? DEFAULT_IMAGE_OPTIONS.maxFileSizeBytes) && (prevImageOptions?.gifAutoDecodeMaxFileSizeBytes ?? DEFAULT_IMAGE_OPTIONS.gifAutoDecodeMaxFileSizeBytes) === (nextImageOptions?.gifAutoDecodeMaxFileSizeBytes ?? DEFAULT_IMAGE_OPTIONS.gifAutoDecodeMaxFileSizeBytes) && (prevImageOptions?.placeholderTransitionDuration ?? DEFAULT_IMAGE_OPTIONS.placeholderTransitionDuration) === (nextImageOptions?.placeholderTransitionDuration ?? DEFAULT_IMAGE_OPTIONS.placeholderTransitionDuration);
|
|
45950
46653
|
return isUIOptionsSame && isImageOptionsSame && isShallowEqual10(prev, next);
|
|
45951
46654
|
};
|
|
45952
|
-
var Excalidraw =
|
|
46655
|
+
var Excalidraw = React43.memo(ExcalidrawBase, areEqual5);
|
|
45953
46656
|
Excalidraw.displayName = "Excalidraw";
|
|
45954
46657
|
function useExcalidrawStateValue(selector) {
|
|
45955
46658
|
return useAppStateValue(selector, false);
|
|
@@ -45968,7 +46671,7 @@ export {
|
|
|
45968
46671
|
Fonts,
|
|
45969
46672
|
FooterCenter_default as Footer,
|
|
45970
46673
|
LiveCollaborationTrigger_default as LiveCollaborationTrigger,
|
|
45971
|
-
|
|
46674
|
+
MIME_TYPES12 as MIME_TYPES,
|
|
45972
46675
|
MainMenu_default as MainMenu,
|
|
45973
46676
|
ROUNDNESS9 as ROUNDNESS,
|
|
45974
46677
|
Sidebar,
|
|
@@ -45987,7 +46690,7 @@ export {
|
|
|
45987
46690
|
exportToCanvas2 as exportToCanvas,
|
|
45988
46691
|
exportToClipboard,
|
|
45989
46692
|
exportToSvg2 as exportToSvg,
|
|
45990
|
-
|
|
46693
|
+
getCommonBounds15 as getCommonBounds,
|
|
45991
46694
|
getDataURL,
|
|
45992
46695
|
getFormFactor2 as getFormFactor,
|
|
45993
46696
|
getNonDeletedElements19 as getNonDeletedElements,
|
|
@@ -46004,7 +46707,7 @@ export {
|
|
|
46004
46707
|
languages,
|
|
46005
46708
|
loadFromBlob,
|
|
46006
46709
|
mutateElement8 as mutateElement,
|
|
46007
|
-
|
|
46710
|
+
newElementWith12 as newElementWith,
|
|
46008
46711
|
normalizeLink5 as normalizeLink,
|
|
46009
46712
|
parseDataTransferEvent,
|
|
46010
46713
|
parseDragImageMetadata,
|
|
@@ -46013,7 +46716,7 @@ export {
|
|
|
46013
46716
|
restoreAppState,
|
|
46014
46717
|
restoreElement,
|
|
46015
46718
|
restoreElements,
|
|
46016
|
-
|
|
46719
|
+
sceneCoordsToViewportCoords8 as sceneCoordsToViewportCoords,
|
|
46017
46720
|
serializeAsJSON,
|
|
46018
46721
|
setCustomTextMetricsProvider,
|
|
46019
46722
|
throttleRAF3 as throttleRAF,
|