@myoc/excalidraw 0.19.542 → 0.19.543
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 +52 -0
- package/dist/dev/{chunk-2OVHIH4L.js → chunk-35XUJXYN.js} +3 -3
- package/dist/dev/{chunk-2OVHIH4L.js.map → chunk-35XUJXYN.js.map} +1 -1
- package/dist/dev/{chunk-E77EFOSN.js → chunk-6OYO4QVO.js} +3 -3
- package/dist/dev/{chunk-D7VSTSAC.js → chunk-VQRWPJBP.js} +2 -2
- package/dist/dev/data/{image-7IWBMQLB.js → image-MKDSIQJM.js} +3 -3
- package/dist/dev/index.css +76 -40
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +551 -418
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{en-JINXO2V2.js → en-CBVTFJ6O.js} +2 -2
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/{chunk-J5DZGRBF.js → chunk-6XZBDSSD.js} +2 -2
- package/dist/prod/{chunk-2YEDAYNK.js → chunk-FAEGDXCJ.js} +1 -1
- package/dist/prod/{chunk-KGIBYNMP.js → chunk-VXOLR3OR.js} +4 -3
- package/dist/prod/data/image-UN6HXAW6.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +19 -19
- package/dist/prod/locales/{en-2ZA2LKRK.js → en-7BECMN3G.js} +1 -1
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/excalidraw/actions/actionSmartZoom.d.ts +4 -0
- package/dist/types/excalidraw/components/App.d.ts +8 -0
- package/package.json +4 -4
- package/dist/prod/data/image-I7AV73WO.js +0 -1
- /package/dist/dev/{chunk-E77EFOSN.js.map → chunk-6OYO4QVO.js.map} +0 -0
- /package/dist/dev/{chunk-D7VSTSAC.js.map → chunk-VQRWPJBP.js.map} +0 -0
- /package/dist/dev/data/{image-7IWBMQLB.js.map → image-MKDSIQJM.js.map} +0 -0
- /package/dist/dev/locales/{en-JINXO2V2.js.map → en-CBVTFJ6O.js.map} +0 -0
package/dist/dev/index.js
CHANGED
|
@@ -64,13 +64,13 @@ import {
|
|
|
64
64
|
serializeAsJSON,
|
|
65
65
|
strokeRectWithRotation_simple,
|
|
66
66
|
zoomToFitBounds
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-6OYO4QVO.js";
|
|
68
68
|
import {
|
|
69
69
|
define_import_meta_env_default
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-VQRWPJBP.js";
|
|
71
71
|
import {
|
|
72
72
|
en_default
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-35XUJXYN.js";
|
|
74
74
|
import {
|
|
75
75
|
percentages_default
|
|
76
76
|
} from "./chunk-72CYJXY3.js";
|
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
} from "@excalidraw/common";
|
|
98
98
|
|
|
99
99
|
// components/App.tsx
|
|
100
|
-
import
|
|
100
|
+
import clsx62 from "clsx";
|
|
101
101
|
import throttle3 from "lodash.throttle";
|
|
102
102
|
import React41, { useContext as useContext4 } from "react";
|
|
103
103
|
import { flushSync as flushSync2 } from "react-dom";
|
|
@@ -398,7 +398,7 @@ var globImport_locales_json = __glob({
|
|
|
398
398
|
"./locales/de-CH.json": () => import("./locales/de-CH-KLWBYLGC.js"),
|
|
399
399
|
"./locales/de-DE.json": () => import("./locales/de-DE-UB755M7G.js"),
|
|
400
400
|
"./locales/el-GR.json": () => import("./locales/el-GR-J2BFDAEA.js"),
|
|
401
|
-
"./locales/en.json": () => import("./locales/en-
|
|
401
|
+
"./locales/en.json": () => import("./locales/en-CBVTFJ6O.js"),
|
|
402
402
|
"./locales/es-ES.json": () => import("./locales/es-ES-GL35U3D6.js"),
|
|
403
403
|
"./locales/eu-ES.json": () => import("./locales/eu-ES-5LL7P4G7.js"),
|
|
404
404
|
"./locales/fa-IR.json": () => import("./locales/fa-IR-2D6AXPSB.js"),
|
|
@@ -10970,7 +10970,7 @@ var exportCanvas = async (type, elements, appState, files, {
|
|
|
10970
10970
|
let blob = canvasToBlob(tempCanvas);
|
|
10971
10971
|
if (appState.exportEmbedScene) {
|
|
10972
10972
|
blob = blob.then(
|
|
10973
|
-
(blob2) => import("./data/image-
|
|
10973
|
+
(blob2) => import("./data/image-MKDSIQJM.js").then(
|
|
10974
10974
|
({ encodePngMetadata: encodePngMetadata2 }) => encodePngMetadata2({
|
|
10975
10975
|
blob: blob2,
|
|
10976
10976
|
metadata: serializeAsJSON(elements, appState, files, "local")
|
|
@@ -13125,11 +13125,14 @@ var actionToggleGridMode = register({
|
|
|
13125
13125
|
});
|
|
13126
13126
|
|
|
13127
13127
|
// actions/actionSmartZoom.tsx
|
|
13128
|
+
import clsx23 from "clsx";
|
|
13128
13129
|
import { KEYS as KEYS27 } from "@excalidraw/common";
|
|
13129
13130
|
import { CaptureUpdateAction as CaptureUpdateAction22 } from "@excalidraw/element/store";
|
|
13130
13131
|
import { getElementBounds } from "@excalidraw/element";
|
|
13131
13132
|
import { isImageElement } from "@excalidraw/element/typeChecks";
|
|
13132
13133
|
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
13134
|
+
var SMART_ZOOM_KEY_HINT = "Press <kbd>F</kbd> quickly to smart zoom the canvas, or hold and click on an item to smart zoom to it";
|
|
13135
|
+
var smartZoomKeyHeldAtom = atom(false);
|
|
13133
13136
|
var getNextSmartZoomImage = (elements, elementsMap, currentImageId, direction) => {
|
|
13134
13137
|
const images = elements.filter(isImageElement).sort((imageA, imageB) => {
|
|
13135
13138
|
const [leftA, topA] = getElementBounds(imageA, elementsMap);
|
|
@@ -13143,6 +13146,25 @@ var getNextSmartZoomImage = (elements, elementsMap, currentImageId, direction) =
|
|
|
13143
13146
|
const nextIndex = direction === "next" ? (currentIndex + 1) % images.length : (currentIndex < 0 ? images.length - 1 : currentIndex - 1 + images.length) % images.length;
|
|
13144
13147
|
return images[nextIndex];
|
|
13145
13148
|
};
|
|
13149
|
+
var SmartZoomButton = ({ data, updateData }) => {
|
|
13150
|
+
const smartZoomKeyHeld = useAtomValue(smartZoomKeyHeldAtom);
|
|
13151
|
+
return /* @__PURE__ */ jsx53(
|
|
13152
|
+
IconButton,
|
|
13153
|
+
{
|
|
13154
|
+
type: "button",
|
|
13155
|
+
icon: arrowsToEyeIcon,
|
|
13156
|
+
"aria-label": t("labels.smartZoom"),
|
|
13157
|
+
title: `${t("labels.smartZoom")} - ${KEYS27.F.toLocaleUpperCase()}`,
|
|
13158
|
+
onClick: () => updateData(null),
|
|
13159
|
+
size: data?.size || "medium",
|
|
13160
|
+
"data-testid": "button-smart-zoom",
|
|
13161
|
+
keyBindingLabel: KEYS27.F.toLocaleUpperCase(),
|
|
13162
|
+
className: clsx23({
|
|
13163
|
+
"smart-zoom-button--key-held": smartZoomKeyHeld
|
|
13164
|
+
})
|
|
13165
|
+
}
|
|
13166
|
+
);
|
|
13167
|
+
};
|
|
13146
13168
|
var actionSmartZoom = register({
|
|
13147
13169
|
name: "smartZoom",
|
|
13148
13170
|
label: "toolBar.smartZoom",
|
|
@@ -13166,20 +13188,7 @@ var actionSmartZoom = register({
|
|
|
13166
13188
|
captureUpdate: CaptureUpdateAction22.NEVER
|
|
13167
13189
|
};
|
|
13168
13190
|
},
|
|
13169
|
-
|
|
13170
|
-
PanelComponent: ({ data, updateData }) => /* @__PURE__ */ jsx53(
|
|
13171
|
-
IconButton,
|
|
13172
|
-
{
|
|
13173
|
-
type: "button",
|
|
13174
|
-
icon: arrowsToEyeIcon,
|
|
13175
|
-
"aria-label": t("labels.smartZoom"),
|
|
13176
|
-
title: `${t("labels.smartZoom")} - ${KEYS27.F.toLocaleUpperCase()}`,
|
|
13177
|
-
onClick: () => updateData(null),
|
|
13178
|
-
size: data?.size || "medium",
|
|
13179
|
-
"data-testid": "button-smart-zoom",
|
|
13180
|
-
keyBindingLabel: KEYS27.F.toLocaleUpperCase()
|
|
13181
|
-
}
|
|
13182
|
-
)
|
|
13191
|
+
PanelComponent: SmartZoomButton
|
|
13183
13192
|
});
|
|
13184
13193
|
|
|
13185
13194
|
// actions/actionToggleObjectsSnapMode.tsx
|
|
@@ -13560,7 +13569,7 @@ import { CaptureUpdateAction as CaptureUpdateAction28 } from "@excalidraw/elemen
|
|
|
13560
13569
|
|
|
13561
13570
|
// components/hyperlink/Hyperlink.tsx
|
|
13562
13571
|
import { pointFrom as pointFrom3 } from "@excalidraw/math";
|
|
13563
|
-
import
|
|
13572
|
+
import clsx24 from "clsx";
|
|
13564
13573
|
import {
|
|
13565
13574
|
useCallback as useCallback6,
|
|
13566
13575
|
useEffect as useEffect20,
|
|
@@ -13734,7 +13743,7 @@ var Hyperlink = ({
|
|
|
13734
13743
|
isEditing ? /* @__PURE__ */ jsx54(
|
|
13735
13744
|
"input",
|
|
13736
13745
|
{
|
|
13737
|
-
className:
|
|
13746
|
+
className: clsx24("excalidraw-hyperlinkContainer-input"),
|
|
13738
13747
|
placeholder: t("labels.link.hint"),
|
|
13739
13748
|
ref: inputRef,
|
|
13740
13749
|
value: inputVal,
|
|
@@ -16971,7 +16980,7 @@ var actionTextAutoResize = register({
|
|
|
16971
16980
|
|
|
16972
16981
|
// actions/actionToggleViewMode.tsx
|
|
16973
16982
|
import { CODES as CODES10, KEYS as KEYS37 } from "@excalidraw/common";
|
|
16974
|
-
import
|
|
16983
|
+
import clsx25 from "clsx";
|
|
16975
16984
|
import { CaptureUpdateAction as CaptureUpdateAction37 } from "@excalidraw/element";
|
|
16976
16985
|
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
16977
16986
|
var actionToggleViewMode = register({
|
|
@@ -17014,7 +17023,7 @@ var actionToggleViewMode = register({
|
|
|
17014
17023
|
onClick: () => updateData(null),
|
|
17015
17024
|
size: data?.size || "medium",
|
|
17016
17025
|
"data-testid": "button-view-mode",
|
|
17017
|
-
className:
|
|
17026
|
+
className: clsx25({
|
|
17018
17027
|
enabled: appState.viewModeEnabled
|
|
17019
17028
|
})
|
|
17020
17029
|
}
|
|
@@ -25349,7 +25358,7 @@ var BraveMeasureTextError = () => {
|
|
|
25349
25358
|
var BraveMeasureTextError_default = BraveMeasureTextError;
|
|
25350
25359
|
|
|
25351
25360
|
// components/ContextMenu.tsx
|
|
25352
|
-
import
|
|
25361
|
+
import clsx27 from "clsx";
|
|
25353
25362
|
import React20 from "react";
|
|
25354
25363
|
|
|
25355
25364
|
// actions/shortcuts.ts
|
|
@@ -25416,7 +25425,7 @@ import { useLayoutEffect as useLayoutEffect4, useRef as useRef16, useEffect as u
|
|
|
25416
25425
|
import { unstable_batchedUpdates as unstable_batchedUpdates2 } from "react-dom";
|
|
25417
25426
|
import { KEYS as KEYS41, queryFocusableElements } from "@excalidraw/common";
|
|
25418
25427
|
import { clamp as clamp10 } from "@excalidraw/math";
|
|
25419
|
-
import
|
|
25428
|
+
import clsx26 from "clsx";
|
|
25420
25429
|
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
25421
25430
|
var POPOVER_CONTAINER_GAP = 10;
|
|
25422
25431
|
var Popover7 = ({
|
|
@@ -25515,7 +25524,7 @@ var Popover7 = ({
|
|
|
25515
25524
|
return () => document.removeEventListener("pointerdown", handler, false);
|
|
25516
25525
|
}
|
|
25517
25526
|
}, [onCloseRequest]);
|
|
25518
|
-
return /* @__PURE__ */ jsx63("div", { className:
|
|
25527
|
+
return /* @__PURE__ */ jsx63("div", { className: clsx26("popover", className), ref: popoverRef, tabIndex: -1, children });
|
|
25519
25528
|
};
|
|
25520
25529
|
|
|
25521
25530
|
// components/ContextMenu.tsx
|
|
@@ -25618,7 +25627,7 @@ var ContextMenu2 = React20.memo(
|
|
|
25618
25627
|
"button",
|
|
25619
25628
|
{
|
|
25620
25629
|
type: "button",
|
|
25621
|
-
className:
|
|
25630
|
+
className: clsx27("context-menu-item", {
|
|
25622
25631
|
dangerous: actionName === "deleteSelectedElements",
|
|
25623
25632
|
checkmark: item.checked?.(appState)
|
|
25624
25633
|
}),
|
|
@@ -25641,7 +25650,7 @@ var ContextMenu2 = React20.memo(
|
|
|
25641
25650
|
|
|
25642
25651
|
// components/ViewportStatusFrame/ViewportStatusFrame.tsx
|
|
25643
25652
|
import { useId } from "react";
|
|
25644
|
-
import
|
|
25653
|
+
import clsx28 from "clsx";
|
|
25645
25654
|
import { Fragment as Fragment8, jsx as jsx65, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
25646
25655
|
var ViewportStatusBorder = ({
|
|
25647
25656
|
border,
|
|
@@ -25665,7 +25674,7 @@ var ViewportStatusBadge = ({
|
|
|
25665
25674
|
return /* @__PURE__ */ jsxs33(
|
|
25666
25675
|
"div",
|
|
25667
25676
|
{
|
|
25668
|
-
className:
|
|
25677
|
+
className: clsx28("viewport-status-frame__badge", {
|
|
25669
25678
|
"viewport-status-frame__badge--clickable": label.onClick
|
|
25670
25679
|
}),
|
|
25671
25680
|
role: "status",
|
|
@@ -25707,7 +25716,7 @@ var ViewportStatusBadge = ({
|
|
|
25707
25716
|
};
|
|
25708
25717
|
|
|
25709
25718
|
// components/LayerUI.tsx
|
|
25710
|
-
import
|
|
25719
|
+
import clsx60 from "clsx";
|
|
25711
25720
|
import React38 from "react";
|
|
25712
25721
|
import {
|
|
25713
25722
|
CLASSES as CLASSES9,
|
|
@@ -25743,7 +25752,7 @@ var useInitializeTunnels = () => {
|
|
|
25743
25752
|
};
|
|
25744
25753
|
|
|
25745
25754
|
// components/Actions.tsx
|
|
25746
|
-
import
|
|
25755
|
+
import clsx30 from "clsx";
|
|
25747
25756
|
import { useRef as useRef17 } from "react";
|
|
25748
25757
|
import { Popover as Popover8 } from "radix-ui";
|
|
25749
25758
|
import { CLASSES as CLASSES4 } from "@excalidraw/common";
|
|
@@ -25751,14 +25760,14 @@ import { isArrowElement as isArrowElement11 } from "@excalidraw/element";
|
|
|
25751
25760
|
|
|
25752
25761
|
// components/Stack.tsx
|
|
25753
25762
|
import { forwardRef as forwardRef2 } from "react";
|
|
25754
|
-
import
|
|
25763
|
+
import clsx29 from "clsx";
|
|
25755
25764
|
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
25756
25765
|
var RowStack = forwardRef2(
|
|
25757
25766
|
({ children, gap, align, justifyContent, className, style }, ref) => {
|
|
25758
25767
|
return /* @__PURE__ */ jsx66(
|
|
25759
25768
|
"div",
|
|
25760
25769
|
{
|
|
25761
|
-
className:
|
|
25770
|
+
className: clsx29("Stack Stack_horizontal", className),
|
|
25762
25771
|
style: {
|
|
25763
25772
|
"--gap": gap,
|
|
25764
25773
|
alignItems: align,
|
|
@@ -25776,7 +25785,7 @@ var ColStack = forwardRef2(
|
|
|
25776
25785
|
return /* @__PURE__ */ jsx66(
|
|
25777
25786
|
"div",
|
|
25778
25787
|
{
|
|
25779
|
-
className:
|
|
25788
|
+
className: clsx29("Stack Stack_vertical", className),
|
|
25780
25789
|
style: {
|
|
25781
25790
|
"--gap": gap,
|
|
25782
25791
|
justifyItems: align,
|
|
@@ -25879,7 +25888,7 @@ var getShapeActionPredicates = (appState, targetElements, elementsMap, app) => {
|
|
|
25879
25888
|
|
|
25880
25889
|
// components/Actions.tsx
|
|
25881
25890
|
import { Fragment as Fragment9, jsx as jsx67, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
25882
|
-
var PROPERTIES_CLASSES =
|
|
25891
|
+
var PROPERTIES_CLASSES = clsx30([
|
|
25883
25892
|
CLASSES4.SHAPE_ACTIONS_THEME_SCOPE,
|
|
25884
25893
|
"properties-content"
|
|
25885
25894
|
]);
|
|
@@ -26032,7 +26041,7 @@ var CombinedShapeProperties = ({
|
|
|
26032
26041
|
"button",
|
|
26033
26042
|
{
|
|
26034
26043
|
type: "button",
|
|
26035
|
-
className:
|
|
26044
|
+
className: clsx30("compact-action-button properties-trigger", {
|
|
26036
26045
|
active: isOpen
|
|
26037
26046
|
}),
|
|
26038
26047
|
title: t("labels.stroke"),
|
|
@@ -26102,7 +26111,7 @@ var CombinedArrowProperties = ({
|
|
|
26102
26111
|
"button",
|
|
26103
26112
|
{
|
|
26104
26113
|
type: "button",
|
|
26105
|
-
className:
|
|
26114
|
+
className: clsx30("compact-action-button properties-trigger", {
|
|
26106
26115
|
active: isOpen
|
|
26107
26116
|
}),
|
|
26108
26117
|
title: t("labels.arrowtypes"),
|
|
@@ -26182,7 +26191,7 @@ var CombinedTextProperties = ({
|
|
|
26182
26191
|
"button",
|
|
26183
26192
|
{
|
|
26184
26193
|
type: "button",
|
|
26185
|
-
className:
|
|
26194
|
+
className: clsx30("compact-action-button properties-trigger", {
|
|
26186
26195
|
active: isOpen
|
|
26187
26196
|
}),
|
|
26188
26197
|
title: t("labels.textAlign"),
|
|
@@ -26253,7 +26262,7 @@ var CombinedExtraActions = ({
|
|
|
26253
26262
|
"button",
|
|
26254
26263
|
{
|
|
26255
26264
|
type: "button",
|
|
26256
|
-
className:
|
|
26265
|
+
className: clsx30("compact-action-button properties-trigger", {
|
|
26257
26266
|
active: isOpen
|
|
26258
26267
|
}),
|
|
26259
26268
|
title: t("labels.actions"),
|
|
@@ -26333,7 +26342,7 @@ var CompactShapeActions = ({
|
|
|
26333
26342
|
);
|
|
26334
26343
|
const { container } = useExcalidrawContainer();
|
|
26335
26344
|
return /* @__PURE__ */ jsxs34("div", { className: "compact-shape-actions", children: [
|
|
26336
|
-
predicates.strokeColor && /* @__PURE__ */ jsx67("div", { className:
|
|
26345
|
+
predicates.strokeColor && /* @__PURE__ */ jsx67("div", { className: clsx30("compact-action-item"), children: renderAction("changeStrokeColor") }),
|
|
26337
26346
|
predicates.backgroundColor && /* @__PURE__ */ jsx67("div", { className: "compact-action-item", children: renderAction(
|
|
26338
26347
|
appState.activeTool.type === "bucketfill" ? "changeBucketFillBackgroundColor" : "changeBackgroundColor"
|
|
26339
26348
|
) }),
|
|
@@ -26440,7 +26449,7 @@ var MobileShapeActions = ({
|
|
|
26440
26449
|
flex: 1
|
|
26441
26450
|
},
|
|
26442
26451
|
children: [
|
|
26443
|
-
predicates.strokeColor && /* @__PURE__ */ jsx67("div", { className:
|
|
26452
|
+
predicates.strokeColor && /* @__PURE__ */ jsx67("div", { className: clsx30("compact-action-item"), children: renderAction("changeStrokeColor") }),
|
|
26444
26453
|
predicates.backgroundColor && /* @__PURE__ */ jsx67("div", { className: "compact-action-item", children: renderAction(
|
|
26445
26454
|
appState.activeTool.type === "bucketfill" ? "changeBucketFillBackgroundColor" : "changeBackgroundColor"
|
|
26446
26455
|
) }),
|
|
@@ -26544,7 +26553,7 @@ var ExitZenModeButton = ({
|
|
|
26544
26553
|
"button",
|
|
26545
26554
|
{
|
|
26546
26555
|
type: "button",
|
|
26547
|
-
className:
|
|
26556
|
+
className: clsx30("disable-zen-mode", {
|
|
26548
26557
|
"disable-zen-mode--visible": showExitZenModeBtn
|
|
26549
26558
|
}),
|
|
26550
26559
|
children: t("buttons.exitZenMode")
|
|
@@ -26552,7 +26561,7 @@ var ExitZenModeButton = ({
|
|
|
26552
26561
|
);
|
|
26553
26562
|
|
|
26554
26563
|
// components/LoadingMessage.tsx
|
|
26555
|
-
import
|
|
26564
|
+
import clsx31 from "clsx";
|
|
26556
26565
|
import { useState as useState17, useEffect as useEffect24 } from "react";
|
|
26557
26566
|
import { THEME as THEME23 } from "@excalidraw/common";
|
|
26558
26567
|
import { jsx as jsx68, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
@@ -26576,7 +26585,7 @@ var LoadingMessage = ({
|
|
|
26576
26585
|
return /* @__PURE__ */ jsxs35(
|
|
26577
26586
|
"div",
|
|
26578
26587
|
{
|
|
26579
|
-
className:
|
|
26588
|
+
className: clsx31("LoadingMessage", {
|
|
26580
26589
|
"LoadingMessage--dark": theme === THEME23.DARK
|
|
26581
26590
|
}),
|
|
26582
26591
|
children: [
|
|
@@ -26589,7 +26598,7 @@ var LoadingMessage = ({
|
|
|
26589
26598
|
|
|
26590
26599
|
// components/MobileToolbar.tsx
|
|
26591
26600
|
import { useState as useState19, useEffect as useEffect26 } from "react";
|
|
26592
|
-
import
|
|
26601
|
+
import clsx35 from "clsx";
|
|
26593
26602
|
import { KEYS as KEYS43, capitalizeString as capitalizeString3 } from "@excalidraw/common";
|
|
26594
26603
|
|
|
26595
26604
|
// components/dropdownMenu/DropdownMenu.tsx
|
|
@@ -26598,7 +26607,7 @@ import { DropdownMenu as DropdownMenuPrimitive8 } from "radix-ui";
|
|
|
26598
26607
|
import { CLASSES as CLASSES6 } from "@excalidraw/common";
|
|
26599
26608
|
|
|
26600
26609
|
// components/dropdownMenu/DropdownMenuContent.tsx
|
|
26601
|
-
import
|
|
26610
|
+
import clsx32 from "clsx";
|
|
26602
26611
|
import { useCallback as useCallback7, useEffect as useEffect25, useRef as useRef18 } from "react";
|
|
26603
26612
|
import { CLASSES as CLASSES5, EVENT as EVENT6, KEYS as KEYS42 } from "@excalidraw/common";
|
|
26604
26613
|
import { DropdownMenu as DropdownMenuPrimitive2 } from "radix-ui";
|
|
@@ -26647,7 +26656,7 @@ var MenuContent = ({
|
|
|
26647
26656
|
document.removeEventListener(EVENT6.KEYDOWN, onKeyDown, option);
|
|
26648
26657
|
};
|
|
26649
26658
|
}, [callbacksRef, open]);
|
|
26650
|
-
const classNames =
|
|
26659
|
+
const classNames = clsx32(`dropdown-menu ${className}`, {
|
|
26651
26660
|
"dropdown-menu--mobile": editorInterface.formFactor === "phone"
|
|
26652
26661
|
}).trim();
|
|
26653
26662
|
return /* @__PURE__ */ jsx69(DropdownMenuContentPropsContext.Provider, { value: { onSelect }, children: /* @__PURE__ */ jsx69(
|
|
@@ -26748,7 +26757,7 @@ MenuSeparator.displayName = "DropdownMenuSeparator";
|
|
|
26748
26757
|
import { DropdownMenu as DropdownMenuPrimitive6 } from "radix-ui";
|
|
26749
26758
|
|
|
26750
26759
|
// components/dropdownMenu/DropdownMenuSubContent.tsx
|
|
26751
|
-
import
|
|
26760
|
+
import clsx33 from "clsx";
|
|
26752
26761
|
import { DropdownMenu as DropdownMenuPrimitive4 } from "radix-ui";
|
|
26753
26762
|
import { useCallback as useCallback8, useState as useState18 } from "react";
|
|
26754
26763
|
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
@@ -26759,7 +26768,7 @@ var DropdownMenuSubContent = ({
|
|
|
26759
26768
|
className
|
|
26760
26769
|
}) => {
|
|
26761
26770
|
const editorInterface = useEditorInterface();
|
|
26762
|
-
const classNames =
|
|
26771
|
+
const classNames = clsx33(`dropdown-menu dropdown-submenu ${className}`, {
|
|
26763
26772
|
"dropdown-menu--mobile": editorInterface.formFactor === "phone"
|
|
26764
26773
|
}).trim();
|
|
26765
26774
|
const callbacksRef = useCallback8((node) => {
|
|
@@ -26865,7 +26874,7 @@ DropdownMenuSub.displayName = "DropdownMenuSub";
|
|
|
26865
26874
|
var DropdownMenuSub_default = DropdownMenuSub;
|
|
26866
26875
|
|
|
26867
26876
|
// components/dropdownMenu/DropdownMenuTrigger.tsx
|
|
26868
|
-
import
|
|
26877
|
+
import clsx34 from "clsx";
|
|
26869
26878
|
import { DropdownMenu as DropdownMenuPrimitive7 } from "radix-ui";
|
|
26870
26879
|
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
26871
26880
|
var MenuTrigger = ({
|
|
@@ -26876,7 +26885,7 @@ var MenuTrigger = ({
|
|
|
26876
26885
|
...rest
|
|
26877
26886
|
}) => {
|
|
26878
26887
|
const editorInterface = useEditorInterface();
|
|
26879
|
-
const classNames =
|
|
26888
|
+
const classNames = clsx34(
|
|
26880
26889
|
`dropdown-menu-button ${className}`,
|
|
26881
26890
|
"zen-mode-transition",
|
|
26882
26891
|
{
|
|
@@ -27111,7 +27120,7 @@ var MobileToolbar = ({
|
|
|
27111
27120
|
/* @__PURE__ */ jsx78(
|
|
27112
27121
|
DropdownMenu_default.Trigger,
|
|
27113
27122
|
{
|
|
27114
|
-
className:
|
|
27123
|
+
className: clsx35(
|
|
27115
27124
|
"App-toolbar__extra-tools-trigger App-toolbar__extra-tools-trigger--mobile",
|
|
27116
27125
|
{
|
|
27117
27126
|
"App-toolbar__extra-tools-trigger--selected": extraToolSelected || isOtherShapesMenuOpen
|
|
@@ -27275,7 +27284,7 @@ var MobileToolbar = ({
|
|
|
27275
27284
|
};
|
|
27276
27285
|
|
|
27277
27286
|
// components/FixedSideContainer.tsx
|
|
27278
|
-
import
|
|
27287
|
+
import clsx36 from "clsx";
|
|
27279
27288
|
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
27280
27289
|
var FixedSideContainer = ({
|
|
27281
27290
|
children,
|
|
@@ -27284,7 +27293,7 @@ var FixedSideContainer = ({
|
|
|
27284
27293
|
}) => /* @__PURE__ */ jsx79(
|
|
27285
27294
|
"div",
|
|
27286
27295
|
{
|
|
27287
|
-
className:
|
|
27296
|
+
className: clsx36(
|
|
27288
27297
|
"FixedSideContainer",
|
|
27289
27298
|
`FixedSideContainer_side_${side}`,
|
|
27290
27299
|
className
|
|
@@ -27294,7 +27303,7 @@ var FixedSideContainer = ({
|
|
|
27294
27303
|
);
|
|
27295
27304
|
|
|
27296
27305
|
// components/PenModeButton.tsx
|
|
27297
|
-
import
|
|
27306
|
+
import clsx37 from "clsx";
|
|
27298
27307
|
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
27299
27308
|
var PenModeButton = (props) => {
|
|
27300
27309
|
if (!props.penDetected) {
|
|
@@ -27303,7 +27312,7 @@ var PenModeButton = (props) => {
|
|
|
27303
27312
|
return /* @__PURE__ */ jsx80(
|
|
27304
27313
|
IconButton,
|
|
27305
27314
|
{
|
|
27306
|
-
className:
|
|
27315
|
+
className: clsx37("ToolIcon__penMode", { "is-mobile": props.isMobile }),
|
|
27307
27316
|
type: "toggle",
|
|
27308
27317
|
icon: PenModeIcon,
|
|
27309
27318
|
checked: props.checked,
|
|
@@ -27459,7 +27468,7 @@ import React27, { useLayoutEffect as useLayoutEffect5, useRef as useRef20, useSt
|
|
|
27459
27468
|
import { newTextElement as newTextElement4 } from "@excalidraw/element";
|
|
27460
27469
|
|
|
27461
27470
|
// components/Dialog.tsx
|
|
27462
|
-
import
|
|
27471
|
+
import clsx39 from "clsx";
|
|
27463
27472
|
import { useEffect as useEffect27, useState as useState21 } from "react";
|
|
27464
27473
|
import { KEYS as KEYS45, queryFocusableElements as queryFocusableElements2 } from "@excalidraw/common";
|
|
27465
27474
|
|
|
@@ -27472,7 +27481,7 @@ var useCallbackRefState = () => {
|
|
|
27472
27481
|
};
|
|
27473
27482
|
|
|
27474
27483
|
// components/Modal.tsx
|
|
27475
|
-
import
|
|
27484
|
+
import clsx38 from "clsx";
|
|
27476
27485
|
import { useRef as useRef19 } from "react";
|
|
27477
27486
|
import { createPortal as createPortal2 } from "react-dom";
|
|
27478
27487
|
import { KEYS as KEYS44 } from "@excalidraw/common";
|
|
@@ -27480,7 +27489,7 @@ import { jsx as jsx82, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
|
27480
27489
|
var Modal = (props) => {
|
|
27481
27490
|
const { closeOnClickOutside = true } = props;
|
|
27482
27491
|
const modalRoot = useCreatePortalContainer({
|
|
27483
|
-
className:
|
|
27492
|
+
className: clsx38(
|
|
27484
27493
|
"excalidraw-modal-container",
|
|
27485
27494
|
props.portalContainerClassName
|
|
27486
27495
|
)
|
|
@@ -27503,7 +27512,7 @@ var Modal = (props) => {
|
|
|
27503
27512
|
/* @__PURE__ */ jsxs41(
|
|
27504
27513
|
"div",
|
|
27505
27514
|
{
|
|
27506
|
-
className:
|
|
27515
|
+
className: clsx38("Modal", props.className, {
|
|
27507
27516
|
"animations-disabled": animationsDisabledRef.current
|
|
27508
27517
|
}),
|
|
27509
27518
|
role: "dialog",
|
|
@@ -27593,7 +27602,7 @@ var Dialog = (props) => {
|
|
|
27593
27602
|
return /* @__PURE__ */ jsx83(
|
|
27594
27603
|
Modal,
|
|
27595
27604
|
{
|
|
27596
|
-
className:
|
|
27605
|
+
className: clsx39("Dialog", props.className, {
|
|
27597
27606
|
"Dialog--fullscreen": isFullscreen
|
|
27598
27607
|
}),
|
|
27599
27608
|
labelledBy: "dialog-title",
|
|
@@ -27853,7 +27862,7 @@ var Section = ({ heading, children, ...props }) => {
|
|
|
27853
27862
|
|
|
27854
27863
|
// components/UserList.tsx
|
|
27855
27864
|
import { Popover as Popover9 } from "radix-ui";
|
|
27856
|
-
import
|
|
27865
|
+
import clsx40 from "clsx";
|
|
27857
27866
|
import React28, { useLayoutEffect as useLayoutEffect6 } from "react";
|
|
27858
27867
|
import { supportsResizeObserver, isShallowEqual as isShallowEqual5 } from "@excalidraw/common";
|
|
27859
27868
|
import { Fragment as Fragment13, jsx as jsx86, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
@@ -28033,7 +28042,7 @@ var UserList = React28.memo(
|
|
|
28033
28042
|
)
|
|
28034
28043
|
] }, collaborator.socketId);
|
|
28035
28044
|
});
|
|
28036
|
-
return mobile ? /* @__PURE__ */ jsxs45("div", { className:
|
|
28045
|
+
return mobile ? /* @__PURE__ */ jsxs45("div", { className: clsx40("UserList UserList_mobile", className), children: [
|
|
28037
28046
|
/* @__PURE__ */ jsx86("div", { className: "UserList_mobile__avatars", children: collaboratorsArray.map(
|
|
28038
28047
|
(collaborator) => renderCollaborator({
|
|
28039
28048
|
actionManager,
|
|
@@ -28050,7 +28059,7 @@ var UserList = React28.memo(
|
|
|
28050
28059
|
] }) : /* @__PURE__ */ jsx86("div", { className: "UserList__wrapper", ref: userListWrapper, children: /* @__PURE__ */ jsx86(
|
|
28051
28060
|
"div",
|
|
28052
28061
|
{
|
|
28053
|
-
className:
|
|
28062
|
+
className: clsx40("UserList", className),
|
|
28054
28063
|
style: {
|
|
28055
28064
|
[`--max-avatars`]: firstNCollaborators.length + (currentUser ? PILL_EXTRA_WIDTH / AVATAR_SLOT_WIDTH : 0)
|
|
28056
28065
|
},
|
|
@@ -28080,7 +28089,7 @@ var UserList = React28.memo(
|
|
|
28080
28089
|
);
|
|
28081
28090
|
|
|
28082
28091
|
// components/footer/Footer.tsx
|
|
28083
|
-
import
|
|
28092
|
+
import clsx41 from "clsx";
|
|
28084
28093
|
|
|
28085
28094
|
// components/HelpButton.tsx
|
|
28086
28095
|
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
@@ -28116,7 +28125,7 @@ var Footer = ({
|
|
|
28116
28125
|
(defaultUIEnabled || zoomUIEnabled && app.isNavigationEnabled()) && /* @__PURE__ */ jsx88(
|
|
28117
28126
|
"div",
|
|
28118
28127
|
{
|
|
28119
|
-
className:
|
|
28128
|
+
className: clsx41(
|
|
28120
28129
|
"layer-ui__wrapper__footer-left zen-mode-transition",
|
|
28121
28130
|
{
|
|
28122
28131
|
"layer-ui__wrapper__footer-left--transition-left": appState.zenModeEnabled
|
|
@@ -28127,16 +28136,16 @@ var Footer = ({
|
|
|
28127
28136
|
Tooltip,
|
|
28128
28137
|
{
|
|
28129
28138
|
label: appState.viewModeEnabled ? "Edit mode" : t("labels.viewMode"),
|
|
28130
|
-
children: /* @__PURE__ */ jsx88("div", { className:
|
|
28139
|
+
children: /* @__PURE__ */ jsx88("div", { className: clsx41("view-mode-button"), children: actionManager.renderAction("viewMode") })
|
|
28131
28140
|
}
|
|
28132
28141
|
),
|
|
28133
|
-
/* @__PURE__ */ jsx88(Tooltip, { label: t("buttons.smartZoom"), children: /* @__PURE__ */ jsx88("div", { className:
|
|
28142
|
+
/* @__PURE__ */ jsx88(Tooltip, { label: t("buttons.smartZoom"), children: /* @__PURE__ */ jsx88("div", { className: clsx41("smart-zoom-button"), children: actionManager.renderAction("smartZoom") }) }),
|
|
28134
28143
|
zoomUIEnabled && app.isNavigationEnabled() && /* @__PURE__ */ jsx88(ZoomActions, { renderAction: actionManager.renderAction }),
|
|
28135
28144
|
defaultUIEnabled && !appState.viewModeEnabled && /* @__PURE__ */ jsx88(
|
|
28136
28145
|
UndoRedoActions,
|
|
28137
28146
|
{
|
|
28138
28147
|
renderAction: actionManager.renderAction,
|
|
28139
|
-
className:
|
|
28148
|
+
className: clsx41("zen-mode-transition", {
|
|
28140
28149
|
"layer-ui__wrapper__footer-left--transition-bottom": appState.zenModeEnabled
|
|
28141
28150
|
})
|
|
28142
28151
|
}
|
|
@@ -28148,7 +28157,7 @@ var Footer = ({
|
|
|
28148
28157
|
(defaultUIEnabled || renderWelcomeScreen) && /* @__PURE__ */ jsx88(
|
|
28149
28158
|
"div",
|
|
28150
28159
|
{
|
|
28151
|
-
className:
|
|
28160
|
+
className: clsx41(
|
|
28152
28161
|
"layer-ui__wrapper__footer-right zen-mode-transition",
|
|
28153
28162
|
{
|
|
28154
28163
|
"transition-right": appState.zenModeEnabled
|
|
@@ -28245,7 +28254,7 @@ __export(DefaultItems_exports, {
|
|
|
28245
28254
|
Socials: () => Socials,
|
|
28246
28255
|
ToggleTheme: () => ToggleTheme
|
|
28247
28256
|
});
|
|
28248
|
-
import
|
|
28257
|
+
import clsx43 from "clsx";
|
|
28249
28258
|
import { THEME as THEME24 } from "@excalidraw/common";
|
|
28250
28259
|
|
|
28251
28260
|
// components/OverwriteConfirm/OverwriteConfirmState.ts
|
|
@@ -28273,7 +28282,7 @@ async function openConfirmModal({
|
|
|
28273
28282
|
}
|
|
28274
28283
|
|
|
28275
28284
|
// components/RadioGroup.tsx
|
|
28276
|
-
import
|
|
28285
|
+
import clsx42 from "clsx";
|
|
28277
28286
|
import { jsx as jsx90, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
28278
28287
|
var RadioGroup = function({
|
|
28279
28288
|
onChange,
|
|
@@ -28284,7 +28293,7 @@ var RadioGroup = function({
|
|
|
28284
28293
|
return /* @__PURE__ */ jsx90("div", { className: "RadioGroup", children: choices.map((choice) => /* @__PURE__ */ jsxs47(
|
|
28285
28294
|
"div",
|
|
28286
28295
|
{
|
|
28287
|
-
className:
|
|
28296
|
+
className: clsx42("RadioGroup__choice", {
|
|
28288
28297
|
active: choice.value === value
|
|
28289
28298
|
}),
|
|
28290
28299
|
title: choice.ariaLabel,
|
|
@@ -28593,7 +28602,7 @@ var LiveCollaborationTrigger = ({
|
|
|
28593
28602
|
{
|
|
28594
28603
|
"data-testid": "collab-button",
|
|
28595
28604
|
icon: usersIcon,
|
|
28596
|
-
className:
|
|
28605
|
+
className: clsx43({
|
|
28597
28606
|
"active-collab": isCollaborating
|
|
28598
28607
|
}),
|
|
28599
28608
|
onSelect,
|
|
@@ -28858,7 +28867,7 @@ var MainMenu = Object.assign(
|
|
|
28858
28867
|
var MainMenu_default = MainMenu;
|
|
28859
28868
|
|
|
28860
28869
|
// components/FilledButton.tsx
|
|
28861
|
-
import
|
|
28870
|
+
import clsx44 from "clsx";
|
|
28862
28871
|
import { forwardRef as forwardRef3, useState as useState23 } from "react";
|
|
28863
28872
|
import { isPromiseLike as isPromiseLike4 } from "@excalidraw/common";
|
|
28864
28873
|
import { jsx as jsx94, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
@@ -28902,7 +28911,7 @@ var FilledButton = forwardRef3(
|
|
|
28902
28911
|
return /* @__PURE__ */ jsx94(
|
|
28903
28912
|
"button",
|
|
28904
28913
|
{
|
|
28905
|
-
className:
|
|
28914
|
+
className: clsx44(
|
|
28906
28915
|
"ExcButton",
|
|
28907
28916
|
`ExcButton--color-${color}`,
|
|
28908
28917
|
`ExcButton--variant-${variant}`,
|
|
@@ -29047,7 +29056,7 @@ var OverwriteConfirmDialog = Object.assign(
|
|
|
29047
29056
|
|
|
29048
29057
|
// components/Stats/index.tsx
|
|
29049
29058
|
import { round as round4 } from "@excalidraw/math";
|
|
29050
|
-
import
|
|
29059
|
+
import clsx46 from "clsx";
|
|
29051
29060
|
import throttle2 from "lodash.throttle";
|
|
29052
29061
|
import { useEffect as useEffect29, useMemo as useMemo9, useState as useState25, memo as memo2 } from "react";
|
|
29053
29062
|
import { STATS_PANELS } from "@excalidraw/common";
|
|
@@ -29064,7 +29073,7 @@ import { isArrowElement as isArrowElement12, isElbowArrow as isElbowArrow9 } fro
|
|
|
29064
29073
|
import { updateBindings as updateBindings3 } from "@excalidraw/element";
|
|
29065
29074
|
|
|
29066
29075
|
// components/Stats/DragInput.tsx
|
|
29067
|
-
import
|
|
29076
|
+
import clsx45 from "clsx";
|
|
29068
29077
|
import { useEffect as useEffect28, useRef as useRef22, useState as useState24 } from "react";
|
|
29069
29078
|
import { EVENT as EVENT7, KEYS as KEYS46, cloneJSON as cloneJSON3 } from "@excalidraw/common";
|
|
29070
29079
|
import { deepCopyElement as deepCopyElement4 } from "@excalidraw/element";
|
|
@@ -29323,7 +29332,7 @@ var StatsDragInput = ({
|
|
|
29323
29332
|
return /* @__PURE__ */ jsxs54(
|
|
29324
29333
|
"div",
|
|
29325
29334
|
{
|
|
29326
|
-
className:
|
|
29335
|
+
className: clsx45("drag-input-container", !editable && "disabled"),
|
|
29327
29336
|
"data-testid": label,
|
|
29328
29337
|
children: [
|
|
29329
29338
|
/* @__PURE__ */ jsx97(
|
|
@@ -30993,7 +31002,7 @@ var StatsRow = ({
|
|
|
30993
31002
|
}) => /* @__PURE__ */ jsx107(
|
|
30994
31003
|
"div",
|
|
30995
31004
|
{
|
|
30996
|
-
className:
|
|
31005
|
+
className: clsx46("exc-stats__row", { "exc-stats__row--heading": heading }),
|
|
30997
31006
|
style: {
|
|
30998
31007
|
gridTemplateColumns: `repeat(${columns}, 1fr)`,
|
|
30999
31008
|
...style
|
|
@@ -31295,7 +31304,7 @@ import {
|
|
|
31295
31304
|
} from "@excalidraw/element";
|
|
31296
31305
|
|
|
31297
31306
|
// components/DialogActionButton.tsx
|
|
31298
|
-
import
|
|
31307
|
+
import clsx47 from "clsx";
|
|
31299
31308
|
import { jsx as jsx108, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
31300
31309
|
var DialogActionButton = ({
|
|
31301
31310
|
label,
|
|
@@ -31311,7 +31320,7 @@ var DialogActionButton = ({
|
|
|
31311
31320
|
return /* @__PURE__ */ jsxs56(
|
|
31312
31321
|
"button",
|
|
31313
31322
|
{
|
|
31314
|
-
className:
|
|
31323
|
+
className: clsx47("Dialog__action-button", cs, className),
|
|
31315
31324
|
type,
|
|
31316
31325
|
"aria-label": label,
|
|
31317
31326
|
onClick,
|
|
@@ -31327,7 +31336,7 @@ var DialogActionButton = ({
|
|
|
31327
31336
|
var DialogActionButton_default = DialogActionButton;
|
|
31328
31337
|
|
|
31329
31338
|
// components/TextField.tsx
|
|
31330
|
-
import
|
|
31339
|
+
import clsx49 from "clsx";
|
|
31331
31340
|
import {
|
|
31332
31341
|
forwardRef as forwardRef4,
|
|
31333
31342
|
useRef as useRef23,
|
|
@@ -31337,7 +31346,7 @@ import {
|
|
|
31337
31346
|
} from "react";
|
|
31338
31347
|
|
|
31339
31348
|
// components/Button.tsx
|
|
31340
|
-
import
|
|
31349
|
+
import clsx48 from "clsx";
|
|
31341
31350
|
import { composeEventHandlers as composeEventHandlers3 } from "@excalidraw/common";
|
|
31342
31351
|
import { jsx as jsx109 } from "react/jsx-runtime";
|
|
31343
31352
|
var Button = ({
|
|
@@ -31355,7 +31364,7 @@ var Button = ({
|
|
|
31355
31364
|
onSelect();
|
|
31356
31365
|
}),
|
|
31357
31366
|
type,
|
|
31358
|
-
className:
|
|
31367
|
+
className: clsx48("excalidraw-button", className, { selected }),
|
|
31359
31368
|
...rest,
|
|
31360
31369
|
children
|
|
31361
31370
|
}
|
|
@@ -31391,7 +31400,7 @@ var TextField = forwardRef4(
|
|
|
31391
31400
|
return /* @__PURE__ */ jsxs57(
|
|
31392
31401
|
"div",
|
|
31393
31402
|
{
|
|
31394
|
-
className:
|
|
31403
|
+
className: clsx49("ExcTextField", className, {
|
|
31395
31404
|
"ExcTextField--fullWidth": fullWidth,
|
|
31396
31405
|
"ExcTextField--hasIcon": !!icon
|
|
31397
31406
|
}),
|
|
@@ -31404,14 +31413,14 @@ var TextField = forwardRef4(
|
|
|
31404
31413
|
/* @__PURE__ */ jsxs57(
|
|
31405
31414
|
"div",
|
|
31406
31415
|
{
|
|
31407
|
-
className:
|
|
31416
|
+
className: clsx49("ExcTextField__input", {
|
|
31408
31417
|
"ExcTextField__input--readonly": readonly
|
|
31409
31418
|
}),
|
|
31410
31419
|
children: [
|
|
31411
31420
|
/* @__PURE__ */ jsx110(
|
|
31412
31421
|
"input",
|
|
31413
31422
|
{
|
|
31414
|
-
className:
|
|
31423
|
+
className: clsx49({
|
|
31415
31424
|
"is-redacted": "value" in rest && rest.value && isRedacted && !isTemporarilyUnredacted
|
|
31416
31425
|
}),
|
|
31417
31426
|
readOnly: readonly,
|
|
@@ -31600,7 +31609,7 @@ var ErrorDialog = ({
|
|
|
31600
31609
|
};
|
|
31601
31610
|
|
|
31602
31611
|
// components/GifPlaybackControls.tsx
|
|
31603
|
-
import
|
|
31612
|
+
import clsx50 from "clsx";
|
|
31604
31613
|
import React32 from "react";
|
|
31605
31614
|
import { MIME_TYPES as MIME_TYPES10, sceneCoordsToViewportCoords as sceneCoordsToViewportCoords4 } from "@excalidraw/common";
|
|
31606
31615
|
import {
|
|
@@ -31948,7 +31957,7 @@ var GifPlaybackControls = ({
|
|
|
31948
31957
|
"button",
|
|
31949
31958
|
{
|
|
31950
31959
|
type: "button",
|
|
31951
|
-
className:
|
|
31960
|
+
className: clsx50("gif-speed-picker__speed", {
|
|
31952
31961
|
"gif-speed-picker__speed--selected": speed === playback.speed
|
|
31953
31962
|
}),
|
|
31954
31963
|
onClick: () => setSpeed(speed),
|
|
@@ -32045,7 +32054,7 @@ var GifPlaybackControls = ({
|
|
|
32045
32054
|
liveAppState.openPopup === "gifFrameGallery" && /* @__PURE__ */ jsx113(
|
|
32046
32055
|
"div",
|
|
32047
32056
|
{
|
|
32048
|
-
className:
|
|
32057
|
+
className: clsx50("gif-frame-gallery", {
|
|
32049
32058
|
"gif-frame-gallery--dragging": isGifGalleryDragging
|
|
32050
32059
|
}),
|
|
32051
32060
|
style: {
|
|
@@ -32095,7 +32104,7 @@ var GifPlaybackControls = ({
|
|
|
32095
32104
|
"button",
|
|
32096
32105
|
{
|
|
32097
32106
|
type: "button",
|
|
32098
|
-
className:
|
|
32107
|
+
className: clsx50("gif-frame-gallery__frame", {
|
|
32099
32108
|
"gif-frame-gallery__frame--selected": index === frameIndex
|
|
32100
32109
|
}),
|
|
32101
32110
|
style: {
|
|
@@ -32136,7 +32145,7 @@ var GifPlaybackControls = ({
|
|
|
32136
32145
|
|
|
32137
32146
|
// components/HelpDialog.tsx
|
|
32138
32147
|
import React33, { useMemo as useMemo10 } from "react";
|
|
32139
|
-
import
|
|
32148
|
+
import clsx51 from "clsx";
|
|
32140
32149
|
import { isDarwin as isDarwin4, isFirefox as isFirefox4, isWindows } from "@excalidraw/common";
|
|
32141
32150
|
import { KEYS as KEYS49 } from "@excalidraw/common";
|
|
32142
32151
|
import { SHAPES as SHAPES3 } from "@excalidraw/element/shapes";
|
|
@@ -32388,14 +32397,14 @@ var HelpDialog = ({ onClose }) => {
|
|
|
32388
32397
|
() => isShowAll ? /* @__PURE__ */ jsx115(
|
|
32389
32398
|
"button",
|
|
32390
32399
|
{
|
|
32391
|
-
className:
|
|
32400
|
+
className: clsx51("toggle-button", {}),
|
|
32392
32401
|
onClick: () => setIsShowAll(false),
|
|
32393
32402
|
children: t("helpDialog.myoc.showingAll")
|
|
32394
32403
|
}
|
|
32395
32404
|
) : /* @__PURE__ */ jsx115(
|
|
32396
32405
|
"button",
|
|
32397
32406
|
{
|
|
32398
|
-
className:
|
|
32407
|
+
className: clsx51("toggle-button", {}),
|
|
32399
32408
|
onClick: () => setIsShowAll(true),
|
|
32400
32409
|
children: t("helpDialog.myoc.showingBasic")
|
|
32401
32410
|
}
|
|
@@ -32909,6 +32918,204 @@ var HelpDialog = ({ onClose }) => {
|
|
|
32909
32918
|
) });
|
|
32910
32919
|
};
|
|
32911
32920
|
|
|
32921
|
+
// components/HintViewer.tsx
|
|
32922
|
+
import { CANVAS_SEARCH_TAB as CANVAS_SEARCH_TAB2, DEFAULT_SIDEBAR as DEFAULT_SIDEBAR2 } from "@excalidraw/common";
|
|
32923
|
+
import {
|
|
32924
|
+
isArrowElement as isArrowElement14,
|
|
32925
|
+
isFlowchartNodeElement as isFlowchartNodeElement3,
|
|
32926
|
+
isImageElement as isImageElement9,
|
|
32927
|
+
isLinearElement as isLinearElement10,
|
|
32928
|
+
isLineElement as isLineElement8,
|
|
32929
|
+
isTextBindableContainer as isTextBindableContainer2,
|
|
32930
|
+
isTextElement as isTextElement16
|
|
32931
|
+
} from "@excalidraw/element";
|
|
32932
|
+
import { isNodeInFlowchart } from "@excalidraw/element";
|
|
32933
|
+
import { jsx as jsx116 } from "react/jsx-runtime";
|
|
32934
|
+
var getTaggedShortcutKey = (key) => Array.isArray(key) ? `<kbd>${key.map(getShortcutKey).join(" + ")}</kbd>` : `<kbd>${getShortcutKey(key)}</kbd>`;
|
|
32935
|
+
var getHints = ({
|
|
32936
|
+
appState,
|
|
32937
|
+
isMobile,
|
|
32938
|
+
editorInterface,
|
|
32939
|
+
app
|
|
32940
|
+
}) => {
|
|
32941
|
+
const { activeTool, isResizing, isRotating, lastPointerDownWith } = appState;
|
|
32942
|
+
const multiMode = appState.multiElement !== null;
|
|
32943
|
+
if (appState.openSidebar?.name === DEFAULT_SIDEBAR2.name && appState.openSidebar.tab === CANVAS_SEARCH_TAB2 && appState.searchMatches?.matches.length) {
|
|
32944
|
+
return t("hints.dismissSearch", {
|
|
32945
|
+
shortcut: getTaggedShortcutKey("Escape")
|
|
32946
|
+
});
|
|
32947
|
+
}
|
|
32948
|
+
if (appState.openSidebar && !editorInterface.canFitSidebar) {
|
|
32949
|
+
return null;
|
|
32950
|
+
}
|
|
32951
|
+
if (isEraserActive(appState)) {
|
|
32952
|
+
return t("hints.eraserRevert", {
|
|
32953
|
+
shortcut: getTaggedShortcutKey("Alt")
|
|
32954
|
+
});
|
|
32955
|
+
}
|
|
32956
|
+
const selectedElements = app.scene.getSelectedElements(appState);
|
|
32957
|
+
if (appState.selectedLinearElement?.isDragging && selectedElements[0]?.type === "arrow") {
|
|
32958
|
+
return t("hints.arrowBindModifiers", {
|
|
32959
|
+
shortcut_1: getTaggedShortcutKey("Ctrl"),
|
|
32960
|
+
shortcut_2: getTaggedShortcutKey("Alt")
|
|
32961
|
+
});
|
|
32962
|
+
}
|
|
32963
|
+
if (activeTool.type === "arrow" || activeTool.type === "line") {
|
|
32964
|
+
if (multiMode) {
|
|
32965
|
+
return t("hints.linearElementMulti", {
|
|
32966
|
+
shortcut_1: getTaggedShortcutKey("Escape"),
|
|
32967
|
+
shortcut_2: getTaggedShortcutKey("Enter")
|
|
32968
|
+
});
|
|
32969
|
+
}
|
|
32970
|
+
if (activeTool.type === "arrow") {
|
|
32971
|
+
return t("hints.arrowTool", {
|
|
32972
|
+
shortcut: getTaggedShortcutKey("A")
|
|
32973
|
+
});
|
|
32974
|
+
}
|
|
32975
|
+
return t("hints.linearElement");
|
|
32976
|
+
}
|
|
32977
|
+
if (activeTool.type === "freedraw") {
|
|
32978
|
+
return t("hints.freeDraw");
|
|
32979
|
+
}
|
|
32980
|
+
if (activeTool.type === "text") {
|
|
32981
|
+
return t("hints.text");
|
|
32982
|
+
}
|
|
32983
|
+
if (activeTool.type === "embeddable") {
|
|
32984
|
+
return t("hints.embeddable");
|
|
32985
|
+
}
|
|
32986
|
+
if (activeTool.type === "autoshape") {
|
|
32987
|
+
return t("hints.autoshape");
|
|
32988
|
+
}
|
|
32989
|
+
if (isResizing && lastPointerDownWith === "mouse" && selectedElements.length === 1) {
|
|
32990
|
+
const targetElement = selectedElements[0];
|
|
32991
|
+
if (isLinearElement10(targetElement) && targetElement.points.length === 2) {
|
|
32992
|
+
return t("hints.lockAngle", {
|
|
32993
|
+
shortcut: getTaggedShortcutKey("Shift")
|
|
32994
|
+
});
|
|
32995
|
+
}
|
|
32996
|
+
return isImageElement9(targetElement) ? t("hints.resizeImage", {
|
|
32997
|
+
shortcut_1: getTaggedShortcutKey("Shift"),
|
|
32998
|
+
shortcut_2: getTaggedShortcutKey("Alt")
|
|
32999
|
+
}) : t("hints.resize", {
|
|
33000
|
+
shortcut_1: getTaggedShortcutKey("Shift"),
|
|
33001
|
+
shortcut_2: getTaggedShortcutKey("Alt")
|
|
33002
|
+
});
|
|
33003
|
+
}
|
|
33004
|
+
if (isRotating && lastPointerDownWith === "mouse") {
|
|
33005
|
+
return t("hints.rotate", {
|
|
33006
|
+
shortcut: getTaggedShortcutKey("Shift")
|
|
33007
|
+
});
|
|
33008
|
+
}
|
|
33009
|
+
if (selectedElements.length === 1 && isTextElement16(selectedElements[0])) {
|
|
33010
|
+
return t("hints.text_selected", {
|
|
33011
|
+
shortcut: getTaggedShortcutKey("Enter")
|
|
33012
|
+
});
|
|
33013
|
+
}
|
|
33014
|
+
if (appState.editingTextElement) {
|
|
33015
|
+
return t("hints.text_editing", {
|
|
33016
|
+
shortcut_1: getTaggedShortcutKey("Escape"),
|
|
33017
|
+
shortcut_2: getTaggedShortcutKey(["CtrlOrCmd", "Enter"])
|
|
33018
|
+
});
|
|
33019
|
+
}
|
|
33020
|
+
if (appState.croppingElementId) {
|
|
33021
|
+
return t("hints.leaveCropEditor", {
|
|
33022
|
+
shortcut_1: getTaggedShortcutKey("Enter"),
|
|
33023
|
+
shortcut_2: getTaggedShortcutKey("Escape")
|
|
33024
|
+
});
|
|
33025
|
+
}
|
|
33026
|
+
if (selectedElements.length === 1 && isImageElement9(selectedElements[0])) {
|
|
33027
|
+
return t("hints.enterCropEditor", {
|
|
33028
|
+
shortcut_1: getTaggedShortcutKey("double click"),
|
|
33029
|
+
shortcut_2: getTaggedShortcutKey("Enter")
|
|
33030
|
+
});
|
|
33031
|
+
}
|
|
33032
|
+
if (activeTool.type === "selection") {
|
|
33033
|
+
if (appState.selectionElement && !selectedElements.length && !appState.editingTextElement && !appState.selectedLinearElement?.isEditing) {
|
|
33034
|
+
return t("hints.deepBoxSelect", {
|
|
33035
|
+
shortcut: getTaggedShortcutKey("CtrlOrCmd")
|
|
33036
|
+
});
|
|
33037
|
+
}
|
|
33038
|
+
if (isGridModeEnabled(app) && appState.selectedElementsAreBeingDragged) {
|
|
33039
|
+
return t("hints.disableSnapping", {
|
|
33040
|
+
shortcut: getTaggedShortcutKey("CtrlOrCmd")
|
|
33041
|
+
});
|
|
33042
|
+
}
|
|
33043
|
+
if (!selectedElements.length && !isMobile) {
|
|
33044
|
+
return t("hints.canvasPanning", {
|
|
33045
|
+
shortcut_1: getTaggedShortcutKey(t("keys.mmb")),
|
|
33046
|
+
shortcut_2: getTaggedShortcutKey("Space")
|
|
33047
|
+
});
|
|
33048
|
+
}
|
|
33049
|
+
if (selectedElements.length === 1) {
|
|
33050
|
+
if (isLinearElement10(selectedElements[0])) {
|
|
33051
|
+
if (isArrowElement14(selectedElements[0]) && appState.selectedLinearElement?.elementId === selectedElements[0].id && (appState.selectedLinearElement.hoverPointIndex === 0 || appState.selectedLinearElement.hoverPointIndex === selectedElements[0].points.length - 1)) {
|
|
33052
|
+
return t("hints.toggleArrowhead");
|
|
33053
|
+
}
|
|
33054
|
+
if (appState.selectedLinearElement?.isEditing) {
|
|
33055
|
+
return appState.selectedLinearElement.selectedPointsIndices ? t("hints.lineEditor_pointSelected", {
|
|
33056
|
+
shortcut_1: getTaggedShortcutKey("Delete"),
|
|
33057
|
+
shortcut_2: getTaggedShortcutKey(["CtrlOrCmd", "D"])
|
|
33058
|
+
}) : t("hints.lineEditor_nothingSelected", {
|
|
33059
|
+
shortcut_1: getTaggedShortcutKey("Shift"),
|
|
33060
|
+
shortcut_2: getTaggedShortcutKey("Alt")
|
|
33061
|
+
});
|
|
33062
|
+
}
|
|
33063
|
+
return isLineElement8(selectedElements[0]) ? t("hints.lineEditor_line_info", {
|
|
33064
|
+
shortcut: getTaggedShortcutKey("Enter")
|
|
33065
|
+
}) : t("hints.lineEditor_info", {
|
|
33066
|
+
shortcut_1: getTaggedShortcutKey("CtrlOrCmd"),
|
|
33067
|
+
shortcut_2: getTaggedShortcutKey(["CtrlOrCmd", "Enter"])
|
|
33068
|
+
});
|
|
33069
|
+
}
|
|
33070
|
+
if (!appState.newElement && !appState.selectedElementsAreBeingDragged && isTextBindableContainer2(selectedElements[0])) {
|
|
33071
|
+
const bindTextToElement = t("hints.bindTextToElement", {
|
|
33072
|
+
shortcut: getTaggedShortcutKey("Enter")
|
|
33073
|
+
});
|
|
33074
|
+
const createFlowchart = t("hints.createFlowchart", {
|
|
33075
|
+
shortcut: getTaggedShortcutKey(["CtrlOrCmd", "\u2191\u2193"])
|
|
33076
|
+
});
|
|
33077
|
+
if (isFlowchartNodeElement3(selectedElements[0])) {
|
|
33078
|
+
if (isNodeInFlowchart(
|
|
33079
|
+
selectedElements[0],
|
|
33080
|
+
app.scene.getNonDeletedElementsMap()
|
|
33081
|
+
)) {
|
|
33082
|
+
return [bindTextToElement, createFlowchart];
|
|
33083
|
+
}
|
|
33084
|
+
return [bindTextToElement, createFlowchart];
|
|
33085
|
+
}
|
|
33086
|
+
return bindTextToElement;
|
|
33087
|
+
}
|
|
33088
|
+
}
|
|
33089
|
+
}
|
|
33090
|
+
return null;
|
|
33091
|
+
};
|
|
33092
|
+
var HintViewer = ({
|
|
33093
|
+
appState,
|
|
33094
|
+
isMobile,
|
|
33095
|
+
editorInterface,
|
|
33096
|
+
app
|
|
33097
|
+
}) => {
|
|
33098
|
+
const smartZoomKeyHeld = useAtomValue(smartZoomKeyHeldAtom);
|
|
33099
|
+
const hints = smartZoomKeyHeld ? SMART_ZOOM_KEY_HINT : appState.viewModeEnabled ? null : getHints({
|
|
33100
|
+
appState,
|
|
33101
|
+
isMobile,
|
|
33102
|
+
editorInterface,
|
|
33103
|
+
app
|
|
33104
|
+
});
|
|
33105
|
+
if (!hints) {
|
|
33106
|
+
return null;
|
|
33107
|
+
}
|
|
33108
|
+
const hint = Array.isArray(hints) ? hints.map((hint2) => hint2.replace(/\. ?$/, "")).join(", ") : hints;
|
|
33109
|
+
const hintJSX = hint.split(/(<kbd>[^<]+<\/kbd>)/g).map((part, index) => {
|
|
33110
|
+
if (index % 2 === 1) {
|
|
33111
|
+
const shortcutMatch = part[0] === "<" && part.match(/^<kbd>([^<]+)<\/kbd>$/);
|
|
33112
|
+
return /* @__PURE__ */ jsx116("kbd", { children: shortcutMatch ? shortcutMatch[1] : part }, index);
|
|
33113
|
+
}
|
|
33114
|
+
return part;
|
|
33115
|
+
});
|
|
33116
|
+
return /* @__PURE__ */ jsx116("div", { className: "HintViewer", children: /* @__PURE__ */ jsx116("span", { children: hintJSX }) });
|
|
33117
|
+
};
|
|
33118
|
+
|
|
32912
33119
|
// components/ImageExportDialog.tsx
|
|
32913
33120
|
import { useEffect as useEffect31, useRef as useRef25, useState as useState30 } from "react";
|
|
32914
33121
|
import {
|
|
@@ -32943,11 +33150,11 @@ var useCopyStatus = () => {
|
|
|
32943
33150
|
};
|
|
32944
33151
|
|
|
32945
33152
|
// components/ImageExportDialog.tsx
|
|
32946
|
-
import { jsx as
|
|
33153
|
+
import { jsx as jsx117, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
32947
33154
|
var ErrorCanvasPreview = () => {
|
|
32948
33155
|
return /* @__PURE__ */ jsxs62("div", { children: [
|
|
32949
|
-
/* @__PURE__ */
|
|
32950
|
-
/* @__PURE__ */
|
|
33156
|
+
/* @__PURE__ */ jsx117("h3", { children: t("canvasError.cannotShowPreview") }),
|
|
33157
|
+
/* @__PURE__ */ jsx117("p", { children: /* @__PURE__ */ jsx117("span", { children: t("canvasError.canvasTooBig") }) }),
|
|
32951
33158
|
/* @__PURE__ */ jsxs62("em", { children: [
|
|
32952
33159
|
"(",
|
|
32953
33160
|
t("canvasError.canvasTooBigTip"),
|
|
@@ -33063,10 +33270,10 @@ var ImageExportModal = ({
|
|
|
33063
33270
|
embedScene
|
|
33064
33271
|
]);
|
|
33065
33272
|
return /* @__PURE__ */ jsxs62("div", { className: "ImageExportModal", children: [
|
|
33066
|
-
/* @__PURE__ */
|
|
33273
|
+
/* @__PURE__ */ jsx117("h3", { children: t("imageExportDialog.header") }),
|
|
33067
33274
|
/* @__PURE__ */ jsxs62("div", { className: "ImageExportModal__preview", children: [
|
|
33068
|
-
/* @__PURE__ */
|
|
33069
|
-
/* @__PURE__ */
|
|
33275
|
+
/* @__PURE__ */ jsx117("div", { className: "ImageExportModal__preview__canvas", ref: previewRef, children: renderError && /* @__PURE__ */ jsx117(ErrorCanvasPreview, {}) }),
|
|
33276
|
+
/* @__PURE__ */ jsx117("div", { className: "ImageExportModal__preview__filename", children: !nativeFileSystemSupported && /* @__PURE__ */ jsx117(
|
|
33070
33277
|
"input",
|
|
33071
33278
|
{
|
|
33072
33279
|
type: "text",
|
|
@@ -33085,13 +33292,13 @@ var ImageExportModal = ({
|
|
|
33085
33292
|
) })
|
|
33086
33293
|
] }),
|
|
33087
33294
|
/* @__PURE__ */ jsxs62("div", { className: "ImageExportModal__settings", children: [
|
|
33088
|
-
/* @__PURE__ */
|
|
33089
|
-
hasSelection && /* @__PURE__ */
|
|
33295
|
+
/* @__PURE__ */ jsx117("h3", { children: t("imageExportDialog.header") }),
|
|
33296
|
+
hasSelection && /* @__PURE__ */ jsx117(
|
|
33090
33297
|
ExportSetting,
|
|
33091
33298
|
{
|
|
33092
33299
|
label: t("imageExportDialog.label.onlySelected"),
|
|
33093
33300
|
name: "exportOnlySelected",
|
|
33094
|
-
children: /* @__PURE__ */
|
|
33301
|
+
children: /* @__PURE__ */ jsx117(
|
|
33095
33302
|
Switch,
|
|
33096
33303
|
{
|
|
33097
33304
|
name: "exportOnlySelected",
|
|
@@ -33103,12 +33310,12 @@ var ImageExportModal = ({
|
|
|
33103
33310
|
)
|
|
33104
33311
|
}
|
|
33105
33312
|
),
|
|
33106
|
-
/* @__PURE__ */
|
|
33313
|
+
/* @__PURE__ */ jsx117(
|
|
33107
33314
|
ExportSetting,
|
|
33108
33315
|
{
|
|
33109
33316
|
label: t("imageExportDialog.label.withBackground"),
|
|
33110
33317
|
name: "exportBackgroundSwitch",
|
|
33111
|
-
children: /* @__PURE__ */
|
|
33318
|
+
children: /* @__PURE__ */ jsx117(
|
|
33112
33319
|
Switch,
|
|
33113
33320
|
{
|
|
33114
33321
|
name: "exportBackgroundSwitch",
|
|
@@ -33125,12 +33332,12 @@ var ImageExportModal = ({
|
|
|
33125
33332
|
)
|
|
33126
33333
|
}
|
|
33127
33334
|
),
|
|
33128
|
-
/* @__PURE__ */
|
|
33335
|
+
/* @__PURE__ */ jsx117(
|
|
33129
33336
|
ExportSetting,
|
|
33130
33337
|
{
|
|
33131
33338
|
label: t("imageExportDialog.label.darkMode"),
|
|
33132
33339
|
name: "exportDarkModeSwitch",
|
|
33133
|
-
children: /* @__PURE__ */
|
|
33340
|
+
children: /* @__PURE__ */ jsx117(
|
|
33134
33341
|
Switch,
|
|
33135
33342
|
{
|
|
33136
33343
|
name: "exportDarkModeSwitch",
|
|
@@ -33146,13 +33353,13 @@ var ImageExportModal = ({
|
|
|
33146
33353
|
)
|
|
33147
33354
|
}
|
|
33148
33355
|
),
|
|
33149
|
-
/* @__PURE__ */
|
|
33356
|
+
/* @__PURE__ */ jsx117(
|
|
33150
33357
|
ExportSetting,
|
|
33151
33358
|
{
|
|
33152
33359
|
label: t("imageExportDialog.label.embedScene"),
|
|
33153
33360
|
tooltip: t("imageExportDialog.tooltip.embedScene"),
|
|
33154
33361
|
name: "exportEmbedSwitch",
|
|
33155
|
-
children: /* @__PURE__ */
|
|
33362
|
+
children: /* @__PURE__ */ jsx117(
|
|
33156
33363
|
Switch,
|
|
33157
33364
|
{
|
|
33158
33365
|
name: "exportEmbedSwitch",
|
|
@@ -33169,12 +33376,12 @@ var ImageExportModal = ({
|
|
|
33169
33376
|
)
|
|
33170
33377
|
}
|
|
33171
33378
|
),
|
|
33172
|
-
/* @__PURE__ */
|
|
33379
|
+
/* @__PURE__ */ jsx117(
|
|
33173
33380
|
ExportSetting,
|
|
33174
33381
|
{
|
|
33175
33382
|
label: t("imageExportDialog.label.scale"),
|
|
33176
33383
|
name: "exportScale",
|
|
33177
|
-
children: /* @__PURE__ */
|
|
33384
|
+
children: /* @__PURE__ */ jsx117(
|
|
33178
33385
|
RadioGroup,
|
|
33179
33386
|
{
|
|
33180
33387
|
name: "exportScale",
|
|
@@ -33192,7 +33399,7 @@ var ImageExportModal = ({
|
|
|
33192
33399
|
}
|
|
33193
33400
|
),
|
|
33194
33401
|
/* @__PURE__ */ jsxs62("div", { className: "ImageExportModal__settings__buttons", children: [
|
|
33195
|
-
/* @__PURE__ */
|
|
33402
|
+
/* @__PURE__ */ jsx117(
|
|
33196
33403
|
FilledButton,
|
|
33197
33404
|
{
|
|
33198
33405
|
className: "ImageExportModal__settings__buttons__button",
|
|
@@ -33204,7 +33411,7 @@ var ImageExportModal = ({
|
|
|
33204
33411
|
children: t("imageExportDialog.button.exportToPng")
|
|
33205
33412
|
}
|
|
33206
33413
|
),
|
|
33207
|
-
/* @__PURE__ */
|
|
33414
|
+
/* @__PURE__ */ jsx117(
|
|
33208
33415
|
FilledButton,
|
|
33209
33416
|
{
|
|
33210
33417
|
className: "ImageExportModal__settings__buttons__button",
|
|
@@ -33216,7 +33423,7 @@ var ImageExportModal = ({
|
|
|
33216
33423
|
children: t("imageExportDialog.button.exportToSvg")
|
|
33217
33424
|
}
|
|
33218
33425
|
),
|
|
33219
|
-
(probablySupportsClipboardBlob || isFirefox5) && /* @__PURE__ */
|
|
33426
|
+
(probablySupportsClipboardBlob || isFirefox5) && /* @__PURE__ */ jsx117(
|
|
33220
33427
|
FilledButton,
|
|
33221
33428
|
{
|
|
33222
33429
|
className: "ImageExportModal__settings__buttons__button",
|
|
@@ -33254,11 +33461,11 @@ var ExportSetting = ({
|
|
|
33254
33461
|
className: "ImageExportModal__settings__setting__label",
|
|
33255
33462
|
children: [
|
|
33256
33463
|
label,
|
|
33257
|
-
tooltip && /* @__PURE__ */
|
|
33464
|
+
tooltip && /* @__PURE__ */ jsx117(Tooltip, { label: tooltip, long: true, children: helpIcon })
|
|
33258
33465
|
]
|
|
33259
33466
|
}
|
|
33260
33467
|
),
|
|
33261
|
-
/* @__PURE__ */
|
|
33468
|
+
/* @__PURE__ */ jsx117("div", { className: "ImageExportModal__settings__setting__content", children })
|
|
33262
33469
|
] });
|
|
33263
33470
|
};
|
|
33264
33471
|
var ImageExportDialog = ({
|
|
@@ -33276,7 +33483,7 @@ var ImageExportDialog = ({
|
|
|
33276
33483
|
elementsSnapshot: cloneJSON4(elements)
|
|
33277
33484
|
};
|
|
33278
33485
|
});
|
|
33279
|
-
return /* @__PURE__ */
|
|
33486
|
+
return /* @__PURE__ */ jsx117(Dialog, { onCloseRequest, size: "wide", title: false, children: /* @__PURE__ */ jsx117(
|
|
33280
33487
|
ImageExportModal,
|
|
33281
33488
|
{
|
|
33282
33489
|
elementsSnapshot,
|
|
@@ -33291,11 +33498,11 @@ var ImageExportDialog = ({
|
|
|
33291
33498
|
};
|
|
33292
33499
|
|
|
33293
33500
|
// components/DefaultSidebar.tsx
|
|
33294
|
-
import
|
|
33295
|
-
import { CANVAS_SEARCH_TAB as
|
|
33501
|
+
import clsx56 from "clsx";
|
|
33502
|
+
import { CANVAS_SEARCH_TAB as CANVAS_SEARCH_TAB3, DEFAULT_SIDEBAR as DEFAULT_SIDEBAR3 } from "@excalidraw/common";
|
|
33296
33503
|
|
|
33297
33504
|
// components/SearchMenu.tsx
|
|
33298
|
-
import
|
|
33505
|
+
import clsx52 from "clsx";
|
|
33299
33506
|
import debounce3 from "lodash.debounce";
|
|
33300
33507
|
import { Fragment as Fragment21, memo as memo3, useEffect as useEffect32, useMemo as useMemo11, useRef as useRef26, useState as useState31 } from "react";
|
|
33301
33508
|
import {
|
|
@@ -33317,9 +33524,9 @@ import {
|
|
|
33317
33524
|
getFontString as getFontString15
|
|
33318
33525
|
} from "@excalidraw/common";
|
|
33319
33526
|
import { newTextElement as newTextElement5 } from "@excalidraw/element";
|
|
33320
|
-
import { isTextElement as
|
|
33527
|
+
import { isTextElement as isTextElement17, isFrameLikeElement as isFrameLikeElement16 } from "@excalidraw/element";
|
|
33321
33528
|
import { getDefaultFrameName } from "@excalidraw/element/frame";
|
|
33322
|
-
import { Fragment as Fragment22, jsx as
|
|
33529
|
+
import { Fragment as Fragment22, jsx as jsx118, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
33323
33530
|
var searchQueryAtom = atom("");
|
|
33324
33531
|
var searchItemInFocusAtom = atom(null);
|
|
33325
33532
|
var SEARCH_DEBOUNCE = 350;
|
|
@@ -33519,7 +33726,7 @@ var SearchMenu2 = () => {
|
|
|
33519
33726
|
const matchCount = `${searchMatches.items.length} ${searchMatches.items.length === 1 ? t("search.singleResult") : t("search.multipleResults")}`;
|
|
33520
33727
|
return /* @__PURE__ */ jsxs63("div", { className: "layer-ui__search", children: [
|
|
33521
33728
|
/* @__PURE__ */ jsxs63("div", { className: "layer-ui__search-header", children: [
|
|
33522
|
-
/* @__PURE__ */
|
|
33729
|
+
/* @__PURE__ */ jsx118(
|
|
33523
33730
|
TextField,
|
|
33524
33731
|
{
|
|
33525
33732
|
className: CLASSES7.SEARCH_MENU_INPUT_WRAPPER,
|
|
@@ -33555,7 +33762,7 @@ var SearchMenu2 = () => {
|
|
|
33555
33762
|
selectOnRender: true
|
|
33556
33763
|
}
|
|
33557
33764
|
),
|
|
33558
|
-
/* @__PURE__ */
|
|
33765
|
+
/* @__PURE__ */ jsx118(
|
|
33559
33766
|
Button,
|
|
33560
33767
|
{
|
|
33561
33768
|
"data-testid": "sidebar-close",
|
|
@@ -33576,9 +33783,9 @@ var SearchMenu2 = () => {
|
|
|
33576
33783
|
focusIndex + 1,
|
|
33577
33784
|
" / ",
|
|
33578
33785
|
matchCount
|
|
33579
|
-
] }) : /* @__PURE__ */
|
|
33786
|
+
] }) : /* @__PURE__ */ jsx118("div", { children: matchCount }),
|
|
33580
33787
|
/* @__PURE__ */ jsxs63("div", { className: "result-nav", children: [
|
|
33581
|
-
/* @__PURE__ */
|
|
33788
|
+
/* @__PURE__ */ jsx118(
|
|
33582
33789
|
Button,
|
|
33583
33790
|
{
|
|
33584
33791
|
onSelect: () => {
|
|
@@ -33588,7 +33795,7 @@ var SearchMenu2 = () => {
|
|
|
33588
33795
|
children: collapseDownIcon
|
|
33589
33796
|
}
|
|
33590
33797
|
),
|
|
33591
|
-
/* @__PURE__ */
|
|
33798
|
+
/* @__PURE__ */ jsx118(
|
|
33592
33799
|
Button,
|
|
33593
33800
|
{
|
|
33594
33801
|
onSelect: () => {
|
|
@@ -33600,9 +33807,9 @@ var SearchMenu2 = () => {
|
|
|
33600
33807
|
)
|
|
33601
33808
|
] })
|
|
33602
33809
|
] }),
|
|
33603
|
-
searchMatches.items.length === 0 && searchQuery && searchedQueryRef.current && /* @__PURE__ */
|
|
33810
|
+
searchMatches.items.length === 0 && searchQuery && searchedQueryRef.current && /* @__PURE__ */ jsx118("div", { style: { margin: "1rem auto" }, children: t("search.noMatch") })
|
|
33604
33811
|
] }),
|
|
33605
|
-
/* @__PURE__ */
|
|
33812
|
+
/* @__PURE__ */ jsx118(
|
|
33606
33813
|
MatchList,
|
|
33607
33814
|
{
|
|
33608
33815
|
matches: searchMatches,
|
|
@@ -33626,11 +33833,11 @@ var ListItem = (props) => {
|
|
|
33626
33833
|
),
|
|
33627
33834
|
props.preview.moreAfter ? "..." : ""
|
|
33628
33835
|
];
|
|
33629
|
-
return /* @__PURE__ */
|
|
33836
|
+
return /* @__PURE__ */ jsx118(
|
|
33630
33837
|
"div",
|
|
33631
33838
|
{
|
|
33632
33839
|
tabIndex: -1,
|
|
33633
|
-
className:
|
|
33840
|
+
className: clsx52("layer-ui__result-item", {
|
|
33634
33841
|
active: props.highlighted
|
|
33635
33842
|
}),
|
|
33636
33843
|
onClick: props.onClick,
|
|
@@ -33639,7 +33846,7 @@ var ListItem = (props) => {
|
|
|
33639
33846
|
ref?.scrollIntoView({ behavior: "auto", block: "nearest" });
|
|
33640
33847
|
}
|
|
33641
33848
|
},
|
|
33642
|
-
children: /* @__PURE__ */
|
|
33849
|
+
children: /* @__PURE__ */ jsx118("div", { className: "preview-text", children: preview.flatMap((text, idx) => /* @__PURE__ */ jsx118(Fragment21, { children: idx === 2 ? /* @__PURE__ */ jsx118("b", { children: text }) : text }, idx)) })
|
|
33643
33850
|
}
|
|
33644
33851
|
);
|
|
33645
33852
|
};
|
|
@@ -33649,16 +33856,16 @@ var MatchListBase = (props) => {
|
|
|
33649
33856
|
[props.matches]
|
|
33650
33857
|
);
|
|
33651
33858
|
const textMatches = useMemo11(
|
|
33652
|
-
() => props.matches.items.filter((match) =>
|
|
33859
|
+
() => props.matches.items.filter((match) => isTextElement17(match.element)),
|
|
33653
33860
|
[props.matches]
|
|
33654
33861
|
);
|
|
33655
33862
|
return /* @__PURE__ */ jsxs63("div", { className: "layer-ui__search-results", children: [
|
|
33656
33863
|
frameNameMatches.length > 0 && /* @__PURE__ */ jsxs63("div", { className: "layer-ui__search-result-container", children: [
|
|
33657
33864
|
/* @__PURE__ */ jsxs63("div", { className: "layer-ui__search-result-title", children: [
|
|
33658
|
-
/* @__PURE__ */
|
|
33659
|
-
/* @__PURE__ */
|
|
33865
|
+
/* @__PURE__ */ jsx118("div", { className: "title-icon", children: frameToolIcon }),
|
|
33866
|
+
/* @__PURE__ */ jsx118("div", { children: t("search.frames") })
|
|
33660
33867
|
] }),
|
|
33661
|
-
frameNameMatches.map((searchMatch, index) => /* @__PURE__ */
|
|
33868
|
+
frameNameMatches.map((searchMatch, index) => /* @__PURE__ */ jsx118(
|
|
33662
33869
|
ListItem,
|
|
33663
33870
|
{
|
|
33664
33871
|
searchQuery: props.searchQuery,
|
|
@@ -33668,14 +33875,14 @@ var MatchListBase = (props) => {
|
|
|
33668
33875
|
},
|
|
33669
33876
|
searchMatch.element.id + searchMatch.index
|
|
33670
33877
|
)),
|
|
33671
|
-
textMatches.length > 0 && /* @__PURE__ */
|
|
33878
|
+
textMatches.length > 0 && /* @__PURE__ */ jsx118("div", { className: "layer-ui__divider" })
|
|
33672
33879
|
] }),
|
|
33673
33880
|
textMatches.length > 0 && /* @__PURE__ */ jsxs63("div", { className: "layer-ui__search-result-container", children: [
|
|
33674
33881
|
/* @__PURE__ */ jsxs63("div", { className: "layer-ui__search-result-title", children: [
|
|
33675
|
-
/* @__PURE__ */
|
|
33676
|
-
/* @__PURE__ */
|
|
33882
|
+
/* @__PURE__ */ jsx118("div", { className: "title-icon", children: TextIcon }),
|
|
33883
|
+
/* @__PURE__ */ jsx118("div", { children: t("search.texts") })
|
|
33677
33884
|
] }),
|
|
33678
|
-
textMatches.map((searchMatch, index) => /* @__PURE__ */
|
|
33885
|
+
textMatches.map((searchMatch, index) => /* @__PURE__ */ jsx118(
|
|
33679
33886
|
ListItem,
|
|
33680
33887
|
{
|
|
33681
33888
|
searchQuery: props.searchQuery,
|
|
@@ -33852,7 +34059,7 @@ var handleSearch = debounce3(
|
|
|
33852
34059
|
}
|
|
33853
34060
|
const elements = app.scene.getNonDeletedElements();
|
|
33854
34061
|
const texts = elements.filter(
|
|
33855
|
-
(el) =>
|
|
34062
|
+
(el) => isTextElement17(el)
|
|
33856
34063
|
);
|
|
33857
34064
|
const frames2 = elements.filter(
|
|
33858
34065
|
(el) => isFrameLikeElement16(el)
|
|
@@ -33914,7 +34121,7 @@ var handleSearch = debounce3(
|
|
|
33914
34121
|
);
|
|
33915
34122
|
|
|
33916
34123
|
// components/Sidebar/Sidebar.tsx
|
|
33917
|
-
import
|
|
34124
|
+
import clsx55 from "clsx";
|
|
33918
34125
|
import {
|
|
33919
34126
|
useEffect as useEffect33,
|
|
33920
34127
|
useLayoutEffect as useLayoutEffect9,
|
|
@@ -33933,7 +34140,7 @@ import {
|
|
|
33933
34140
|
} from "@excalidraw/common";
|
|
33934
34141
|
|
|
33935
34142
|
// components/Sidebar/SidebarHeader.tsx
|
|
33936
|
-
import
|
|
34143
|
+
import clsx53 from "clsx";
|
|
33937
34144
|
import { useContext as useContext3 } from "react";
|
|
33938
34145
|
|
|
33939
34146
|
// components/Sidebar/common.ts
|
|
@@ -33941,7 +34148,7 @@ import React35 from "react";
|
|
|
33941
34148
|
var SidebarPropsContext = React35.createContext({});
|
|
33942
34149
|
|
|
33943
34150
|
// components/Sidebar/SidebarHeader.tsx
|
|
33944
|
-
import { jsx as
|
|
34151
|
+
import { jsx as jsx119, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
33945
34152
|
var SidebarHeader = ({
|
|
33946
34153
|
children,
|
|
33947
34154
|
className
|
|
@@ -33952,12 +34159,12 @@ var SidebarHeader = ({
|
|
|
33952
34159
|
return /* @__PURE__ */ jsxs64(
|
|
33953
34160
|
"div",
|
|
33954
34161
|
{
|
|
33955
|
-
className:
|
|
34162
|
+
className: clsx53("sidebar__header", className),
|
|
33956
34163
|
"data-testid": "sidebar-header",
|
|
33957
34164
|
children: [
|
|
33958
34165
|
children,
|
|
33959
34166
|
/* @__PURE__ */ jsxs64("div", { className: "sidebar__header__buttons", children: [
|
|
33960
|
-
renderDockButton && /* @__PURE__ */
|
|
34167
|
+
renderDockButton && /* @__PURE__ */ jsx119(Tooltip, { label: t("labels.sidebarLock"), children: /* @__PURE__ */ jsx119(
|
|
33961
34168
|
Button,
|
|
33962
34169
|
{
|
|
33963
34170
|
onSelect: () => props.onDock?.(!props.docked),
|
|
@@ -33968,7 +34175,7 @@ var SidebarHeader = ({
|
|
|
33968
34175
|
children: PinIcon
|
|
33969
34176
|
}
|
|
33970
34177
|
) }),
|
|
33971
|
-
/* @__PURE__ */
|
|
34178
|
+
/* @__PURE__ */ jsx119(
|
|
33972
34179
|
Button,
|
|
33973
34180
|
{
|
|
33974
34181
|
"data-testid": "sidebar-close",
|
|
@@ -33987,14 +34194,14 @@ SidebarHeader.displayName = "SidebarHeader";
|
|
|
33987
34194
|
|
|
33988
34195
|
// components/Sidebar/SidebarTabTrigger.tsx
|
|
33989
34196
|
import { Tabs as RadixTabs } from "radix-ui";
|
|
33990
|
-
import { jsx as
|
|
34197
|
+
import { jsx as jsx120 } from "react/jsx-runtime";
|
|
33991
34198
|
var SidebarTabTrigger = ({
|
|
33992
34199
|
children,
|
|
33993
34200
|
tab,
|
|
33994
34201
|
onSelect,
|
|
33995
34202
|
...rest
|
|
33996
34203
|
}) => {
|
|
33997
|
-
return /* @__PURE__ */
|
|
34204
|
+
return /* @__PURE__ */ jsx120(RadixTabs.Trigger, { value: tab, asChild: true, onSelect, children: /* @__PURE__ */ jsx120(
|
|
33998
34205
|
"button",
|
|
33999
34206
|
{
|
|
34000
34207
|
type: "button",
|
|
@@ -34008,18 +34215,18 @@ SidebarTabTrigger.displayName = "SidebarTabTrigger";
|
|
|
34008
34215
|
|
|
34009
34216
|
// components/Sidebar/SidebarTabTriggers.tsx
|
|
34010
34217
|
import { Tabs as RadixTabs2 } from "radix-ui";
|
|
34011
|
-
import { jsx as
|
|
34218
|
+
import { jsx as jsx121 } from "react/jsx-runtime";
|
|
34012
34219
|
var SidebarTabTriggers = ({
|
|
34013
34220
|
children,
|
|
34014
34221
|
...rest
|
|
34015
34222
|
}) => {
|
|
34016
|
-
return /* @__PURE__ */
|
|
34223
|
+
return /* @__PURE__ */ jsx121(RadixTabs2.List, { className: "sidebar-triggers", ...rest, children });
|
|
34017
34224
|
};
|
|
34018
34225
|
SidebarTabTriggers.displayName = "SidebarTabTriggers";
|
|
34019
34226
|
|
|
34020
34227
|
// components/Sidebar/SidebarTrigger.tsx
|
|
34021
|
-
import
|
|
34022
|
-
import { jsx as
|
|
34228
|
+
import clsx54 from "clsx";
|
|
34229
|
+
import { jsx as jsx122, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
34023
34230
|
var SidebarTrigger = ({
|
|
34024
34231
|
name,
|
|
34025
34232
|
tab,
|
|
@@ -34033,7 +34240,7 @@ var SidebarTrigger = ({
|
|
|
34033
34240
|
const setAppState = useExcalidrawSetAppState();
|
|
34034
34241
|
const appState = useUIAppState();
|
|
34035
34242
|
const isOpen = appState.openSidebar?.name === name;
|
|
34036
|
-
return /* @__PURE__ */
|
|
34243
|
+
return /* @__PURE__ */ jsx122(
|
|
34037
34244
|
"button",
|
|
34038
34245
|
{
|
|
34039
34246
|
type: "button",
|
|
@@ -34052,9 +34259,9 @@ var SidebarTrigger = ({
|
|
|
34052
34259
|
});
|
|
34053
34260
|
onToggle?.(nextOpen);
|
|
34054
34261
|
},
|
|
34055
|
-
children: /* @__PURE__ */ jsxs65("div", { className:
|
|
34056
|
-
icon && /* @__PURE__ */
|
|
34057
|
-
children && /* @__PURE__ */
|
|
34262
|
+
children: /* @__PURE__ */ jsxs65("div", { className: clsx54("sidebar-trigger", className), style, children: [
|
|
34263
|
+
icon && /* @__PURE__ */ jsx122("div", { children: icon }),
|
|
34264
|
+
children && /* @__PURE__ */ jsx122("div", { className: "sidebar-trigger__label", children })
|
|
34058
34265
|
] })
|
|
34059
34266
|
}
|
|
34060
34267
|
);
|
|
@@ -34063,7 +34270,7 @@ SidebarTrigger.displayName = "SidebarTrigger";
|
|
|
34063
34270
|
|
|
34064
34271
|
// components/Sidebar/SidebarTabs.tsx
|
|
34065
34272
|
import { Tabs as RadixTabs3 } from "radix-ui";
|
|
34066
|
-
import { jsx as
|
|
34273
|
+
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
34067
34274
|
var SidebarTabs = ({
|
|
34068
34275
|
children,
|
|
34069
34276
|
...rest
|
|
@@ -34074,7 +34281,7 @@ var SidebarTabs = ({
|
|
|
34074
34281
|
return null;
|
|
34075
34282
|
}
|
|
34076
34283
|
const { name } = appState.openSidebar;
|
|
34077
|
-
return /* @__PURE__ */
|
|
34284
|
+
return /* @__PURE__ */ jsx123(
|
|
34078
34285
|
RadixTabs3.Root,
|
|
34079
34286
|
{
|
|
34080
34287
|
className: "sidebar-tabs-root",
|
|
@@ -34092,18 +34299,18 @@ SidebarTabs.displayName = "SidebarTabs";
|
|
|
34092
34299
|
|
|
34093
34300
|
// components/Sidebar/SidebarTab.tsx
|
|
34094
34301
|
import { Tabs as RadixTabs4 } from "radix-ui";
|
|
34095
|
-
import { jsx as
|
|
34302
|
+
import { jsx as jsx124 } from "react/jsx-runtime";
|
|
34096
34303
|
var SidebarTab = ({
|
|
34097
34304
|
tab,
|
|
34098
34305
|
children,
|
|
34099
34306
|
...rest
|
|
34100
34307
|
}) => {
|
|
34101
|
-
return /* @__PURE__ */
|
|
34308
|
+
return /* @__PURE__ */ jsx124(RadixTabs4.Content, { ...rest, value: tab, "data-testid": tab, children });
|
|
34102
34309
|
};
|
|
34103
34310
|
SidebarTab.displayName = "SidebarTab";
|
|
34104
34311
|
|
|
34105
34312
|
// components/Sidebar/Sidebar.tsx
|
|
34106
|
-
import { jsx as
|
|
34313
|
+
import { jsx as jsx125 } from "react/jsx-runtime";
|
|
34107
34314
|
import { createElement } from "react";
|
|
34108
34315
|
var isSidebarDockedAtom = atom(false);
|
|
34109
34316
|
var SidebarInner = forwardRef5(
|
|
@@ -34177,11 +34384,11 @@ var SidebarInner = forwardRef5(
|
|
|
34177
34384
|
document.removeEventListener(EVENT9.KEYDOWN, handleKeyDown);
|
|
34178
34385
|
};
|
|
34179
34386
|
}, [closeSidebar, docked, editorInterface.canFitSidebar]);
|
|
34180
|
-
return /* @__PURE__ */
|
|
34387
|
+
return /* @__PURE__ */ jsx125(
|
|
34181
34388
|
Island,
|
|
34182
34389
|
{
|
|
34183
34390
|
...rest,
|
|
34184
|
-
className:
|
|
34391
|
+
className: clsx55(
|
|
34185
34392
|
CLASSES8.SIDEBAR,
|
|
34186
34393
|
{ "sidebar--docked": docked },
|
|
34187
34394
|
className
|
|
@@ -34189,7 +34396,7 @@ var SidebarInner = forwardRef5(
|
|
|
34189
34396
|
"data-viewport-ui": editorInterface.formFactor !== "phone" ? "side" : void 0,
|
|
34190
34397
|
"data-viewport-ui-name": editorInterface.formFactor !== "phone" ? "sidebar" : void 0,
|
|
34191
34398
|
ref: islandRef,
|
|
34192
|
-
children: /* @__PURE__ */
|
|
34399
|
+
children: /* @__PURE__ */ jsx125(SidebarPropsContext.Provider, { value: headerPropsRef.current, children })
|
|
34193
34400
|
}
|
|
34194
34401
|
);
|
|
34195
34402
|
}
|
|
@@ -34236,18 +34443,18 @@ var Sidebar = Object.assign(
|
|
|
34236
34443
|
Sidebar.displayName = "Sidebar";
|
|
34237
34444
|
|
|
34238
34445
|
// components/DefaultSidebar.tsx
|
|
34239
|
-
import { jsx as
|
|
34446
|
+
import { jsx as jsx126, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
34240
34447
|
import { createElement as createElement2 } from "react";
|
|
34241
34448
|
var DefaultSidebarTrigger = withInternalFallback(
|
|
34242
34449
|
"DefaultSidebarTrigger",
|
|
34243
34450
|
(props) => {
|
|
34244
34451
|
const { DefaultSidebarTriggerTunnel } = useTunnels();
|
|
34245
|
-
return /* @__PURE__ */
|
|
34452
|
+
return /* @__PURE__ */ jsx126(DefaultSidebarTriggerTunnel.In, { children: /* @__PURE__ */ jsx126(
|
|
34246
34453
|
Sidebar.Trigger,
|
|
34247
34454
|
{
|
|
34248
34455
|
...props,
|
|
34249
34456
|
className: "default-sidebar-trigger",
|
|
34250
|
-
name:
|
|
34457
|
+
name: DEFAULT_SIDEBAR3.name
|
|
34251
34458
|
}
|
|
34252
34459
|
) });
|
|
34253
34460
|
}
|
|
@@ -34255,7 +34462,7 @@ var DefaultSidebarTrigger = withInternalFallback(
|
|
|
34255
34462
|
DefaultSidebarTrigger.displayName = "DefaultSidebarTrigger";
|
|
34256
34463
|
var DefaultTabTriggers = ({ children }) => {
|
|
34257
34464
|
const { DefaultSidebarTabTriggersTunnel } = useTunnels();
|
|
34258
|
-
return /* @__PURE__ */
|
|
34465
|
+
return /* @__PURE__ */ jsx126(DefaultSidebarTabTriggersTunnel.In, { children });
|
|
34259
34466
|
};
|
|
34260
34467
|
DefaultTabTriggers.displayName = "DefaultTabTriggers";
|
|
34261
34468
|
var DefaultSidebar = Object.assign(
|
|
@@ -34270,7 +34477,7 @@ var DefaultSidebar = Object.assign(
|
|
|
34270
34477
|
}) => {
|
|
34271
34478
|
const appState = useUIAppState();
|
|
34272
34479
|
const setAppState = useExcalidrawSetAppState();
|
|
34273
|
-
const isSearchSidebar = appState.openSidebar?.tab ===
|
|
34480
|
+
const isSearchSidebar = appState.openSidebar?.tab === CANVAS_SEARCH_TAB3;
|
|
34274
34481
|
const isDocked = isSearchSidebar ? false : docked ?? appState.defaultSidebarDockedPreference;
|
|
34275
34482
|
const canDock = !isSearchSidebar && docked == null && onDock !== false;
|
|
34276
34483
|
return /* @__PURE__ */ createElement2(
|
|
@@ -34279,7 +34486,7 @@ var DefaultSidebar = Object.assign(
|
|
|
34279
34486
|
...rest,
|
|
34280
34487
|
name: "default",
|
|
34281
34488
|
key: "default",
|
|
34282
|
-
className:
|
|
34489
|
+
className: clsx56(
|
|
34283
34490
|
"default-sidebar",
|
|
34284
34491
|
{ "default-sidebar--search-only": isSearchSidebar },
|
|
34285
34492
|
className
|
|
@@ -34293,8 +34500,8 @@ var DefaultSidebar = Object.assign(
|
|
|
34293
34500
|
} : void 0
|
|
34294
34501
|
},
|
|
34295
34502
|
/* @__PURE__ */ jsxs66(Sidebar.Tabs, { children: [
|
|
34296
|
-
!isSearchSidebar && /* @__PURE__ */
|
|
34297
|
-
/* @__PURE__ */
|
|
34503
|
+
!isSearchSidebar && /* @__PURE__ */ jsx126(Sidebar.Header, {}),
|
|
34504
|
+
/* @__PURE__ */ jsx126(Sidebar.Tab, { tab: CANVAS_SEARCH_TAB3, children: /* @__PURE__ */ jsx126(SearchMenu2, {}) }),
|
|
34298
34505
|
!isSearchSidebar && children
|
|
34299
34506
|
] })
|
|
34300
34507
|
);
|
|
@@ -34311,7 +34518,7 @@ import React37 from "react";
|
|
|
34311
34518
|
import { getFrame } from "@excalidraw/common";
|
|
34312
34519
|
|
|
34313
34520
|
// components/Card.tsx
|
|
34314
|
-
import { jsx as
|
|
34521
|
+
import { jsx as jsx127 } from "react/jsx-runtime";
|
|
34315
34522
|
var COLOR_MAP = {
|
|
34316
34523
|
primary: {
|
|
34317
34524
|
base: "var(--color-primary)",
|
|
@@ -34336,7 +34543,7 @@ var COLOR_MAP = {
|
|
|
34336
34543
|
}
|
|
34337
34544
|
};
|
|
34338
34545
|
var Card = ({ children, color }) => {
|
|
34339
|
-
return /* @__PURE__ */
|
|
34546
|
+
return /* @__PURE__ */ jsx127(
|
|
34340
34547
|
"div",
|
|
34341
34548
|
{
|
|
34342
34549
|
className: "Card",
|
|
@@ -34351,7 +34558,7 @@ var Card = ({ children, color }) => {
|
|
|
34351
34558
|
};
|
|
34352
34559
|
|
|
34353
34560
|
// components/JSONExportDialog.tsx
|
|
34354
|
-
import { Fragment as Fragment23, jsx as
|
|
34561
|
+
import { Fragment as Fragment23, jsx as jsx128, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
34355
34562
|
var JSONExportModal = ({
|
|
34356
34563
|
elements,
|
|
34357
34564
|
appState,
|
|
@@ -34363,15 +34570,15 @@ var JSONExportModal = ({
|
|
|
34363
34570
|
onCloseRequest
|
|
34364
34571
|
}) => {
|
|
34365
34572
|
const { onExportToBackend } = exportOpts;
|
|
34366
|
-
return /* @__PURE__ */
|
|
34573
|
+
return /* @__PURE__ */ jsx128("div", { className: "ExportDialog ExportDialog--json", children: /* @__PURE__ */ jsxs67("div", { className: "ExportDialog-cards", children: [
|
|
34367
34574
|
exportOpts.saveFileToDisk && /* @__PURE__ */ jsxs67(Card, { color: "lime", children: [
|
|
34368
|
-
/* @__PURE__ */
|
|
34369
|
-
/* @__PURE__ */
|
|
34575
|
+
/* @__PURE__ */ jsx128("div", { className: "Card-icon", children: exportToFileIcon }),
|
|
34576
|
+
/* @__PURE__ */ jsx128("h2", { children: t("exportDialog.disk_title") }),
|
|
34370
34577
|
/* @__PURE__ */ jsxs67("div", { className: "Card-details", children: [
|
|
34371
34578
|
t("exportDialog.disk_details"),
|
|
34372
34579
|
!nativeFileSystemSupported && actionManager.renderAction("changeProjectName")
|
|
34373
34580
|
] }),
|
|
34374
|
-
/* @__PURE__ */
|
|
34581
|
+
/* @__PURE__ */ jsx128(
|
|
34375
34582
|
IconButton,
|
|
34376
34583
|
{
|
|
34377
34584
|
className: "Card-button",
|
|
@@ -34386,10 +34593,10 @@ var JSONExportModal = ({
|
|
|
34386
34593
|
)
|
|
34387
34594
|
] }),
|
|
34388
34595
|
onExportToBackend && /* @__PURE__ */ jsxs67(Card, { color: "pink", children: [
|
|
34389
|
-
/* @__PURE__ */
|
|
34390
|
-
/* @__PURE__ */
|
|
34391
|
-
/* @__PURE__ */
|
|
34392
|
-
/* @__PURE__ */
|
|
34596
|
+
/* @__PURE__ */ jsx128("div", { className: "Card-icon", children: LinkIcon }),
|
|
34597
|
+
/* @__PURE__ */ jsx128("h2", { children: t("exportDialog.link_title") }),
|
|
34598
|
+
/* @__PURE__ */ jsx128("div", { className: "Card-details", children: t("exportDialog.link_details") }),
|
|
34599
|
+
/* @__PURE__ */ jsx128(
|
|
34393
34600
|
IconButton,
|
|
34394
34601
|
{
|
|
34395
34602
|
className: "Card-button",
|
|
@@ -34424,7 +34631,7 @@ var JSONExportDialog = ({
|
|
|
34424
34631
|
const handleClose = React37.useCallback(() => {
|
|
34425
34632
|
setAppState({ openDialog: null });
|
|
34426
34633
|
}, [setAppState]);
|
|
34427
|
-
return /* @__PURE__ */
|
|
34634
|
+
return /* @__PURE__ */ jsx128(Fragment23, { children: appState.openDialog?.name === "jsonExport" && /* @__PURE__ */ jsx128(Dialog, { onCloseRequest: handleClose, title: t("buttons.export"), children: /* @__PURE__ */ jsx128(
|
|
34428
34635
|
JSONExportModal,
|
|
34429
34636
|
{
|
|
34430
34637
|
elements,
|
|
@@ -34440,13 +34647,13 @@ var JSONExportDialog = ({
|
|
|
34440
34647
|
};
|
|
34441
34648
|
|
|
34442
34649
|
// components/LaserPointerButton.tsx
|
|
34443
|
-
import
|
|
34444
|
-
import { jsx as
|
|
34650
|
+
import clsx57 from "clsx";
|
|
34651
|
+
import { jsx as jsx129 } from "react/jsx-runtime";
|
|
34445
34652
|
var LaserPointerButton = (props) => {
|
|
34446
|
-
return /* @__PURE__ */
|
|
34653
|
+
return /* @__PURE__ */ jsx129(
|
|
34447
34654
|
IconButton,
|
|
34448
34655
|
{
|
|
34449
|
-
className:
|
|
34656
|
+
className: clsx57("ToolIcon__LaserPointer", {
|
|
34450
34657
|
"is-mobile": props.isMobile
|
|
34451
34658
|
}),
|
|
34452
34659
|
type: "toggle",
|
|
@@ -34462,214 +34669,18 @@ var LaserPointerButton = (props) => {
|
|
|
34462
34669
|
};
|
|
34463
34670
|
|
|
34464
34671
|
// components/Toolbar.tsx
|
|
34465
|
-
import
|
|
34672
|
+
import clsx59 from "clsx";
|
|
34466
34673
|
import { useState as useState33 } from "react";
|
|
34467
34674
|
import { CANVAS_SEARCH_TAB as CANVAS_SEARCH_TAB4, DEFAULT_SIDEBAR as DEFAULT_SIDEBAR4, KEYS as KEYS52 } from "@excalidraw/common";
|
|
34468
34675
|
|
|
34469
|
-
// components/HintViewer.tsx
|
|
34470
|
-
import { CANVAS_SEARCH_TAB as CANVAS_SEARCH_TAB3, DEFAULT_SIDEBAR as DEFAULT_SIDEBAR3 } from "@excalidraw/common";
|
|
34471
|
-
import {
|
|
34472
|
-
isArrowElement as isArrowElement14,
|
|
34473
|
-
isFlowchartNodeElement as isFlowchartNodeElement3,
|
|
34474
|
-
isImageElement as isImageElement9,
|
|
34475
|
-
isLinearElement as isLinearElement10,
|
|
34476
|
-
isLineElement as isLineElement8,
|
|
34477
|
-
isTextBindableContainer as isTextBindableContainer2,
|
|
34478
|
-
isTextElement as isTextElement17
|
|
34479
|
-
} from "@excalidraw/element";
|
|
34480
|
-
import { isNodeInFlowchart } from "@excalidraw/element";
|
|
34481
|
-
import { jsx as jsx129 } from "react/jsx-runtime";
|
|
34482
|
-
var getTaggedShortcutKey = (key) => Array.isArray(key) ? `<kbd>${key.map(getShortcutKey).join(" + ")}</kbd>` : `<kbd>${getShortcutKey(key)}</kbd>`;
|
|
34483
|
-
var getHints = ({
|
|
34484
|
-
appState,
|
|
34485
|
-
isMobile,
|
|
34486
|
-
editorInterface,
|
|
34487
|
-
app
|
|
34488
|
-
}) => {
|
|
34489
|
-
const { activeTool, isResizing, isRotating, lastPointerDownWith } = appState;
|
|
34490
|
-
const multiMode = appState.multiElement !== null;
|
|
34491
|
-
if (appState.openSidebar?.name === DEFAULT_SIDEBAR3.name && appState.openSidebar.tab === CANVAS_SEARCH_TAB3 && appState.searchMatches?.matches.length) {
|
|
34492
|
-
return t("hints.dismissSearch", {
|
|
34493
|
-
shortcut: getTaggedShortcutKey("Escape")
|
|
34494
|
-
});
|
|
34495
|
-
}
|
|
34496
|
-
if (appState.openSidebar && !editorInterface.canFitSidebar) {
|
|
34497
|
-
return null;
|
|
34498
|
-
}
|
|
34499
|
-
if (isEraserActive(appState)) {
|
|
34500
|
-
return t("hints.eraserRevert", {
|
|
34501
|
-
shortcut: getTaggedShortcutKey("Alt")
|
|
34502
|
-
});
|
|
34503
|
-
}
|
|
34504
|
-
const selectedElements = app.scene.getSelectedElements(appState);
|
|
34505
|
-
if (appState.selectedLinearElement?.isDragging && selectedElements[0]?.type === "arrow") {
|
|
34506
|
-
return t("hints.arrowBindModifiers", {
|
|
34507
|
-
shortcut_1: getTaggedShortcutKey("Ctrl"),
|
|
34508
|
-
shortcut_2: getTaggedShortcutKey("Alt")
|
|
34509
|
-
});
|
|
34510
|
-
}
|
|
34511
|
-
if (activeTool.type === "arrow" || activeTool.type === "line") {
|
|
34512
|
-
if (multiMode) {
|
|
34513
|
-
return t("hints.linearElementMulti", {
|
|
34514
|
-
shortcut_1: getTaggedShortcutKey("Escape"),
|
|
34515
|
-
shortcut_2: getTaggedShortcutKey("Enter")
|
|
34516
|
-
});
|
|
34517
|
-
}
|
|
34518
|
-
if (activeTool.type === "arrow") {
|
|
34519
|
-
return t("hints.arrowTool", {
|
|
34520
|
-
shortcut: getTaggedShortcutKey("A")
|
|
34521
|
-
});
|
|
34522
|
-
}
|
|
34523
|
-
return t("hints.linearElement");
|
|
34524
|
-
}
|
|
34525
|
-
if (activeTool.type === "freedraw") {
|
|
34526
|
-
return t("hints.freeDraw");
|
|
34527
|
-
}
|
|
34528
|
-
if (activeTool.type === "text") {
|
|
34529
|
-
return t("hints.text");
|
|
34530
|
-
}
|
|
34531
|
-
if (activeTool.type === "embeddable") {
|
|
34532
|
-
return t("hints.embeddable");
|
|
34533
|
-
}
|
|
34534
|
-
if (activeTool.type === "autoshape") {
|
|
34535
|
-
return t("hints.autoshape");
|
|
34536
|
-
}
|
|
34537
|
-
if (isResizing && lastPointerDownWith === "mouse" && selectedElements.length === 1) {
|
|
34538
|
-
const targetElement = selectedElements[0];
|
|
34539
|
-
if (isLinearElement10(targetElement) && targetElement.points.length === 2) {
|
|
34540
|
-
return t("hints.lockAngle", {
|
|
34541
|
-
shortcut: getTaggedShortcutKey("Shift")
|
|
34542
|
-
});
|
|
34543
|
-
}
|
|
34544
|
-
return isImageElement9(targetElement) ? t("hints.resizeImage", {
|
|
34545
|
-
shortcut_1: getTaggedShortcutKey("Shift"),
|
|
34546
|
-
shortcut_2: getTaggedShortcutKey("Alt")
|
|
34547
|
-
}) : t("hints.resize", {
|
|
34548
|
-
shortcut_1: getTaggedShortcutKey("Shift"),
|
|
34549
|
-
shortcut_2: getTaggedShortcutKey("Alt")
|
|
34550
|
-
});
|
|
34551
|
-
}
|
|
34552
|
-
if (isRotating && lastPointerDownWith === "mouse") {
|
|
34553
|
-
return t("hints.rotate", {
|
|
34554
|
-
shortcut: getTaggedShortcutKey("Shift")
|
|
34555
|
-
});
|
|
34556
|
-
}
|
|
34557
|
-
if (selectedElements.length === 1 && isTextElement17(selectedElements[0])) {
|
|
34558
|
-
return t("hints.text_selected", {
|
|
34559
|
-
shortcut: getTaggedShortcutKey("Enter")
|
|
34560
|
-
});
|
|
34561
|
-
}
|
|
34562
|
-
if (appState.editingTextElement) {
|
|
34563
|
-
return t("hints.text_editing", {
|
|
34564
|
-
shortcut_1: getTaggedShortcutKey("Escape"),
|
|
34565
|
-
shortcut_2: getTaggedShortcutKey(["CtrlOrCmd", "Enter"])
|
|
34566
|
-
});
|
|
34567
|
-
}
|
|
34568
|
-
if (appState.croppingElementId) {
|
|
34569
|
-
return t("hints.leaveCropEditor", {
|
|
34570
|
-
shortcut_1: getTaggedShortcutKey("Enter"),
|
|
34571
|
-
shortcut_2: getTaggedShortcutKey("Escape")
|
|
34572
|
-
});
|
|
34573
|
-
}
|
|
34574
|
-
if (selectedElements.length === 1 && isImageElement9(selectedElements[0])) {
|
|
34575
|
-
return t("hints.enterCropEditor", {
|
|
34576
|
-
shortcut: getTaggedShortcutKey("Enter")
|
|
34577
|
-
});
|
|
34578
|
-
}
|
|
34579
|
-
if (activeTool.type === "selection") {
|
|
34580
|
-
if (appState.selectionElement && !selectedElements.length && !appState.editingTextElement && !appState.selectedLinearElement?.isEditing) {
|
|
34581
|
-
return t("hints.deepBoxSelect", {
|
|
34582
|
-
shortcut: getTaggedShortcutKey("CtrlOrCmd")
|
|
34583
|
-
});
|
|
34584
|
-
}
|
|
34585
|
-
if (isGridModeEnabled(app) && appState.selectedElementsAreBeingDragged) {
|
|
34586
|
-
return t("hints.disableSnapping", {
|
|
34587
|
-
shortcut: getTaggedShortcutKey("CtrlOrCmd")
|
|
34588
|
-
});
|
|
34589
|
-
}
|
|
34590
|
-
if (!selectedElements.length && !isMobile) {
|
|
34591
|
-
return t("hints.canvasPanning", {
|
|
34592
|
-
shortcut_1: getTaggedShortcutKey(t("keys.mmb")),
|
|
34593
|
-
shortcut_2: getTaggedShortcutKey("Space")
|
|
34594
|
-
});
|
|
34595
|
-
}
|
|
34596
|
-
if (selectedElements.length === 1) {
|
|
34597
|
-
if (isLinearElement10(selectedElements[0])) {
|
|
34598
|
-
if (isArrowElement14(selectedElements[0]) && appState.selectedLinearElement?.elementId === selectedElements[0].id && (appState.selectedLinearElement.hoverPointIndex === 0 || appState.selectedLinearElement.hoverPointIndex === selectedElements[0].points.length - 1)) {
|
|
34599
|
-
return t("hints.toggleArrowhead");
|
|
34600
|
-
}
|
|
34601
|
-
if (appState.selectedLinearElement?.isEditing) {
|
|
34602
|
-
return appState.selectedLinearElement.selectedPointsIndices ? t("hints.lineEditor_pointSelected", {
|
|
34603
|
-
shortcut_1: getTaggedShortcutKey("Delete"),
|
|
34604
|
-
shortcut_2: getTaggedShortcutKey(["CtrlOrCmd", "D"])
|
|
34605
|
-
}) : t("hints.lineEditor_nothingSelected", {
|
|
34606
|
-
shortcut_1: getTaggedShortcutKey("Shift"),
|
|
34607
|
-
shortcut_2: getTaggedShortcutKey("Alt")
|
|
34608
|
-
});
|
|
34609
|
-
}
|
|
34610
|
-
return isLineElement8(selectedElements[0]) ? t("hints.lineEditor_line_info", {
|
|
34611
|
-
shortcut: getTaggedShortcutKey("Enter")
|
|
34612
|
-
}) : t("hints.lineEditor_info", {
|
|
34613
|
-
shortcut_1: getTaggedShortcutKey("CtrlOrCmd"),
|
|
34614
|
-
shortcut_2: getTaggedShortcutKey(["CtrlOrCmd", "Enter"])
|
|
34615
|
-
});
|
|
34616
|
-
}
|
|
34617
|
-
if (!appState.newElement && !appState.selectedElementsAreBeingDragged && isTextBindableContainer2(selectedElements[0])) {
|
|
34618
|
-
const bindTextToElement = t("hints.bindTextToElement", {
|
|
34619
|
-
shortcut: getTaggedShortcutKey("Enter")
|
|
34620
|
-
});
|
|
34621
|
-
const createFlowchart = t("hints.createFlowchart", {
|
|
34622
|
-
shortcut: getTaggedShortcutKey(["CtrlOrCmd", "\u2191\u2193"])
|
|
34623
|
-
});
|
|
34624
|
-
if (isFlowchartNodeElement3(selectedElements[0])) {
|
|
34625
|
-
if (isNodeInFlowchart(
|
|
34626
|
-
selectedElements[0],
|
|
34627
|
-
app.scene.getNonDeletedElementsMap()
|
|
34628
|
-
)) {
|
|
34629
|
-
return [bindTextToElement, createFlowchart];
|
|
34630
|
-
}
|
|
34631
|
-
return [bindTextToElement, createFlowchart];
|
|
34632
|
-
}
|
|
34633
|
-
return bindTextToElement;
|
|
34634
|
-
}
|
|
34635
|
-
}
|
|
34636
|
-
}
|
|
34637
|
-
return null;
|
|
34638
|
-
};
|
|
34639
|
-
var HintViewer = ({
|
|
34640
|
-
appState,
|
|
34641
|
-
isMobile,
|
|
34642
|
-
editorInterface,
|
|
34643
|
-
app
|
|
34644
|
-
}) => {
|
|
34645
|
-
const hints = getHints({
|
|
34646
|
-
appState,
|
|
34647
|
-
isMobile,
|
|
34648
|
-
editorInterface,
|
|
34649
|
-
app
|
|
34650
|
-
});
|
|
34651
|
-
if (!hints) {
|
|
34652
|
-
return null;
|
|
34653
|
-
}
|
|
34654
|
-
const hint = Array.isArray(hints) ? hints.map((hint2) => hint2.replace(/\. ?$/, "")).join(", ") : hints;
|
|
34655
|
-
const hintJSX = hint.split(/(<kbd>[^<]+<\/kbd>)/g).map((part, index) => {
|
|
34656
|
-
if (index % 2 === 1) {
|
|
34657
|
-
const shortcutMatch = part[0] === "<" && part.match(/^<kbd>([^<]+)<\/kbd>$/);
|
|
34658
|
-
return /* @__PURE__ */ jsx129("kbd", { children: shortcutMatch ? shortcutMatch[1] : part }, index);
|
|
34659
|
-
}
|
|
34660
|
-
return part;
|
|
34661
|
-
});
|
|
34662
|
-
return /* @__PURE__ */ jsx129("div", { className: "HintViewer", children: /* @__PURE__ */ jsx129("span", { children: hintJSX }) });
|
|
34663
|
-
};
|
|
34664
|
-
|
|
34665
34676
|
// components/LockButton.tsx
|
|
34666
|
-
import
|
|
34677
|
+
import clsx58 from "clsx";
|
|
34667
34678
|
import { jsx as jsx130 } from "react/jsx-runtime";
|
|
34668
34679
|
var LockButton = (props) => {
|
|
34669
34680
|
return /* @__PURE__ */ jsx130(
|
|
34670
34681
|
IconButton,
|
|
34671
34682
|
{
|
|
34672
|
-
className:
|
|
34683
|
+
className: clsx58("ToolIcon__lock", { "is-mobile": props.isMobile }),
|
|
34673
34684
|
type: "toggle",
|
|
34674
34685
|
icon: props.checked ? LockedIcon : UnlockedIcon,
|
|
34675
34686
|
checked: props.checked,
|
|
@@ -34810,7 +34821,7 @@ var ExtraToolsDropdown = ({
|
|
|
34810
34821
|
/* @__PURE__ */ jsx131(
|
|
34811
34822
|
DropdownMenu_default.Trigger,
|
|
34812
34823
|
{
|
|
34813
|
-
className:
|
|
34824
|
+
className: clsx59("App-toolbar__extra-tools-trigger", {
|
|
34814
34825
|
"App-toolbar__extra-tools-trigger--selected": myocSimplifiedToolSelected || frameToolSelected || embeddableToolSelected || !isMyocSimplifiedMode && isFullStylesPanel && drawShapeToolSelected || lassoToolSelected || bucketFillToolSelected || // in collab we're already highlighting the laser button
|
|
34815
34826
|
// outside toolbar, so let's not highlight extra-tools button
|
|
34816
34827
|
// on top of it
|
|
@@ -34972,7 +34983,7 @@ var Toolbar = ({
|
|
|
34972
34983
|
Island,
|
|
34973
34984
|
{
|
|
34974
34985
|
padding: 1,
|
|
34975
|
-
className:
|
|
34986
|
+
className: clsx59("App-toolbar", {
|
|
34976
34987
|
"zen-mode": appState.zenModeEnabled,
|
|
34977
34988
|
"App-toolbar--compact": isCompactStylesPanel
|
|
34978
34989
|
}),
|
|
@@ -35168,13 +35179,13 @@ var LayerUI = ({
|
|
|
35168
35179
|
Section,
|
|
35169
35180
|
{
|
|
35170
35181
|
heading: "selectedShapeActions",
|
|
35171
|
-
className:
|
|
35182
|
+
className: clsx60("selected-shape-actions zen-mode-transition", {
|
|
35172
35183
|
"transition-left": appState.zenModeEnabled
|
|
35173
35184
|
}),
|
|
35174
35185
|
children: isCompactStylesPanel ? /* @__PURE__ */ jsx132(
|
|
35175
35186
|
Island,
|
|
35176
35187
|
{
|
|
35177
|
-
className:
|
|
35188
|
+
className: clsx60("compact-shape-actions-island"),
|
|
35178
35189
|
padding: 0,
|
|
35179
35190
|
"data-viewport-ui": "side",
|
|
35180
35191
|
"data-viewport-ui-name": "stylesPanel",
|
|
@@ -35228,13 +35239,13 @@ var LayerUI = ({
|
|
|
35228
35239
|
Stack_default.Col,
|
|
35229
35240
|
{
|
|
35230
35241
|
gap: spacing.menuTopGap,
|
|
35231
|
-
className:
|
|
35242
|
+
className: clsx60("App-menu_top__left"),
|
|
35232
35243
|
children: [
|
|
35233
35244
|
renderCanvasActions(),
|
|
35234
35245
|
defaultUIEnabled && /* @__PURE__ */ jsx132(
|
|
35235
35246
|
"div",
|
|
35236
35247
|
{
|
|
35237
|
-
className:
|
|
35248
|
+
className: clsx60("selected-shape-actions-container", {
|
|
35238
35249
|
"selected-shape-actions-container--compact": isCompactStylesPanel
|
|
35239
35250
|
}),
|
|
35240
35251
|
children: shouldRenderSelectedShapeActions && renderSelectedShapeActions()
|
|
@@ -35253,13 +35264,23 @@ var LayerUI = ({
|
|
|
35253
35264
|
]
|
|
35254
35265
|
}
|
|
35255
35266
|
),
|
|
35267
|
+
defaultUIEnabled && appState.viewModeEnabled && // MyOC: Keep the held-F Smart Zoom hint visible in view mode.
|
|
35268
|
+
/* @__PURE__ */ jsx132("div", { className: "view-mode-hint", children: /* @__PURE__ */ jsx132(
|
|
35269
|
+
HintViewer,
|
|
35270
|
+
{
|
|
35271
|
+
appState,
|
|
35272
|
+
isMobile: editorInterface.formFactor === "phone",
|
|
35273
|
+
editorInterface,
|
|
35274
|
+
app
|
|
35275
|
+
}
|
|
35276
|
+
) }),
|
|
35256
35277
|
defaultUIEnabled && !appState.viewModeEnabled && appState.openDialog?.name !== "elementLinkSelector" && /* @__PURE__ */ jsx132(Section, { heading: "shapes", className: "shapes-section", children: (heading) => /* @__PURE__ */ jsxs69("div", { style: { position: "relative" }, children: [
|
|
35257
35278
|
renderWelcomeScreen && /* @__PURE__ */ jsx132(tunnels.WelcomeScreenToolbarHintTunnel.Out, {}),
|
|
35258
35279
|
/* @__PURE__ */ jsx132(Stack_default.Col, { gap: spacing.toolbarColGap, align: "start", children: /* @__PURE__ */ jsxs69(
|
|
35259
35280
|
Stack_default.Row,
|
|
35260
35281
|
{
|
|
35261
35282
|
gap: spacing.toolbarRowGap,
|
|
35262
|
-
className:
|
|
35283
|
+
className: clsx60("App-toolbar-container", {
|
|
35263
35284
|
"zen-mode": appState.zenModeEnabled
|
|
35264
35285
|
}),
|
|
35265
35286
|
children: [
|
|
@@ -35302,7 +35323,7 @@ var LayerUI = ({
|
|
|
35302
35323
|
/* @__PURE__ */ jsxs69(
|
|
35303
35324
|
"div",
|
|
35304
35325
|
{
|
|
35305
|
-
className:
|
|
35326
|
+
className: clsx60(
|
|
35306
35327
|
"layer-ui__wrapper__top-right zen-mode-transition",
|
|
35307
35328
|
{
|
|
35308
35329
|
"transition-right": appState.zenModeEnabled,
|
|
@@ -36047,7 +36068,7 @@ var NewElementCanvas = (props) => {
|
|
|
36047
36068
|
var NewElementCanvas_default = NewElementCanvas;
|
|
36048
36069
|
|
|
36049
36070
|
// components/CursorHint.tsx
|
|
36050
|
-
import
|
|
36071
|
+
import clsx61 from "clsx";
|
|
36051
36072
|
import { useLayoutEffect as useLayoutEffect10, useEffect as useEffect38, useRef as useRef32, useState as useState34 } from "react";
|
|
36052
36073
|
import { ARROW_TYPE as ARROW_TYPE2, EVENT as EVENT10 } from "@excalidraw/common";
|
|
36053
36074
|
import { jsx as jsx137 } from "react/jsx-runtime";
|
|
@@ -36166,7 +36187,7 @@ var CursorHint = () => {
|
|
|
36166
36187
|
"div",
|
|
36167
36188
|
{
|
|
36168
36189
|
ref: hintRef,
|
|
36169
|
-
className:
|
|
36190
|
+
className: clsx61("CursorHint", {
|
|
36170
36191
|
"CursorHint--fade-out": isFadingOut
|
|
36171
36192
|
}),
|
|
36172
36193
|
"data-testid": "cursor-hint",
|
|
@@ -36425,6 +36446,7 @@ var touchTimeout = 0;
|
|
|
36425
36446
|
var invalidateContextMenu = false;
|
|
36426
36447
|
var YOUTUBE_VIDEO_STATES = /* @__PURE__ */ new Map();
|
|
36427
36448
|
var MAX_EMBEDDABLE_VIEWPORT_SCALE = 4;
|
|
36449
|
+
var SMART_ZOOM_KEY_RELEASE_TIMEOUT = 300;
|
|
36428
36450
|
var getViewpointAwareResizeCursor = (cursor, viewpointFlip) => {
|
|
36429
36451
|
if (viewpointFlip.horizontal === viewpointFlip.vertical) {
|
|
36430
36452
|
return cursor;
|
|
@@ -36525,6 +36547,9 @@ var App = class _App extends React41.Component {
|
|
|
36525
36547
|
__publicField(this, "lastPointerMoveCoords", null);
|
|
36526
36548
|
__publicField(this, "lastCompletedCanvasClicks", []);
|
|
36527
36549
|
__publicField(this, "lastKeyboardSmartZoomImageId", null);
|
|
36550
|
+
// MyOC: State for the press-and-hold Smart Zoom interaction.
|
|
36551
|
+
__publicField(this, "smartZoomKeyDownAt", null);
|
|
36552
|
+
__publicField(this, "smartZoomKeyHitElement", false);
|
|
36528
36553
|
/** previous frame pointer coords */
|
|
36529
36554
|
__publicField(this, "previousPointerMoveCoords", null);
|
|
36530
36555
|
__publicField(this, "drawShape", new AppDrawShape(this));
|
|
@@ -36982,6 +37007,7 @@ var App = class _App extends React41.Component {
|
|
|
36982
37007
|
// Lifecycle
|
|
36983
37008
|
__publicField(this, "onBlur", withBatchedUpdates(() => {
|
|
36984
37009
|
isHoldingSpace = false;
|
|
37010
|
+
this.resetSmartZoomKey();
|
|
36985
37011
|
this.setState({
|
|
36986
37012
|
isBindingEnabled: this.state.bindingPreference === "enabled"
|
|
36987
37013
|
});
|
|
@@ -37046,6 +37072,7 @@ var App = class _App extends React41.Component {
|
|
|
37046
37072
|
this.maybeCleanupAfterMissingPointerUp(null);
|
|
37047
37073
|
isHoldingSpace = false;
|
|
37048
37074
|
isHoldingZ = false;
|
|
37075
|
+
this.resetSmartZoomKey();
|
|
37049
37076
|
isPanning = false;
|
|
37050
37077
|
isDraggingScrollBar = false;
|
|
37051
37078
|
lastPointerUp = null;
|
|
@@ -38124,7 +38151,76 @@ var App = class _App extends React41.Component {
|
|
|
38124
38151
|
this.viewport.lastPosition.y = event.clientY;
|
|
38125
38152
|
}
|
|
38126
38153
|
));
|
|
38127
|
-
//
|
|
38154
|
+
// MyOC Smart Zoom input handling: F is a hold gesture that can target the
|
|
38155
|
+
// item under the pointer, or zoom the complete scene on a quick release.
|
|
38156
|
+
__publicField(this, "isPlainSmartZoomKey", (event) => !event[KEYS53.CTRL_OR_CMD] && !event.shiftKey && !event.altKey && event.key.toLocaleLowerCase() === KEYS53.F);
|
|
38157
|
+
__publicField(this, "updateSmartZoomCursor", (scenePointer) => {
|
|
38158
|
+
if (this.smartZoomKeyDownAt === null) {
|
|
38159
|
+
return;
|
|
38160
|
+
}
|
|
38161
|
+
const hitElement = scenePointer ? this.getElementAtPosition(scenePointer.x, scenePointer.y, {
|
|
38162
|
+
includeLockedElements: true
|
|
38163
|
+
}) : null;
|
|
38164
|
+
this.cursor.set(hitElement ? CURSOR_TYPE2.POINTER : "zoom-in");
|
|
38165
|
+
});
|
|
38166
|
+
__publicField(this, "resetSmartZoomKey", () => {
|
|
38167
|
+
const wasHeld = this.smartZoomKeyDownAt !== null;
|
|
38168
|
+
this.smartZoomKeyDownAt = null;
|
|
38169
|
+
this.smartZoomKeyHitElement = false;
|
|
38170
|
+
if (wasHeld) {
|
|
38171
|
+
this.cursor.reset();
|
|
38172
|
+
this.updateEditorAtom(smartZoomKeyHeldAtom, false);
|
|
38173
|
+
}
|
|
38174
|
+
});
|
|
38175
|
+
__publicField(this, "handleSmartZoomKeyDown", (event) => {
|
|
38176
|
+
if (!this.isPlainSmartZoomKey(event)) {
|
|
38177
|
+
return false;
|
|
38178
|
+
}
|
|
38179
|
+
if (!event.repeat && this.smartZoomKeyDownAt === null) {
|
|
38180
|
+
this.smartZoomKeyDownAt = Date.now();
|
|
38181
|
+
this.smartZoomKeyHitElement = false;
|
|
38182
|
+
this.updateEditorAtom(smartZoomKeyHeldAtom, true);
|
|
38183
|
+
this.updateSmartZoomCursor(this.lastPointerMoveCoords);
|
|
38184
|
+
}
|
|
38185
|
+
event.preventDefault();
|
|
38186
|
+
event.stopPropagation();
|
|
38187
|
+
return true;
|
|
38188
|
+
});
|
|
38189
|
+
__publicField(this, "handleSmartZoomKeyUp", (event) => {
|
|
38190
|
+
if (event.key.toLocaleLowerCase() !== KEYS53.F || this.smartZoomKeyDownAt === null) {
|
|
38191
|
+
return false;
|
|
38192
|
+
}
|
|
38193
|
+
const elapsed = Date.now() - this.smartZoomKeyDownAt;
|
|
38194
|
+
const shouldZoomAllElements = !this.smartZoomKeyHitElement && elapsed <= SMART_ZOOM_KEY_RELEASE_TIMEOUT;
|
|
38195
|
+
this.resetSmartZoomKey();
|
|
38196
|
+
event.stopPropagation();
|
|
38197
|
+
if (shouldZoomAllElements) {
|
|
38198
|
+
this.actionManager.executeAction(
|
|
38199
|
+
actionSmartZoom,
|
|
38200
|
+
"keyboard",
|
|
38201
|
+
this.scene.getNonDeletedElements()
|
|
38202
|
+
);
|
|
38203
|
+
}
|
|
38204
|
+
return true;
|
|
38205
|
+
});
|
|
38206
|
+
__publicField(this, "handleSmartZoomPointerDown", (event, scenePointer) => {
|
|
38207
|
+
if (event.button !== POINTER_BUTTON2.MAIN || this.smartZoomKeyDownAt === null) {
|
|
38208
|
+
return false;
|
|
38209
|
+
}
|
|
38210
|
+
const hitElement = this.getElementAtPosition(
|
|
38211
|
+
scenePointer.x,
|
|
38212
|
+
scenePointer.y,
|
|
38213
|
+
{ includeLockedElements: true }
|
|
38214
|
+
);
|
|
38215
|
+
if (!hitElement) {
|
|
38216
|
+
return false;
|
|
38217
|
+
}
|
|
38218
|
+
this.smartZoomKeyHitElement = true;
|
|
38219
|
+
event.preventDefault();
|
|
38220
|
+
event.stopPropagation();
|
|
38221
|
+
this.actionManager.executeAction(actionSmartZoom, "keyboard", [hitElement]);
|
|
38222
|
+
return true;
|
|
38223
|
+
});
|
|
38128
38224
|
__publicField(this, "onKeyDown", withBatchedUpdates(
|
|
38129
38225
|
(event) => {
|
|
38130
38226
|
if (!this.isInteractionEnabled()) {
|
|
@@ -38250,6 +38346,9 @@ var App = class _App extends React41.Component {
|
|
|
38250
38346
|
maybeHandleArrowPointlikeDrag({ app: this, event });
|
|
38251
38347
|
}
|
|
38252
38348
|
}
|
|
38349
|
+
if (this.handleSmartZoomKeyDown(event)) {
|
|
38350
|
+
return;
|
|
38351
|
+
}
|
|
38253
38352
|
if (this.actionManager.handleKeyDown(event)) {
|
|
38254
38353
|
return;
|
|
38255
38354
|
}
|
|
@@ -38456,6 +38555,9 @@ var App = class _App extends React41.Component {
|
|
|
38456
38555
|
if (!this.isInteractionEnabled()) {
|
|
38457
38556
|
return;
|
|
38458
38557
|
}
|
|
38558
|
+
if (this.handleSmartZoomKeyUp(event)) {
|
|
38559
|
+
return;
|
|
38560
|
+
}
|
|
38459
38561
|
if (event.key === KEYS53.SPACE) {
|
|
38460
38562
|
if (this.state.viewModeEnabled && this.state.activeTool.type !== "laser" || this.state.openDialog?.name === "elementLinkSelector") {
|
|
38461
38563
|
this.cursor.set(CURSOR_TYPE2.GRAB);
|
|
@@ -38950,12 +39052,12 @@ var App = class _App extends React41.Component {
|
|
|
38950
39052
|
event,
|
|
38951
39053
|
this.state
|
|
38952
39054
|
);
|
|
38953
|
-
const
|
|
39055
|
+
const hitElement2 = this.getElementAtPosition(sceneX2, sceneY2, {
|
|
38954
39056
|
includeLockedElements: true
|
|
38955
39057
|
});
|
|
38956
|
-
if (
|
|
39058
|
+
if (hitElement2) {
|
|
38957
39059
|
this.cursor.reset();
|
|
38958
|
-
this.actionManager.executeAction(actionSmartZoom, "ui", [
|
|
39060
|
+
this.actionManager.executeAction(actionSmartZoom, "ui", [hitElement2]);
|
|
38959
39061
|
}
|
|
38960
39062
|
return;
|
|
38961
39063
|
}
|
|
@@ -39027,15 +39129,18 @@ var App = class _App extends React41.Component {
|
|
|
39027
39129
|
return;
|
|
39028
39130
|
}
|
|
39029
39131
|
}
|
|
39030
|
-
|
|
39031
|
-
|
|
39132
|
+
const hitElement = this.getElementAtPosition(sceneX, sceneY, {
|
|
39133
|
+
includeLockedElements: true
|
|
39134
|
+
});
|
|
39135
|
+
if (hitElement && isImageElement10(hitElement)) {
|
|
39136
|
+
this.actionManager.executeAction(actionSmartZoom, "ui", [hitElement]);
|
|
39032
39137
|
return;
|
|
39033
39138
|
}
|
|
39034
39139
|
this.cursor.reset();
|
|
39035
39140
|
const selectedGroupIds = getSelectedGroupIds4(this.state);
|
|
39036
39141
|
if (selectedGroupIds.length > 0) {
|
|
39037
|
-
const
|
|
39038
|
-
const selectedGroupId =
|
|
39142
|
+
const hitElement2 = this.getElementAtPosition(sceneX, sceneY);
|
|
39143
|
+
const selectedGroupId = hitElement2 && getSelectedGroupIdForElement(hitElement2, this.state.selectedGroupIds);
|
|
39039
39144
|
if (selectedGroupId) {
|
|
39040
39145
|
this.store.scheduleCapture();
|
|
39041
39146
|
this.setState((prevState) => ({
|
|
@@ -39043,7 +39148,7 @@ var App = class _App extends React41.Component {
|
|
|
39043
39148
|
...selectGroupsForSelectedElements7(
|
|
39044
39149
|
{
|
|
39045
39150
|
editingGroupId: selectedGroupId,
|
|
39046
|
-
selectedElementIds: { [
|
|
39151
|
+
selectedElementIds: { [hitElement2.id]: true }
|
|
39047
39152
|
},
|
|
39048
39153
|
this.scene.getNonDeletedElements(),
|
|
39049
39154
|
prevState,
|
|
@@ -39055,10 +39160,10 @@ var App = class _App extends React41.Component {
|
|
|
39055
39160
|
}
|
|
39056
39161
|
this.cursor.reset();
|
|
39057
39162
|
if (!this.state.viewModeEnabled) {
|
|
39058
|
-
const
|
|
39059
|
-
if (isIframeLikeElement2(
|
|
39163
|
+
const hitElement2 = this.getElementAtPosition(sceneX, sceneY);
|
|
39164
|
+
if (isIframeLikeElement2(hitElement2)) {
|
|
39060
39165
|
this.setState({
|
|
39061
|
-
activeEmbeddable: { element:
|
|
39166
|
+
activeEmbeddable: { element: hitElement2, state: "active" }
|
|
39062
39167
|
});
|
|
39063
39168
|
return;
|
|
39064
39169
|
}
|
|
@@ -39111,7 +39216,28 @@ var App = class _App extends React41.Component {
|
|
|
39111
39216
|
this.lastCompletedCanvasClicks = [];
|
|
39112
39217
|
return;
|
|
39113
39218
|
}
|
|
39219
|
+
if (this.smartZoomKeyHitElement) {
|
|
39220
|
+
event.preventDefault();
|
|
39221
|
+
event.stopPropagation();
|
|
39222
|
+
return;
|
|
39223
|
+
}
|
|
39114
39224
|
const scenePointer = viewportCoordsToSceneCoords3(event, this.state);
|
|
39225
|
+
if (this.smartZoomKeyDownAt !== null && !this.smartZoomKeyHitElement) {
|
|
39226
|
+
const hitElement = this.getElementAtPosition(
|
|
39227
|
+
scenePointer.x,
|
|
39228
|
+
scenePointer.y,
|
|
39229
|
+
{ includeLockedElements: true }
|
|
39230
|
+
);
|
|
39231
|
+
if (hitElement) {
|
|
39232
|
+
this.smartZoomKeyHitElement = true;
|
|
39233
|
+
event.preventDefault();
|
|
39234
|
+
event.stopPropagation();
|
|
39235
|
+
this.actionManager.executeAction(actionSmartZoom, "keyboard", [
|
|
39236
|
+
hitElement
|
|
39237
|
+
]);
|
|
39238
|
+
return;
|
|
39239
|
+
}
|
|
39240
|
+
}
|
|
39115
39241
|
const imageStatusAction = this.getImageStatusActionAtPosition(scenePointer);
|
|
39116
39242
|
if (imageStatusAction) {
|
|
39117
39243
|
event.preventDefault();
|
|
@@ -39902,6 +40028,10 @@ var App = class _App extends React41.Component {
|
|
|
39902
40028
|
hoveredElementIds: updateStable(prevState.hoveredElementIds, {})
|
|
39903
40029
|
}));
|
|
39904
40030
|
}
|
|
40031
|
+
this.updateSmartZoomCursor({
|
|
40032
|
+
x: scenePointerX,
|
|
40033
|
+
y: scenePointerY
|
|
40034
|
+
});
|
|
39905
40035
|
});
|
|
39906
40036
|
__publicField(this, "handleEraser", (event, scenePointer) => {
|
|
39907
40037
|
const elementsToErase = this.eraserTrail.addPointToPath(
|
|
@@ -39945,6 +40075,9 @@ var App = class _App extends React41.Component {
|
|
|
39945
40075
|
x: scenePointerX,
|
|
39946
40076
|
y: scenePointerY
|
|
39947
40077
|
};
|
|
40078
|
+
if (this.handleSmartZoomPointerDown(event, scenePointer)) {
|
|
40079
|
+
return;
|
|
40080
|
+
}
|
|
39948
40081
|
const target = event.target;
|
|
39949
40082
|
if (target.setPointerCapture) {
|
|
39950
40083
|
target.setPointerCapture(event.pointerId);
|
|
@@ -43101,7 +43234,7 @@ var App = class _App extends React41.Component {
|
|
|
43101
43234
|
return /* @__PURE__ */ jsx139(
|
|
43102
43235
|
"div",
|
|
43103
43236
|
{
|
|
43104
|
-
className:
|
|
43237
|
+
className: clsx62("excalidraw__embeddable-container", {
|
|
43105
43238
|
"is-hovered": isHovered
|
|
43106
43239
|
}),
|
|
43107
43240
|
style: {
|
|
@@ -43218,7 +43351,7 @@ var App = class _App extends React41.Component {
|
|
|
43218
43351
|
"div",
|
|
43219
43352
|
{
|
|
43220
43353
|
translate: "no",
|
|
43221
|
-
className:
|
|
43354
|
+
className: clsx62(
|
|
43222
43355
|
"excalidraw excalidraw-container notranslate",
|
|
43223
43356
|
this.props.className,
|
|
43224
43357
|
{
|
|
@@ -46219,7 +46352,7 @@ var InitializeApp = (props) => {
|
|
|
46219
46352
|
};
|
|
46220
46353
|
|
|
46221
46354
|
// components/footer/FooterCenter.tsx
|
|
46222
|
-
import
|
|
46355
|
+
import clsx63 from "clsx";
|
|
46223
46356
|
import { jsx as jsx141 } from "react/jsx-runtime";
|
|
46224
46357
|
var FooterCenter = ({ children }) => {
|
|
46225
46358
|
const { FooterCenterTunnel } = useTunnels();
|
|
@@ -46227,7 +46360,7 @@ var FooterCenter = ({ children }) => {
|
|
|
46227
46360
|
return /* @__PURE__ */ jsx141(FooterCenterTunnel.In, { children: /* @__PURE__ */ jsx141(
|
|
46228
46361
|
"div",
|
|
46229
46362
|
{
|
|
46230
|
-
className:
|
|
46363
|
+
className: clsx63("footer-center zen-mode-transition", {
|
|
46231
46364
|
"layer-ui__wrapper__footer-left--transition-bottom": appState.zenModeEnabled
|
|
46232
46365
|
}),
|
|
46233
46366
|
children
|
|
@@ -46238,7 +46371,7 @@ var FooterCenter_default = FooterCenter;
|
|
|
46238
46371
|
FooterCenter.displayName = "FooterCenter";
|
|
46239
46372
|
|
|
46240
46373
|
// components/live-collaboration/LiveCollaborationTrigger.tsx
|
|
46241
|
-
import
|
|
46374
|
+
import clsx64 from "clsx";
|
|
46242
46375
|
import { MQ_MIN_WIDTH_DESKTOP } from "@excalidraw/common";
|
|
46243
46376
|
import { jsx as jsx142, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
46244
46377
|
var LiveCollaborationTrigger2 = ({
|
|
@@ -46253,7 +46386,7 @@ var LiveCollaborationTrigger2 = ({
|
|
|
46253
46386
|
Button,
|
|
46254
46387
|
{
|
|
46255
46388
|
...rest,
|
|
46256
|
-
className:
|
|
46389
|
+
className: clsx64("collab-button", { active: isCollaborating }),
|
|
46257
46390
|
type: "button",
|
|
46258
46391
|
onSelect,
|
|
46259
46392
|
style: { position: "relative", width: showIconOnly ? void 0 : "auto" },
|