@excalidraw/excalidraw 0.17.1-1d71f84 → 0.17.1-4689a6b
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 +1 -0
- package/dist/browser/dev/excalidraw-assets-dev/{chunk-AK7SWNLN.js → chunk-23CKV3WP.js} +4 -2
- package/dist/browser/dev/excalidraw-assets-dev/chunk-23CKV3WP.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{chunk-RWZVJAQU.js → chunk-7D5BMEAB.js} +2227 -1976
- package/dist/browser/dev/excalidraw-assets-dev/chunk-7D5BMEAB.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{en-5TCZHGGJ.js → en-W7TECCRB.js} +2 -2
- package/dist/browser/dev/excalidraw-assets-dev/{image-EDKQZH7Z.js → image-JKT6GXZD.js} +2 -2
- package/dist/browser/dev/index.css +20 -0
- package/dist/browser/dev/index.css.map +2 -2
- package/dist/browser/dev/index.js +770 -585
- package/dist/browser/dev/index.js.map +4 -4
- package/dist/browser/prod/excalidraw-assets/chunk-DWOM5R6H.js +55 -0
- package/dist/browser/prod/excalidraw-assets/{chunk-CTYINSWT.js → chunk-SK23VHAR.js} +2 -2
- package/dist/browser/prod/excalidraw-assets/{en-LROPV2RN.js → en-SMMH575S.js} +1 -1
- package/dist/browser/prod/excalidraw-assets/image-WDEQS5RL.js +1 -0
- package/dist/browser/prod/index.css +1 -1
- package/dist/browser/prod/index.js +22 -22
- package/dist/{prod/en-II4GK66F.json → dev/en-CVBEBUBY.json} +3 -1
- package/dist/dev/index.css +20 -0
- package/dist/dev/index.css.map +2 -2
- package/dist/dev/index.js +2383 -2074
- package/dist/dev/index.js.map +4 -4
- package/dist/excalidraw/actions/actionBoundText.js +4 -1
- package/dist/excalidraw/actions/actionCanvas.js +3 -1
- package/dist/excalidraw/actions/actionDuplicateSelection.js +4 -0
- package/dist/excalidraw/actions/actionExport.d.ts +1 -1
- package/dist/excalidraw/actions/actionFinalize.d.ts +1 -1
- package/dist/excalidraw/actions/actionFinalize.js +3 -3
- package/dist/excalidraw/actions/actionFlip.d.ts +3 -3
- package/dist/excalidraw/actions/actionFlip.js +6 -6
- package/dist/excalidraw/actions/actionGroup.js +4 -2
- package/dist/excalidraw/actions/actionHistory.js +3 -0
- package/dist/excalidraw/actions/actionZindex.d.ts +11 -11
- package/dist/excalidraw/actions/shortcuts.js +1 -1
- package/dist/excalidraw/analytics.js +1 -1
- package/dist/excalidraw/components/App.d.ts +13 -3
- package/dist/excalidraw/components/App.js +212 -83
- package/dist/excalidraw/components/CommandPalette/CommandPalette.js +24 -10
- package/dist/excalidraw/components/DarkModeToggle.js +3 -1
- package/dist/excalidraw/components/HelpDialog.js +8 -6
- package/dist/excalidraw/components/RadioGroup.d.ts +2 -1
- package/dist/excalidraw/components/RadioGroup.js +1 -1
- package/dist/excalidraw/components/TTDDialog/MermaidToExcalidraw.js +6 -2
- package/dist/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +18 -0
- package/dist/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.js +9 -0
- package/dist/excalidraw/components/hyperlink/Hyperlink.js +3 -3
- package/dist/excalidraw/components/hyperlink/helpers.js +2 -3
- package/dist/excalidraw/components/icons.d.ts +3 -0
- package/dist/excalidraw/components/icons.js +5 -1
- package/dist/excalidraw/components/main-menu/DefaultItems.d.ts +12 -2
- package/dist/excalidraw/components/main-menu/DefaultItems.js +38 -7
- package/dist/excalidraw/constants.d.ts +0 -3
- package/dist/excalidraw/constants.js +0 -3
- package/dist/excalidraw/data/magic.js +2 -1
- package/dist/excalidraw/data/reconcile.d.ts +6 -0
- package/dist/excalidraw/data/reconcile.js +49 -0
- package/dist/excalidraw/data/restore.d.ts +3 -3
- package/dist/excalidraw/data/restore.js +5 -6
- package/dist/excalidraw/data/transform.d.ts +1 -1
- package/dist/excalidraw/data/transform.js +12 -3
- package/dist/excalidraw/element/binding.d.ts +22 -9
- package/dist/excalidraw/element/binding.js +403 -26
- package/dist/excalidraw/element/bounds.d.ts +0 -1
- package/dist/excalidraw/element/bounds.js +0 -3
- package/dist/excalidraw/element/collision.d.ts +14 -19
- package/dist/excalidraw/element/collision.js +36 -713
- package/dist/excalidraw/element/embeddable.js +18 -43
- package/dist/excalidraw/element/index.d.ts +0 -1
- package/dist/excalidraw/element/index.js +0 -1
- package/dist/excalidraw/element/linearElementEditor.d.ts +10 -10
- package/dist/excalidraw/element/linearElementEditor.js +6 -4
- package/dist/excalidraw/element/newElement.d.ts +1 -1
- package/dist/excalidraw/element/newElement.js +2 -1
- package/dist/excalidraw/element/textElement.d.ts +0 -1
- package/dist/excalidraw/element/textElement.js +0 -30
- package/dist/excalidraw/element/types.d.ts +17 -2
- package/dist/excalidraw/errors.d.ts +3 -0
- package/dist/excalidraw/errors.js +3 -0
- package/dist/excalidraw/fractionalIndex.d.ts +40 -0
- package/dist/excalidraw/fractionalIndex.js +241 -0
- package/dist/excalidraw/frame.d.ts +1 -1
- package/dist/excalidraw/hooks/useCreatePortalContainer.js +2 -1
- package/dist/excalidraw/locales/en.json +3 -1
- package/dist/excalidraw/renderer/helpers.js +2 -2
- package/dist/excalidraw/renderer/interactiveScene.js +1 -1
- package/dist/excalidraw/renderer/renderElement.js +3 -3
- package/dist/excalidraw/renderer/renderSnaps.js +2 -1
- package/dist/excalidraw/scene/Scene.d.ts +7 -6
- package/dist/excalidraw/scene/Scene.js +28 -13
- package/dist/excalidraw/scene/export.js +4 -3
- package/dist/excalidraw/types.d.ts +4 -3
- package/dist/excalidraw/utils.d.ts +1 -0
- package/dist/excalidraw/utils.js +1 -0
- package/dist/excalidraw/zindex.d.ts +2 -2
- package/dist/excalidraw/zindex.js +9 -13
- package/dist/{dev/en-II4GK66F.json → prod/en-CVBEBUBY.json} +3 -1
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +36 -36
- package/dist/utils/collision.d.ts +4 -0
- package/dist/utils/collision.js +48 -0
- package/dist/utils/geometry/geometry.d.ts +71 -0
- package/dist/utils/geometry/geometry.js +674 -0
- package/dist/utils/geometry/shape.d.ts +55 -0
- package/dist/utils/geometry/shape.js +149 -0
- package/package.json +2 -1
- package/dist/browser/dev/excalidraw-assets-dev/chunk-AK7SWNLN.js.map +0 -7
- package/dist/browser/dev/excalidraw-assets-dev/chunk-RWZVJAQU.js.map +0 -7
- package/dist/browser/prod/excalidraw-assets/chunk-LL4GORAM.js +0 -55
- package/dist/browser/prod/excalidraw-assets/image-EFCJDJH3.js +0 -1
- /package/dist/browser/dev/excalidraw-assets-dev/{en-5TCZHGGJ.js.map → en-W7TECCRB.js.map} +0 -0
- /package/dist/browser/dev/excalidraw-assets-dev/{image-EDKQZH7Z.js.map → image-JKT6GXZD.js.map} +0 -0
|
@@ -154,6 +154,7 @@ import {
|
|
|
154
154
|
getBoundTextElementId,
|
|
155
155
|
getBoundTextMaxHeight,
|
|
156
156
|
getBoundTextMaxWidth,
|
|
157
|
+
getClosedCurveShape,
|
|
157
158
|
getCommonAttributeOfSelectedElements,
|
|
158
159
|
getCommonBoundingBox,
|
|
159
160
|
getCommonBounds,
|
|
@@ -162,6 +163,7 @@ import {
|
|
|
162
163
|
getContainingFrame,
|
|
163
164
|
getCornerRadius,
|
|
164
165
|
getCursorForResizingElement,
|
|
166
|
+
getCurveShape,
|
|
165
167
|
getDataURL,
|
|
166
168
|
getDateTime,
|
|
167
169
|
getDefaultAppState,
|
|
@@ -171,13 +173,13 @@ import {
|
|
|
171
173
|
getDraggedElementsBounds,
|
|
172
174
|
getElementAbsoluteCoords,
|
|
173
175
|
getElementWithTransformHandleType,
|
|
174
|
-
getElementsAtPosition,
|
|
175
176
|
getElementsInGroup,
|
|
176
177
|
getElementsInNewFrame,
|
|
177
178
|
getElementsInResizingFrame,
|
|
178
179
|
getElementsOverlappingFrame,
|
|
179
180
|
getElementsWithinSelection,
|
|
180
181
|
getEligibleElementsForBinding,
|
|
182
|
+
getEllipseShape,
|
|
181
183
|
getEmbedLink,
|
|
182
184
|
getExportSize,
|
|
183
185
|
getFileFromEvent,
|
|
@@ -189,6 +191,7 @@ import {
|
|
|
189
191
|
getFrameLikeElements,
|
|
190
192
|
getFrameLikeTitle,
|
|
191
193
|
getFreeDrawSvgPath,
|
|
194
|
+
getFreedrawShape,
|
|
192
195
|
getGlobalCSSVariable,
|
|
193
196
|
getGridPoint,
|
|
194
197
|
getHoveredElementForBinding,
|
|
@@ -203,6 +206,7 @@ import {
|
|
|
203
206
|
getNormalizedDimensions,
|
|
204
207
|
getNormalizedZoom,
|
|
205
208
|
getOriginalContainerHeightFromCache,
|
|
209
|
+
getPolygonShape,
|
|
206
210
|
getRenderOpacity,
|
|
207
211
|
getResizeArrowDirection,
|
|
208
212
|
getResizeOffsetXY,
|
|
@@ -216,7 +220,6 @@ import {
|
|
|
216
220
|
getStateForZoom,
|
|
217
221
|
getSvgPathFromStroke,
|
|
218
222
|
getTargetElements,
|
|
219
|
-
getTextBindableContainerAtPosition,
|
|
220
223
|
getTextElementAngle,
|
|
221
224
|
getTextWidth,
|
|
222
225
|
getTransformHandleTypeFromCoords,
|
|
@@ -232,7 +235,10 @@ import {
|
|
|
232
235
|
hasStrokeWidth,
|
|
233
236
|
hashElementsVersion,
|
|
234
237
|
hashString,
|
|
235
|
-
|
|
238
|
+
hitElementBoundText,
|
|
239
|
+
hitElementBoundingBox,
|
|
240
|
+
hitElementBoundingBoxOnly,
|
|
241
|
+
hitElementItself,
|
|
236
242
|
isArrowElement,
|
|
237
243
|
isArrowKey,
|
|
238
244
|
isBindingElement,
|
|
@@ -242,6 +248,7 @@ import {
|
|
|
242
248
|
isBrave,
|
|
243
249
|
isCursorInFrame,
|
|
244
250
|
isDarwin,
|
|
251
|
+
isDevEnv,
|
|
245
252
|
isElementInFrame,
|
|
246
253
|
isElementInGroup,
|
|
247
254
|
isElementInViewport,
|
|
@@ -254,8 +261,6 @@ import {
|
|
|
254
261
|
isFrameElement,
|
|
255
262
|
isFrameLikeElement,
|
|
256
263
|
isHandToolActive,
|
|
257
|
-
isHittingElementBoundingBoxWithoutHittingElement,
|
|
258
|
-
isHittingElementNotConsideringBoundingBox,
|
|
259
264
|
isIOS,
|
|
260
265
|
isIframeElement,
|
|
261
266
|
isIframeLikeElement,
|
|
@@ -275,9 +280,9 @@ import {
|
|
|
275
280
|
isMemberOf,
|
|
276
281
|
isNonDeletedElement,
|
|
277
282
|
isPathALoop,
|
|
278
|
-
isPointHittingElementBoundingBox,
|
|
279
283
|
isPointHittingLink,
|
|
280
284
|
isPointHittingLinkIcon,
|
|
285
|
+
isPointInShape,
|
|
281
286
|
isPromiseLike,
|
|
282
287
|
isSelectedViaGroup,
|
|
283
288
|
isShallowEqual,
|
|
@@ -375,9 +380,12 @@ import {
|
|
|
375
380
|
shouldResizeFromCenter,
|
|
376
381
|
shouldRotateWithDiscreteAngle,
|
|
377
382
|
shouldShowBoundingBox,
|
|
383
|
+
shouldTestInside,
|
|
378
384
|
showSelectedShapeActions,
|
|
379
385
|
supportsResizeObserver,
|
|
380
386
|
suppportsHorizontalAlign,
|
|
387
|
+
syncInvalidIndices,
|
|
388
|
+
syncMovedIndices,
|
|
381
389
|
throttleRAF,
|
|
382
390
|
toBrandedType,
|
|
383
391
|
toValidURL,
|
|
@@ -395,14 +403,14 @@ import {
|
|
|
395
403
|
viewportCoordsToSceneCoords,
|
|
396
404
|
wrapEvent,
|
|
397
405
|
wrapText
|
|
398
|
-
} from "./excalidraw-assets-dev/chunk-
|
|
406
|
+
} from "./excalidraw-assets-dev/chunk-7D5BMEAB.js";
|
|
399
407
|
import {
|
|
400
408
|
define_import_meta_env_default,
|
|
401
409
|
init_define_import_meta_env
|
|
402
410
|
} from "./excalidraw-assets-dev/chunk-YRUDZAGT.js";
|
|
403
411
|
import {
|
|
404
412
|
en_default
|
|
405
|
-
} from "./excalidraw-assets-dev/chunk-
|
|
413
|
+
} from "./excalidraw-assets-dev/chunk-23CKV3WP.js";
|
|
406
414
|
import {
|
|
407
415
|
percentages_default
|
|
408
416
|
} from "./excalidraw-assets-dev/chunk-YZTYRBEQ.js";
|
|
@@ -1290,11 +1298,11 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
1290
1298
|
return jsxWithValidation(type, props, key, false);
|
|
1291
1299
|
}
|
|
1292
1300
|
}
|
|
1293
|
-
var
|
|
1294
|
-
var
|
|
1301
|
+
var jsx134 = jsxWithValidationDynamic;
|
|
1302
|
+
var jsxs78 = jsxWithValidationStatic;
|
|
1295
1303
|
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
1296
|
-
exports.jsx =
|
|
1297
|
-
exports.jsxs =
|
|
1304
|
+
exports.jsx = jsx134;
|
|
1305
|
+
exports.jsxs = jsxs78;
|
|
1298
1306
|
})();
|
|
1299
1307
|
}
|
|
1300
1308
|
}
|
|
@@ -2666,7 +2674,7 @@ var globImport_locales_json = __glob({
|
|
|
2666
2674
|
"./locales/da-DK.json": () => import("./excalidraw-assets-dev/da-DK-6OKJ2GQ6.js"),
|
|
2667
2675
|
"./locales/de-DE.json": () => import("./excalidraw-assets-dev/de-DE-BD5ICOQ2.js"),
|
|
2668
2676
|
"./locales/el-GR.json": () => import("./excalidraw-assets-dev/el-GR-JFDBTDHS.js"),
|
|
2669
|
-
"./locales/en.json": () => import("./excalidraw-assets-dev/en-
|
|
2677
|
+
"./locales/en.json": () => import("./excalidraw-assets-dev/en-W7TECCRB.js"),
|
|
2670
2678
|
"./locales/es-ES.json": () => import("./excalidraw-assets-dev/es-ES-CBBTGYGR.js"),
|
|
2671
2679
|
"./locales/eu-ES.json": () => import("./excalidraw-assets-dev/eu-ES-CHAPMSLE.js"),
|
|
2672
2680
|
"./locales/fa-IR.json": () => import("./excalidraw-assets-dev/fa-IR-LOJOKEJO.js"),
|
|
@@ -3509,17 +3517,8 @@ var MoonIcon = createIcon(
|
|
|
3509
3517
|
modifiedTablerIconProps
|
|
3510
3518
|
);
|
|
3511
3519
|
var SunIcon = createIcon(
|
|
3512
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3513
|
-
|
|
3514
|
-
{
|
|
3515
|
-
stroke: "currentColor",
|
|
3516
|
-
strokeWidth: "1.25",
|
|
3517
|
-
strokeLinecap: "round",
|
|
3518
|
-
strokeLinejoin: "round",
|
|
3519
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667" })
|
|
3520
|
-
}
|
|
3521
|
-
),
|
|
3522
|
-
modifiedTablerIconProps
|
|
3520
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("g", { stroke: "currentColor", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667" }) }),
|
|
3521
|
+
{ ...modifiedTablerIconProps, strokeWidth: 1.5 }
|
|
3523
3522
|
);
|
|
3524
3523
|
var HamburgerMenuIcon = createIcon(
|
|
3525
3524
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("g", { strokeWidth: "1.5", children: [
|
|
@@ -5164,6 +5163,31 @@ var coffeeIcon = createIcon(
|
|
|
5164
5163
|
] }),
|
|
5165
5164
|
tablerIconProps
|
|
5166
5165
|
);
|
|
5166
|
+
var DeviceDesktopIcon = createIcon(
|
|
5167
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("g", { stroke: "currentColor", children: [
|
|
5168
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
5169
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M3 5a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-16a1 1 0 0 1-1-1v-10zM7 20h10M9 16v4M15 16v4" })
|
|
5170
|
+
] }),
|
|
5171
|
+
{ ...tablerIconProps, strokeWidth: 1.5 }
|
|
5172
|
+
);
|
|
5173
|
+
var arrowBarToLeftIcon = createIcon(
|
|
5174
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("g", { children: [
|
|
5175
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
5176
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M10 12l10 0" }),
|
|
5177
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M10 12l4 4" }),
|
|
5178
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M10 12l4 -4" }),
|
|
5179
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M4 4l0 16" })
|
|
5180
|
+
] }),
|
|
5181
|
+
tablerIconProps
|
|
5182
|
+
);
|
|
5183
|
+
var youtubeIcon = createIcon(
|
|
5184
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("g", { children: [
|
|
5185
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
5186
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8z" }),
|
|
5187
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M10 9l5 3l-5 3z" })
|
|
5188
|
+
] }),
|
|
5189
|
+
tablerIconProps
|
|
5190
|
+
);
|
|
5167
5191
|
|
|
5168
5192
|
// actions/actionDeleteSelected.tsx
|
|
5169
5193
|
var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
|
|
@@ -5446,9 +5470,9 @@ var getTargetIndex = (appState, elements, boundaryIndex, direction, containingFr
|
|
|
5446
5470
|
var getTargetElementsMap = (elements, indices) => {
|
|
5447
5471
|
return indices.reduce((acc, index2) => {
|
|
5448
5472
|
const element = elements[index2];
|
|
5449
|
-
acc
|
|
5473
|
+
acc.set(element.id, element);
|
|
5450
5474
|
return acc;
|
|
5451
|
-
},
|
|
5475
|
+
}, /* @__PURE__ */ new Map());
|
|
5452
5476
|
};
|
|
5453
5477
|
var shiftElementsByOne = (elements, appState, direction) => {
|
|
5454
5478
|
const indicesToMove = getIndicesToMove(elements, appState);
|
|
@@ -5494,12 +5518,8 @@ var shiftElementsByOne = (elements, appState, direction) => {
|
|
|
5494
5518
|
...trailingElements
|
|
5495
5519
|
];
|
|
5496
5520
|
});
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
return bumpVersion(element);
|
|
5500
|
-
}
|
|
5501
|
-
return element;
|
|
5502
|
-
});
|
|
5521
|
+
syncMovedIndices(elements, targetElementsMap);
|
|
5522
|
+
return elements;
|
|
5503
5523
|
};
|
|
5504
5524
|
var shiftElementsToEnd = (elements, appState, direction, containingFrame, elementsToBeMoved) => {
|
|
5505
5525
|
const indicesToMove = getIndicesToMove(elements, appState, elementsToBeMoved);
|
|
@@ -5554,12 +5574,10 @@ var shiftElementsToEnd = (elements, appState, direction, containingFrame, elemen
|
|
|
5554
5574
|
displacedElements.push(elements[index2]);
|
|
5555
5575
|
}
|
|
5556
5576
|
}
|
|
5557
|
-
const targetElements =
|
|
5558
|
-
return bumpVersion(element);
|
|
5559
|
-
});
|
|
5577
|
+
const targetElements = Array.from(targetElementsMap.values());
|
|
5560
5578
|
const leadingElements = elements.slice(0, leadingIndex);
|
|
5561
5579
|
const trailingElements = elements.slice(trailingIndex + 1);
|
|
5562
|
-
|
|
5580
|
+
const nextElements = direction === "left" ? [
|
|
5563
5581
|
...leadingElements,
|
|
5564
5582
|
...targetElements,
|
|
5565
5583
|
...displacedElements,
|
|
@@ -5570,6 +5588,8 @@ var shiftElementsToEnd = (elements, appState, direction, containingFrame, elemen
|
|
|
5570
5588
|
...targetElements,
|
|
5571
5589
|
...trailingElements
|
|
5572
5590
|
];
|
|
5591
|
+
syncMovedIndices(nextElements, targetElementsMap);
|
|
5592
|
+
return nextElements;
|
|
5573
5593
|
};
|
|
5574
5594
|
function shiftElementsAccountingForFrames(allElements, appState, direction, shiftFunction) {
|
|
5575
5595
|
const elementsToMove = arrayToMap(
|
|
@@ -5930,6 +5950,7 @@ var duplicateElements2 = (elements, appState) => {
|
|
|
5930
5950
|
const newElements = [];
|
|
5931
5951
|
const oldElements = [];
|
|
5932
5952
|
const oldIdToDuplicatedId = /* @__PURE__ */ new Map();
|
|
5953
|
+
const duplicatedElementsMap = /* @__PURE__ */ new Map();
|
|
5933
5954
|
const duplicateAndOffsetElement = (element) => {
|
|
5934
5955
|
const newElement2 = duplicateElement(
|
|
5935
5956
|
appState.editingGroupId,
|
|
@@ -5940,6 +5961,7 @@ var duplicateElements2 = (elements, appState) => {
|
|
|
5940
5961
|
y: element.y + GRID_SIZE / 2
|
|
5941
5962
|
}
|
|
5942
5963
|
);
|
|
5964
|
+
duplicatedElementsMap.set(newElement2.id, newElement2);
|
|
5943
5965
|
oldIdToDuplicatedId.set(element.id, newElement2.id);
|
|
5944
5966
|
oldElements.push(element);
|
|
5945
5967
|
newElements.push(newElement2);
|
|
@@ -6031,6 +6053,7 @@ var duplicateElements2 = (elements, appState) => {
|
|
|
6031
6053
|
}
|
|
6032
6054
|
}
|
|
6033
6055
|
const finalElements = finalElementsReversed.reverse();
|
|
6056
|
+
syncMovedIndices(finalElements, arrayToMap([...oldElements, ...newElements]));
|
|
6034
6057
|
bindTextToShapeAfterDuplication(
|
|
6035
6058
|
elementsWithClones,
|
|
6036
6059
|
oldElements,
|
|
@@ -6077,7 +6100,7 @@ init_define_import_meta_env();
|
|
|
6077
6100
|
|
|
6078
6101
|
// analytics.ts
|
|
6079
6102
|
init_define_import_meta_env();
|
|
6080
|
-
var ALLOWED_CATEGORIES_TO_TRACK = ["ai"];
|
|
6103
|
+
var ALLOWED_CATEGORIES_TO_TRACK = ["ai", "command_palette"];
|
|
6081
6104
|
var trackEvent = (category, action, label, value) => {
|
|
6082
6105
|
try {
|
|
6083
6106
|
if (typeof window === "undefined" || define_import_meta_env_default.VITE_WORKER_ID || define_import_meta_env_default.PROD) {
|
|
@@ -9881,7 +9904,7 @@ var useCreatePortalContainer = (opts) => {
|
|
|
9881
9904
|
div.className = "";
|
|
9882
9905
|
div.classList.add("excalidraw", ...opts?.className?.split(/\s+/) || []);
|
|
9883
9906
|
div.classList.toggle("excalidraw--mobile", device.editor.isMobile);
|
|
9884
|
-
div.classList.toggle("theme--dark", theme ===
|
|
9907
|
+
div.classList.toggle("theme--dark", theme === THEME.DARK);
|
|
9885
9908
|
}
|
|
9886
9909
|
}, [div, theme, device.editor.isMobile, opts?.className]);
|
|
9887
9910
|
(0, import_react32.useLayoutEffect)(() => {
|
|
@@ -12127,7 +12150,7 @@ var actionZoomToFit = register({
|
|
|
12127
12150
|
var actionToggleTheme = register({
|
|
12128
12151
|
name: "toggleTheme",
|
|
12129
12152
|
label: (_, appState) => {
|
|
12130
|
-
return appState.theme ===
|
|
12153
|
+
return appState.theme === THEME.DARK ? "buttons.lightMode" : "buttons.darkMode";
|
|
12131
12154
|
},
|
|
12132
12155
|
keywords: ["toggle", "dark", "light", "mode", "theme"],
|
|
12133
12156
|
icon: (appState) => appState.theme === THEME.LIGHT ? MoonIcon : SunIcon,
|
|
@@ -12223,7 +12246,8 @@ var actionFinalize = register({
|
|
|
12223
12246
|
name: "finalize",
|
|
12224
12247
|
label: "",
|
|
12225
12248
|
trackEvent: false,
|
|
12226
|
-
perform: (elements, appState, _,
|
|
12249
|
+
perform: (elements, appState, _, app) => {
|
|
12250
|
+
const { interactiveCanvas, focusContainer, scene } = app;
|
|
12227
12251
|
const elementsMap = scene.getNonDeletedElementsMap();
|
|
12228
12252
|
if (appState.editingLinearElement) {
|
|
12229
12253
|
const { elementId, startBindingElement, endBindingElement } = appState.editingLinearElement;
|
|
@@ -12289,13 +12313,7 @@ var actionFinalize = register({
|
|
|
12289
12313
|
-1,
|
|
12290
12314
|
arrayToMap(elements)
|
|
12291
12315
|
);
|
|
12292
|
-
maybeBindLinearElement(
|
|
12293
|
-
multiPointElement,
|
|
12294
|
-
appState,
|
|
12295
|
-
Scene_default.getScene(multiPointElement),
|
|
12296
|
-
{ x: x3, y: y3 },
|
|
12297
|
-
elementsMap
|
|
12298
|
-
);
|
|
12316
|
+
maybeBindLinearElement(multiPointElement, appState, { x: x3, y: y3 }, app);
|
|
12299
12317
|
}
|
|
12300
12318
|
}
|
|
12301
12319
|
if (!appState.activeTool.locked && appState.activeTool.type !== "freedraw" || !multiPointElement) {
|
|
@@ -12401,7 +12419,7 @@ var ProjectName = (props) => {
|
|
|
12401
12419
|
init_define_import_meta_env();
|
|
12402
12420
|
var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
|
|
12403
12421
|
var DarkModeToggle = (props) => {
|
|
12404
|
-
const title = props.title || (props.value ===
|
|
12422
|
+
const title = props.title || (props.value === THEME.DARK ? t("buttons.lightMode") : t("buttons.darkMode"));
|
|
12405
12423
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
12406
12424
|
ToolButton,
|
|
12407
12425
|
{
|
|
@@ -12521,7 +12539,7 @@ var exportCanvas = async (type, elements, appState, files, {
|
|
|
12521
12539
|
let blob = canvasToBlob(tempCanvas);
|
|
12522
12540
|
if (appState.exportEmbedScene) {
|
|
12523
12541
|
blob = blob.then(
|
|
12524
|
-
(blob2) => import("./excalidraw-assets-dev/image-
|
|
12542
|
+
(blob2) => import("./excalidraw-assets-dev/image-JKT6GXZD.js").then(
|
|
12525
12543
|
({ encodePngMetadata }) => encodePngMetadata({
|
|
12526
12544
|
blob: blob2,
|
|
12527
12545
|
metadata: serializeAsJSON(elements, appState, files, "local")
|
|
@@ -13153,11 +13171,12 @@ var actionGroup = register({
|
|
|
13153
13171
|
const elementsBeforeGroup = nextElements.slice(0, lastGroupElementIndex).filter(
|
|
13154
13172
|
(updatedElement) => !isElementInGroup(updatedElement, newGroupId)
|
|
13155
13173
|
);
|
|
13156
|
-
|
|
13174
|
+
const reorderedElements = [
|
|
13157
13175
|
...elementsBeforeGroup,
|
|
13158
13176
|
...elementsInGroup,
|
|
13159
13177
|
...elementsAfterGroup
|
|
13160
13178
|
];
|
|
13179
|
+
syncMovedIndices(reorderedElements, arrayToMap(elementsInGroup));
|
|
13161
13180
|
return {
|
|
13162
13181
|
appState: {
|
|
13163
13182
|
...appState,
|
|
@@ -13167,7 +13186,7 @@ var actionGroup = register({
|
|
|
13167
13186
|
getNonDeletedElements(nextElements)
|
|
13168
13187
|
)
|
|
13169
13188
|
},
|
|
13170
|
-
elements:
|
|
13189
|
+
elements: reorderedElements,
|
|
13171
13190
|
commitToHistory: true
|
|
13172
13191
|
};
|
|
13173
13192
|
},
|
|
@@ -14088,7 +14107,8 @@ var actionFlipHorizontal = register({
|
|
|
14088
14107
|
elements,
|
|
14089
14108
|
app.scene.getNonDeletedElementsMap(),
|
|
14090
14109
|
appState,
|
|
14091
|
-
"horizontal"
|
|
14110
|
+
"horizontal",
|
|
14111
|
+
app
|
|
14092
14112
|
),
|
|
14093
14113
|
appState,
|
|
14094
14114
|
app
|
|
@@ -14111,7 +14131,8 @@ var actionFlipVertical = register({
|
|
|
14111
14131
|
elements,
|
|
14112
14132
|
app.scene.getNonDeletedElementsMap(),
|
|
14113
14133
|
appState,
|
|
14114
|
-
"vertical"
|
|
14134
|
+
"vertical",
|
|
14135
|
+
app
|
|
14115
14136
|
),
|
|
14116
14137
|
appState,
|
|
14117
14138
|
app
|
|
@@ -14122,7 +14143,7 @@ var actionFlipVertical = register({
|
|
|
14122
14143
|
},
|
|
14123
14144
|
keyTest: (event) => event.shiftKey && event.code === CODES.V && !event[KEYS.CTRL_OR_CMD]
|
|
14124
14145
|
});
|
|
14125
|
-
var flipSelectedElements = (elements, elementsMap, appState, flipDirection) => {
|
|
14146
|
+
var flipSelectedElements = (elements, elementsMap, appState, flipDirection, app) => {
|
|
14126
14147
|
const selectedElements = getSelectedElements(
|
|
14127
14148
|
getNonDeletedElements(elements),
|
|
14128
14149
|
appState,
|
|
@@ -14136,14 +14157,15 @@ var flipSelectedElements = (elements, elementsMap, appState, flipDirection) => {
|
|
|
14136
14157
|
elements,
|
|
14137
14158
|
elementsMap,
|
|
14138
14159
|
appState,
|
|
14139
|
-
flipDirection
|
|
14160
|
+
flipDirection,
|
|
14161
|
+
app
|
|
14140
14162
|
);
|
|
14141
14163
|
const updatedElementsMap = arrayToMap(updatedElements);
|
|
14142
14164
|
return elements.map(
|
|
14143
14165
|
(element) => updatedElementsMap.get(element.id) || element
|
|
14144
14166
|
);
|
|
14145
14167
|
};
|
|
14146
|
-
var flipElements = (selectedElements, elements, elementsMap, appState, flipDirection) => {
|
|
14168
|
+
var flipElements = (selectedElements, elements, elementsMap, appState, flipDirection, app) => {
|
|
14147
14169
|
const { minX, minY, maxX, maxY } = getCommonBoundingBox(selectedElements);
|
|
14148
14170
|
resizeMultipleElements(
|
|
14149
14171
|
elementsMap,
|
|
@@ -14154,7 +14176,7 @@ var flipElements = (selectedElements, elements, elementsMap, appState, flipDirec
|
|
|
14154
14176
|
flipDirection === "horizontal" ? maxX : minX,
|
|
14155
14177
|
flipDirection === "horizontal" ? minY : maxY
|
|
14156
14178
|
);
|
|
14157
|
-
isBindingEnabled(appState) ? bindOrUnbindSelectedElements(selectedElements,
|
|
14179
|
+
isBindingEnabled(appState) ? bindOrUnbindSelectedElements(selectedElements, app) : unbindLinearElements(selectedElements, elementsMap);
|
|
14158
14180
|
return selectedElements;
|
|
14159
14181
|
};
|
|
14160
14182
|
|
|
@@ -14612,6 +14634,7 @@ var pushTextAboveContainer = (elements, container, textElement) => {
|
|
|
14612
14634
|
(ele) => ele.id === container.id
|
|
14613
14635
|
);
|
|
14614
14636
|
updatedElements.splice(containerIndex + 1, 0, textElement);
|
|
14637
|
+
syncMovedIndices(updatedElements, arrayToMap([container, textElement]));
|
|
14615
14638
|
return updatedElements;
|
|
14616
14639
|
};
|
|
14617
14640
|
var pushContainerBelowText = (elements, container, textElement) => {
|
|
@@ -14624,6 +14647,7 @@ var pushContainerBelowText = (elements, container, textElement) => {
|
|
|
14624
14647
|
(ele) => ele.id === textElement.id
|
|
14625
14648
|
);
|
|
14626
14649
|
updatedElements.splice(textElementIndex, 0, container);
|
|
14650
|
+
syncMovedIndices(updatedElements, arrayToMap([container, textElement]));
|
|
14627
14651
|
return updatedElements;
|
|
14628
14652
|
};
|
|
14629
14653
|
var actionWrapTextInContainer = register({
|
|
@@ -15031,13 +15055,7 @@ var shouldHideLinkPopup = (element, elementsMap, appState, [clientX, clientY]) =
|
|
|
15031
15055
|
appState
|
|
15032
15056
|
);
|
|
15033
15057
|
const threshold = 15 / appState.zoom.value;
|
|
15034
|
-
if (
|
|
15035
|
-
element,
|
|
15036
|
-
elementsMap,
|
|
15037
|
-
[sceneX, sceneY],
|
|
15038
|
-
threshold,
|
|
15039
|
-
null
|
|
15040
|
-
)) {
|
|
15058
|
+
if (hitElementBoundingBox(sceneX, sceneY, element, elementsMap)) {
|
|
15041
15059
|
return false;
|
|
15042
15060
|
}
|
|
15043
15061
|
const [x1, y1, x22] = getElementAbsoluteCoords(element, elementsMap);
|
|
@@ -18039,8 +18057,8 @@ var shortcutMap = {
|
|
|
18039
18057
|
clearCanvas: [getShortcutKey("CtrlOrCmd+Delete")],
|
|
18040
18058
|
imageExport: [getShortcutKey("CtrlOrCmd+Shift+E")],
|
|
18041
18059
|
commandPalette: [
|
|
18042
|
-
getShortcutKey("CtrlOrCmd
|
|
18043
|
-
getShortcutKey("CtrlOrCmd
|
|
18060
|
+
getShortcutKey("CtrlOrCmd+/"),
|
|
18061
|
+
getShortcutKey("CtrlOrCmd+Shift+P")
|
|
18044
18062
|
],
|
|
18045
18063
|
cut: [getShortcutKey("CtrlOrCmd+X")],
|
|
18046
18064
|
copy: [getShortcutKey("CtrlOrCmd+C")],
|
|
@@ -18987,9 +19005,15 @@ var CommandPalette = Object.assign(
|
|
|
18987
19005
|
if (isCommandPaletteToggleShortcut(event)) {
|
|
18988
19006
|
event.preventDefault();
|
|
18989
19007
|
event.stopPropagation();
|
|
18990
|
-
setAppState((appState) =>
|
|
18991
|
-
|
|
18992
|
-
|
|
19008
|
+
setAppState((appState) => {
|
|
19009
|
+
const nextState = appState.openDialog?.name === "commandPalette" ? null : { name: "commandPalette" };
|
|
19010
|
+
if (nextState) {
|
|
19011
|
+
trackEvent("command_palette", "open", "shortcut");
|
|
19012
|
+
}
|
|
19013
|
+
return {
|
|
19014
|
+
openDialog: nextState
|
|
19015
|
+
};
|
|
19016
|
+
});
|
|
18993
19017
|
}
|
|
18994
19018
|
};
|
|
18995
19019
|
window.addEventListener("keydown" /* KEYDOWN */, commandPaletteShortcut, {
|
|
@@ -19019,10 +19043,13 @@ function CommandPaletteInner({
|
|
|
19019
19043
|
const [lastUsed, setLastUsed] = useAtom(lastUsedPaletteItem);
|
|
19020
19044
|
const [allCommands, setAllCommands] = (0, import_react69.useState)(null);
|
|
19021
19045
|
const inputRef = (0, import_react69.useRef)(null);
|
|
19046
|
+
const stableDeps = useStable({
|
|
19047
|
+
uiAppState,
|
|
19048
|
+
customCommandPaletteItems,
|
|
19049
|
+
appProps
|
|
19050
|
+
});
|
|
19022
19051
|
(0, import_react69.useEffect)(() => {
|
|
19023
|
-
|
|
19024
|
-
return;
|
|
19025
|
-
}
|
|
19052
|
+
const { uiAppState: uiAppState2, customCommandPaletteItems: customCommandPaletteItems2, appProps: appProps2 } = stableDeps;
|
|
19026
19053
|
const getActionLabel = (action) => {
|
|
19027
19054
|
let label = "";
|
|
19028
19055
|
if (action.label) {
|
|
@@ -19030,7 +19057,7 @@ function CommandPaletteInner({
|
|
|
19030
19057
|
label = t(
|
|
19031
19058
|
action.label(
|
|
19032
19059
|
app.scene.getNonDeletedElements(),
|
|
19033
|
-
|
|
19060
|
+
uiAppState2,
|
|
19034
19061
|
app
|
|
19035
19062
|
)
|
|
19036
19063
|
);
|
|
@@ -19042,7 +19069,7 @@ function CommandPaletteInner({
|
|
|
19042
19069
|
};
|
|
19043
19070
|
const getActionIcon = (action) => {
|
|
19044
19071
|
if (typeof action.icon === "function") {
|
|
19045
|
-
return action.icon(
|
|
19072
|
+
return action.icon(uiAppState2, app.scene.getNonDeletedElements());
|
|
19046
19073
|
}
|
|
19047
19074
|
return action.icon;
|
|
19048
19075
|
};
|
|
@@ -19062,7 +19089,7 @@ function CommandPaletteInner({
|
|
|
19062
19089
|
};
|
|
19063
19090
|
return transformer ? transformer(command, action) : command;
|
|
19064
19091
|
};
|
|
19065
|
-
if (
|
|
19092
|
+
if (uiAppState2 && app.scene && actionManager) {
|
|
19066
19093
|
const elementsCommands = [
|
|
19067
19094
|
actionManager.actions.group,
|
|
19068
19095
|
actionManager.actions.ungroup,
|
|
@@ -19096,7 +19123,7 @@ function CommandPaletteInner({
|
|
|
19096
19123
|
DEFAULT_CATEGORIES.elements,
|
|
19097
19124
|
(command, action2) => ({
|
|
19098
19125
|
...command,
|
|
19099
|
-
predicate: action2.predicate ? action2.predicate : (elements, appState,
|
|
19126
|
+
predicate: action2.predicate ? action2.predicate : (elements, appState, appProps3, app2) => {
|
|
19100
19127
|
const selectedElements = getSelectedElements(
|
|
19101
19128
|
elements,
|
|
19102
19129
|
appState
|
|
@@ -19175,7 +19202,7 @@ function CommandPaletteInner({
|
|
|
19175
19202
|
icon: LibraryIcon,
|
|
19176
19203
|
viewMode: false,
|
|
19177
19204
|
perform: () => {
|
|
19178
|
-
if (
|
|
19205
|
+
if (uiAppState2.openSidebar) {
|
|
19179
19206
|
setAppState({
|
|
19180
19207
|
openSidebar: null
|
|
19181
19208
|
});
|
|
@@ -19238,7 +19265,7 @@ function CommandPaletteInner({
|
|
|
19238
19265
|
},
|
|
19239
19266
|
...SHAPES.reduce((acc, shape) => {
|
|
19240
19267
|
const { value, icon, key, numericKey } = shape;
|
|
19241
|
-
if (
|
|
19268
|
+
if (appProps2.UIOptions.tools?.[value] === false) {
|
|
19242
19269
|
return acc;
|
|
19243
19270
|
}
|
|
19244
19271
|
const letter = key && capitalizeString(typeof key === "string" ? key : key[0]);
|
|
@@ -19268,7 +19295,7 @@ function CommandPaletteInner({
|
|
|
19268
19295
|
{
|
|
19269
19296
|
label: t("toolBar.lock"),
|
|
19270
19297
|
category: DEFAULT_CATEGORIES.tools,
|
|
19271
|
-
icon:
|
|
19298
|
+
icon: uiAppState2.activeTool.locked ? LockedIcon : UnlockedIcon,
|
|
19272
19299
|
shortcut: KEYS.Q.toLocaleUpperCase(),
|
|
19273
19300
|
viewMode: false,
|
|
19274
19301
|
perform: () => {
|
|
@@ -19280,7 +19307,7 @@ function CommandPaletteInner({
|
|
|
19280
19307
|
category: DEFAULT_CATEGORIES.tools,
|
|
19281
19308
|
icon: brainIconThin,
|
|
19282
19309
|
viewMode: false,
|
|
19283
|
-
predicate:
|
|
19310
|
+
predicate: appProps2.aiEnabled,
|
|
19284
19311
|
perform: () => {
|
|
19285
19312
|
setAppState((state) => ({
|
|
19286
19313
|
...state,
|
|
@@ -19296,7 +19323,7 @@ function CommandPaletteInner({
|
|
|
19296
19323
|
category: DEFAULT_CATEGORIES.tools,
|
|
19297
19324
|
icon: mermaidLogoIcon,
|
|
19298
19325
|
viewMode: false,
|
|
19299
|
-
predicate:
|
|
19326
|
+
predicate: appProps2.aiEnabled,
|
|
19300
19327
|
perform: () => {
|
|
19301
19328
|
setAppState((state) => ({
|
|
19302
19329
|
...state,
|
|
@@ -19321,7 +19348,7 @@ function CommandPaletteInner({
|
|
|
19321
19348
|
const allCommands2 = [
|
|
19322
19349
|
...commandsFromActions,
|
|
19323
19350
|
...additionalCommands,
|
|
19324
|
-
...
|
|
19351
|
+
...customCommandPaletteItems2 || []
|
|
19325
19352
|
].map((command) => {
|
|
19326
19353
|
return {
|
|
19327
19354
|
...command,
|
|
@@ -19336,15 +19363,13 @@ function CommandPaletteInner({
|
|
|
19336
19363
|
);
|
|
19337
19364
|
}
|
|
19338
19365
|
}, [
|
|
19366
|
+
stableDeps,
|
|
19339
19367
|
app,
|
|
19340
|
-
appProps,
|
|
19341
|
-
uiAppState,
|
|
19342
19368
|
actionManager,
|
|
19343
19369
|
setAllCommands,
|
|
19344
19370
|
lastUsed?.label,
|
|
19345
19371
|
setLastUsed,
|
|
19346
|
-
setAppState
|
|
19347
|
-
customCommandPaletteItems
|
|
19372
|
+
setAppState
|
|
19348
19373
|
]);
|
|
19349
19374
|
const [commandSearch, setCommandSearch] = (0, import_react69.useState)("");
|
|
19350
19375
|
const [currentCommand, setCurrentCommand] = (0, import_react69.useState)(null);
|
|
@@ -19696,6 +19721,7 @@ var writeData = (prevElements, appState, updater) => {
|
|
|
19696
19721
|
)
|
|
19697
19722
|
);
|
|
19698
19723
|
fixBindingsAfterDeletion(elements, deletedElements);
|
|
19724
|
+
syncInvalidIndices(elements);
|
|
19699
19725
|
return {
|
|
19700
19726
|
elements,
|
|
19701
19727
|
appState: { ...appState, ...data.appState },
|
|
@@ -20214,6 +20240,7 @@ var RadioGroup = function({
|
|
|
20214
20240
|
className: clsx_m_default("RadioGroup__choice", {
|
|
20215
20241
|
active: choice.value === value
|
|
20216
20242
|
}),
|
|
20243
|
+
title: choice.ariaLabel,
|
|
20217
20244
|
children: [
|
|
20218
20245
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
20219
20246
|
"input",
|
|
@@ -20221,13 +20248,14 @@ var RadioGroup = function({
|
|
|
20221
20248
|
name,
|
|
20222
20249
|
type: "radio",
|
|
20223
20250
|
checked: choice.value === value,
|
|
20224
|
-
onChange: () => onChange(choice.value)
|
|
20251
|
+
onChange: () => onChange(choice.value),
|
|
20252
|
+
"aria-label": choice.ariaLabel
|
|
20225
20253
|
}
|
|
20226
20254
|
),
|
|
20227
20255
|
choice.label
|
|
20228
20256
|
]
|
|
20229
20257
|
},
|
|
20230
|
-
choice.
|
|
20258
|
+
String(choice.value)
|
|
20231
20259
|
)) });
|
|
20232
20260
|
};
|
|
20233
20261
|
|
|
@@ -21254,8 +21282,8 @@ var Header = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { class
|
|
|
21254
21282
|
target: "_blank",
|
|
21255
21283
|
rel: "noopener noreferrer",
|
|
21256
21284
|
children: [
|
|
21257
|
-
|
|
21258
|
-
|
|
21285
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "HelpDialog__link-icon", children: ExternalLinkIcon }),
|
|
21286
|
+
t("helpDialog.documentation")
|
|
21259
21287
|
]
|
|
21260
21288
|
}
|
|
21261
21289
|
),
|
|
@@ -21267,8 +21295,8 @@ var Header = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { class
|
|
|
21267
21295
|
target: "_blank",
|
|
21268
21296
|
rel: "noopener noreferrer",
|
|
21269
21297
|
children: [
|
|
21270
|
-
|
|
21271
|
-
|
|
21298
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "HelpDialog__link-icon", children: ExternalLinkIcon }),
|
|
21299
|
+
t("helpDialog.blog")
|
|
21272
21300
|
]
|
|
21273
21301
|
}
|
|
21274
21302
|
),
|
|
@@ -21280,8 +21308,21 @@ var Header = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { class
|
|
|
21280
21308
|
target: "_blank",
|
|
21281
21309
|
rel: "noopener noreferrer",
|
|
21282
21310
|
children: [
|
|
21283
|
-
|
|
21284
|
-
|
|
21311
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "HelpDialog__link-icon", children: GithubIcon }),
|
|
21312
|
+
t("helpDialog.github")
|
|
21313
|
+
]
|
|
21314
|
+
}
|
|
21315
|
+
),
|
|
21316
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
21317
|
+
"a",
|
|
21318
|
+
{
|
|
21319
|
+
className: "HelpDialog__btn",
|
|
21320
|
+
href: "https://youtube.com/@excalidraw",
|
|
21321
|
+
target: "_blank",
|
|
21322
|
+
rel: "noopener noreferrer",
|
|
21323
|
+
children: [
|
|
21324
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "HelpDialog__link-icon", children: youtubeIcon }),
|
|
21325
|
+
"YouTube"
|
|
21285
21326
|
]
|
|
21286
21327
|
}
|
|
21287
21328
|
)
|
|
@@ -21596,7 +21637,7 @@ var HelpDialog = ({ onClose }) => {
|
|
|
21596
21637
|
Shortcut,
|
|
21597
21638
|
{
|
|
21598
21639
|
label: t("commandPalette.title"),
|
|
21599
|
-
shortcuts: [
|
|
21640
|
+
shortcuts: isFirefox ? [getShortcutFromShortcutName("commandPalette")] : [
|
|
21600
21641
|
getShortcutFromShortcutName("commandPalette"),
|
|
21601
21642
|
getShortcutFromShortcutName("commandPalette", 1)
|
|
21602
21643
|
]
|
|
@@ -23108,8 +23149,39 @@ async function openConfirmModal({
|
|
|
23108
23149
|
});
|
|
23109
23150
|
}
|
|
23110
23151
|
|
|
23111
|
-
// components/
|
|
23152
|
+
// components/dropdownMenu/DropdownMenuItemContentRadio.tsx
|
|
23153
|
+
init_define_import_meta_env();
|
|
23112
23154
|
var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1);
|
|
23155
|
+
var DropdownMenuItemContentRadio = ({
|
|
23156
|
+
value,
|
|
23157
|
+
shortcut,
|
|
23158
|
+
onChange,
|
|
23159
|
+
choices,
|
|
23160
|
+
children,
|
|
23161
|
+
name
|
|
23162
|
+
}) => {
|
|
23163
|
+
const device = useDevice();
|
|
23164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
|
|
23165
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "dropdown-menu-item-base dropdown-menu-item-bare", children: [
|
|
23166
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("label", { className: "dropdown-menu-item__text", htmlFor: name, children }),
|
|
23167
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
23168
|
+
RadioGroup,
|
|
23169
|
+
{
|
|
23170
|
+
name,
|
|
23171
|
+
value,
|
|
23172
|
+
onChange,
|
|
23173
|
+
choices
|
|
23174
|
+
}
|
|
23175
|
+
)
|
|
23176
|
+
] }),
|
|
23177
|
+
shortcut && !device.editor.isMobile && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "dropdown-menu-item__shortcut dropdown-menu-item__shortcut--orphaned", children: shortcut })
|
|
23178
|
+
] });
|
|
23179
|
+
};
|
|
23180
|
+
DropdownMenuItemContentRadio.displayName = "DropdownMenuItemContentRadio";
|
|
23181
|
+
var DropdownMenuItemContentRadio_default = DropdownMenuItemContentRadio;
|
|
23182
|
+
|
|
23183
|
+
// components/main-menu/DefaultItems.tsx
|
|
23184
|
+
var import_jsx_runtime98 = __toESM(require_jsx_runtime(), 1);
|
|
23113
23185
|
var LoadScene = () => {
|
|
23114
23186
|
const { t: t3 } = useI18n();
|
|
23115
23187
|
const actionManager = useExcalidrawActionManager();
|
|
@@ -23122,19 +23194,19 @@ var LoadScene = () => {
|
|
|
23122
23194
|
title: t3("overwriteConfirm.modal.loadFromFile.title"),
|
|
23123
23195
|
actionLabel: t3("overwriteConfirm.modal.loadFromFile.button"),
|
|
23124
23196
|
color: "warning",
|
|
23125
|
-
description: /* @__PURE__ */ (0,
|
|
23197
|
+
description: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
23126
23198
|
Trans_default,
|
|
23127
23199
|
{
|
|
23128
23200
|
i18nKey: "overwriteConfirm.modal.loadFromFile.description",
|
|
23129
|
-
bold: (text) => /* @__PURE__ */ (0,
|
|
23130
|
-
br: () => /* @__PURE__ */ (0,
|
|
23201
|
+
bold: (text) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("strong", { children: text }),
|
|
23202
|
+
br: () => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("br", {})
|
|
23131
23203
|
}
|
|
23132
23204
|
)
|
|
23133
23205
|
})) {
|
|
23134
23206
|
actionManager.executeAction(actionLoadScene);
|
|
23135
23207
|
}
|
|
23136
23208
|
};
|
|
23137
|
-
return /* @__PURE__ */ (0,
|
|
23209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
23138
23210
|
DropdownMenuItem_default,
|
|
23139
23211
|
{
|
|
23140
23212
|
icon: LoadIcon,
|
|
@@ -23153,7 +23225,7 @@ var SaveToActiveFile = () => {
|
|
|
23153
23225
|
if (!actionManager.isActionEnabled(actionSaveToActiveFile)) {
|
|
23154
23226
|
return null;
|
|
23155
23227
|
}
|
|
23156
|
-
return /* @__PURE__ */ (0,
|
|
23228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
23157
23229
|
DropdownMenuItem_default,
|
|
23158
23230
|
{
|
|
23159
23231
|
shortcut: getShortcutFromShortcutName("saveScene"),
|
|
@@ -23169,7 +23241,7 @@ SaveToActiveFile.displayName = "SaveToActiveFile";
|
|
|
23169
23241
|
var SaveAsImage = () => {
|
|
23170
23242
|
const setAppState = useExcalidrawSetAppState();
|
|
23171
23243
|
const { t: t3 } = useI18n();
|
|
23172
|
-
return /* @__PURE__ */ (0,
|
|
23244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
23173
23245
|
DropdownMenuItem_default,
|
|
23174
23246
|
{
|
|
23175
23247
|
icon: ExportImageIcon,
|
|
@@ -23182,17 +23254,21 @@ var SaveAsImage = () => {
|
|
|
23182
23254
|
);
|
|
23183
23255
|
};
|
|
23184
23256
|
SaveAsImage.displayName = "SaveAsImage";
|
|
23185
|
-
var CommandPalette2 = () => {
|
|
23257
|
+
var CommandPalette2 = (opts) => {
|
|
23186
23258
|
const setAppState = useExcalidrawSetAppState();
|
|
23187
23259
|
const { t: t3 } = useI18n();
|
|
23188
|
-
return /* @__PURE__ */ (0,
|
|
23260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
23189
23261
|
DropdownMenuItem_default,
|
|
23190
23262
|
{
|
|
23191
23263
|
icon: boltIcon,
|
|
23192
23264
|
"data-testid": "command-palette-button",
|
|
23193
|
-
onSelect: () =>
|
|
23265
|
+
onSelect: () => {
|
|
23266
|
+
trackEvent("command_palette", "open", "menu");
|
|
23267
|
+
setAppState({ openDialog: { name: "commandPalette" } });
|
|
23268
|
+
},
|
|
23194
23269
|
shortcut: getShortcutFromShortcutName("commandPalette"),
|
|
23195
23270
|
"aria-label": t3("commandPalette.title"),
|
|
23271
|
+
className: opts?.className,
|
|
23196
23272
|
children: t3("commandPalette.title")
|
|
23197
23273
|
}
|
|
23198
23274
|
);
|
|
@@ -23201,7 +23277,7 @@ CommandPalette2.displayName = "CommandPalette";
|
|
|
23201
23277
|
var Help = () => {
|
|
23202
23278
|
const { t: t3 } = useI18n();
|
|
23203
23279
|
const actionManager = useExcalidrawActionManager();
|
|
23204
|
-
return /* @__PURE__ */ (0,
|
|
23280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
23205
23281
|
DropdownMenuItem_default,
|
|
23206
23282
|
{
|
|
23207
23283
|
"data-testid": "help-menu-item",
|
|
@@ -23224,7 +23300,7 @@ var ClearCanvas = () => {
|
|
|
23224
23300
|
if (!actionManager.isActionEnabled(actionClearCanvas)) {
|
|
23225
23301
|
return null;
|
|
23226
23302
|
}
|
|
23227
|
-
return /* @__PURE__ */ (0,
|
|
23303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
23228
23304
|
DropdownMenuItem_default,
|
|
23229
23305
|
{
|
|
23230
23306
|
icon: TrashIcon,
|
|
@@ -23236,25 +23312,60 @@ var ClearCanvas = () => {
|
|
|
23236
23312
|
);
|
|
23237
23313
|
};
|
|
23238
23314
|
ClearCanvas.displayName = "ClearCanvas";
|
|
23239
|
-
var ToggleTheme = () => {
|
|
23315
|
+
var ToggleTheme = (props) => {
|
|
23240
23316
|
const { t: t3 } = useI18n();
|
|
23241
23317
|
const appState = useUIAppState();
|
|
23242
23318
|
const actionManager = useExcalidrawActionManager();
|
|
23319
|
+
const shortcut = getShortcutFromShortcutName("toggleTheme");
|
|
23243
23320
|
if (!actionManager.isActionEnabled(actionToggleTheme)) {
|
|
23244
23321
|
return null;
|
|
23245
23322
|
}
|
|
23246
|
-
|
|
23323
|
+
if (props?.allowSystemTheme) {
|
|
23324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
23325
|
+
DropdownMenuItemContentRadio_default,
|
|
23326
|
+
{
|
|
23327
|
+
name: "theme",
|
|
23328
|
+
value: props.theme,
|
|
23329
|
+
onChange: (value) => props.onSelect(value),
|
|
23330
|
+
choices: [
|
|
23331
|
+
{
|
|
23332
|
+
value: THEME.LIGHT,
|
|
23333
|
+
label: SunIcon,
|
|
23334
|
+
ariaLabel: `${t3("buttons.lightMode")} - ${shortcut}`
|
|
23335
|
+
},
|
|
23336
|
+
{
|
|
23337
|
+
value: THEME.DARK,
|
|
23338
|
+
label: MoonIcon,
|
|
23339
|
+
ariaLabel: `${t3("buttons.darkMode")} - ${shortcut}`
|
|
23340
|
+
},
|
|
23341
|
+
{
|
|
23342
|
+
value: "system",
|
|
23343
|
+
label: DeviceDesktopIcon,
|
|
23344
|
+
ariaLabel: t3("buttons.systemMode")
|
|
23345
|
+
}
|
|
23346
|
+
],
|
|
23347
|
+
children: t3("labels.theme")
|
|
23348
|
+
}
|
|
23349
|
+
);
|
|
23350
|
+
}
|
|
23351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
23247
23352
|
DropdownMenuItem_default,
|
|
23248
23353
|
{
|
|
23249
23354
|
onSelect: (event) => {
|
|
23250
23355
|
event.preventDefault();
|
|
23251
|
-
|
|
23356
|
+
if (props?.onSelect) {
|
|
23357
|
+
props.onSelect(
|
|
23358
|
+
appState.theme === THEME.DARK ? THEME.LIGHT : THEME.DARK
|
|
23359
|
+
);
|
|
23360
|
+
} else {
|
|
23361
|
+
return actionManager.executeAction(actionToggleTheme);
|
|
23362
|
+
}
|
|
23252
23363
|
},
|
|
23253
|
-
icon: appState.theme ===
|
|
23364
|
+
icon: appState.theme === THEME.DARK ? SunIcon : MoonIcon,
|
|
23254
23365
|
"data-testid": "toggle-dark-mode",
|
|
23255
|
-
shortcut
|
|
23256
|
-
"aria-label": appState.theme ===
|
|
23257
|
-
children: appState.theme ===
|
|
23366
|
+
shortcut,
|
|
23367
|
+
"aria-label": appState.theme === THEME.DARK ? t3("buttons.lightMode") : t3("buttons.darkMode"),
|
|
23368
|
+
children: appState.theme === THEME.DARK ? t3("buttons.lightMode") : t3("buttons.darkMode")
|
|
23258
23369
|
}
|
|
23259
23370
|
);
|
|
23260
23371
|
};
|
|
@@ -23267,8 +23378,8 @@ var ChangeCanvasBackground = () => {
|
|
|
23267
23378
|
if (appState.viewModeEnabled || !appProps.UIOptions.canvasActions.changeViewBackgroundColor) {
|
|
23268
23379
|
return null;
|
|
23269
23380
|
}
|
|
23270
|
-
return /* @__PURE__ */ (0,
|
|
23271
|
-
/* @__PURE__ */ (0,
|
|
23381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { style: { marginTop: "0.5rem" }, children: [
|
|
23382
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
23272
23383
|
"div",
|
|
23273
23384
|
{
|
|
23274
23385
|
"data-testid": "canvas-background-label",
|
|
@@ -23276,14 +23387,14 @@ var ChangeCanvasBackground = () => {
|
|
|
23276
23387
|
children: t3("labels.canvasBackground")
|
|
23277
23388
|
}
|
|
23278
23389
|
),
|
|
23279
|
-
/* @__PURE__ */ (0,
|
|
23390
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { style: { padding: "0 0.625rem" }, children: actionManager.renderAction("changeViewBackgroundColor") })
|
|
23280
23391
|
] });
|
|
23281
23392
|
};
|
|
23282
23393
|
ChangeCanvasBackground.displayName = "ChangeCanvasBackground";
|
|
23283
23394
|
var Export = () => {
|
|
23284
23395
|
const { t: t3 } = useI18n();
|
|
23285
23396
|
const setAppState = useExcalidrawSetAppState();
|
|
23286
|
-
return /* @__PURE__ */ (0,
|
|
23397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
23287
23398
|
DropdownMenuItem_default,
|
|
23288
23399
|
{
|
|
23289
23400
|
icon: ExportIcon,
|
|
@@ -23299,8 +23410,8 @@ var Export = () => {
|
|
|
23299
23410
|
Export.displayName = "Export";
|
|
23300
23411
|
var Socials = () => {
|
|
23301
23412
|
const { t: t3 } = useI18n();
|
|
23302
|
-
return /* @__PURE__ */ (0,
|
|
23303
|
-
/* @__PURE__ */ (0,
|
|
23413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_jsx_runtime98.Fragment, { children: [
|
|
23414
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
23304
23415
|
DropdownMenuItemLink_default,
|
|
23305
23416
|
{
|
|
23306
23417
|
icon: GithubIcon,
|
|
@@ -23309,7 +23420,7 @@ var Socials = () => {
|
|
|
23309
23420
|
children: "GitHub"
|
|
23310
23421
|
}
|
|
23311
23422
|
),
|
|
23312
|
-
/* @__PURE__ */ (0,
|
|
23423
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
23313
23424
|
DropdownMenuItemLink_default,
|
|
23314
23425
|
{
|
|
23315
23426
|
icon: XBrandIcon,
|
|
@@ -23318,7 +23429,7 @@ var Socials = () => {
|
|
|
23318
23429
|
children: t3("labels.followUs")
|
|
23319
23430
|
}
|
|
23320
23431
|
),
|
|
23321
|
-
/* @__PURE__ */ (0,
|
|
23432
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
23322
23433
|
DropdownMenuItemLink_default,
|
|
23323
23434
|
{
|
|
23324
23435
|
icon: DiscordIcon,
|
|
@@ -23335,7 +23446,7 @@ var LiveCollaborationTrigger = ({
|
|
|
23335
23446
|
isCollaborating
|
|
23336
23447
|
}) => {
|
|
23337
23448
|
const { t: t3 } = useI18n();
|
|
23338
|
-
return /* @__PURE__ */ (0,
|
|
23449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
23339
23450
|
DropdownMenuItem_default,
|
|
23340
23451
|
{
|
|
23341
23452
|
"data-testid": "collab-button",
|
|
@@ -23353,7 +23464,7 @@ LiveCollaborationTrigger.displayName = "LiveCollaborationTrigger";
|
|
|
23353
23464
|
// components/hoc/withInternalFallback.tsx
|
|
23354
23465
|
init_define_import_meta_env();
|
|
23355
23466
|
var import_react86 = __toESM(require_react(), 1);
|
|
23356
|
-
var
|
|
23467
|
+
var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1);
|
|
23357
23468
|
var withInternalFallback = (componentName, Component) => {
|
|
23358
23469
|
const renderAtom = atom2(0);
|
|
23359
23470
|
const WrapperComponent = (props) => {
|
|
@@ -23396,14 +23507,14 @@ var withInternalFallback = (componentName, Component) => {
|
|
|
23396
23507
|
) {
|
|
23397
23508
|
return null;
|
|
23398
23509
|
}
|
|
23399
|
-
return /* @__PURE__ */ (0,
|
|
23510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Component, { ...props });
|
|
23400
23511
|
};
|
|
23401
23512
|
WrapperComponent.displayName = componentName;
|
|
23402
23513
|
return WrapperComponent;
|
|
23403
23514
|
};
|
|
23404
23515
|
|
|
23405
23516
|
// components/main-menu/MainMenu.tsx
|
|
23406
|
-
var
|
|
23517
|
+
var import_jsx_runtime100 = __toESM(require_jsx_runtime(), 1);
|
|
23407
23518
|
var MainMenu = Object.assign(
|
|
23408
23519
|
withInternalFallback(
|
|
23409
23520
|
"MainMenu",
|
|
@@ -23416,8 +23527,8 @@ var MainMenu = Object.assign(
|
|
|
23416
23527
|
const appState = useUIAppState();
|
|
23417
23528
|
const setAppState = useExcalidrawSetAppState();
|
|
23418
23529
|
const onClickOutside = device.editor.isMobile ? void 0 : () => setAppState({ openMenu: null });
|
|
23419
|
-
return /* @__PURE__ */ (0,
|
|
23420
|
-
/* @__PURE__ */ (0,
|
|
23530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(MainMenuTunnel.In, { children: /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(DropdownMenu_default, { open: appState.openMenu === "canvas", children: [
|
|
23531
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
23421
23532
|
DropdownMenu_default.Trigger,
|
|
23422
23533
|
{
|
|
23423
23534
|
onToggle: () => {
|
|
@@ -23430,7 +23541,7 @@ var MainMenu = Object.assign(
|
|
|
23430
23541
|
children: HamburgerMenuIcon
|
|
23431
23542
|
}
|
|
23432
23543
|
),
|
|
23433
|
-
/* @__PURE__ */ (0,
|
|
23544
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
|
|
23434
23545
|
DropdownMenu_default.Content,
|
|
23435
23546
|
{
|
|
23436
23547
|
onClickOutside,
|
|
@@ -23439,9 +23550,9 @@ var MainMenu = Object.assign(
|
|
|
23439
23550
|
}),
|
|
23440
23551
|
children: [
|
|
23441
23552
|
children,
|
|
23442
|
-
device.editor.isMobile && appState.collaborators.size > 0 && /* @__PURE__ */ (0,
|
|
23443
|
-
/* @__PURE__ */ (0,
|
|
23444
|
-
/* @__PURE__ */ (0,
|
|
23553
|
+
device.editor.isMobile && appState.collaborators.size > 0 && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("fieldset", { className: "UserList-Wrapper", children: [
|
|
23554
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)("legend", { children: t("labels.collaborators") }),
|
|
23555
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
23445
23556
|
UserList,
|
|
23446
23557
|
{
|
|
23447
23558
|
mobile: true,
|
|
@@ -23473,17 +23584,17 @@ init_define_import_meta_env();
|
|
|
23473
23584
|
|
|
23474
23585
|
// components/OverwriteConfirm/OverwriteConfirmActions.tsx
|
|
23475
23586
|
init_define_import_meta_env();
|
|
23476
|
-
var
|
|
23587
|
+
var import_jsx_runtime101 = __toESM(require_jsx_runtime(), 1);
|
|
23477
23588
|
var Action = ({
|
|
23478
23589
|
title,
|
|
23479
23590
|
children,
|
|
23480
23591
|
actionLabel,
|
|
23481
23592
|
onClick
|
|
23482
23593
|
}) => {
|
|
23483
|
-
return /* @__PURE__ */ (0,
|
|
23484
|
-
/* @__PURE__ */ (0,
|
|
23485
|
-
/* @__PURE__ */ (0,
|
|
23486
|
-
/* @__PURE__ */ (0,
|
|
23594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "OverwriteConfirm__Actions__Action", children: [
|
|
23595
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("h4", { children: title }),
|
|
23596
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "OverwriteConfirm__Actions__Action__content", children }),
|
|
23597
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
23487
23598
|
FilledButton,
|
|
23488
23599
|
{
|
|
23489
23600
|
variant: "outlined",
|
|
@@ -23500,7 +23611,7 @@ var ExportToImage = () => {
|
|
|
23500
23611
|
const { t: t3 } = useI18n();
|
|
23501
23612
|
const actionManager = useExcalidrawActionManager();
|
|
23502
23613
|
const setAppState = useExcalidrawSetAppState();
|
|
23503
|
-
return /* @__PURE__ */ (0,
|
|
23614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
23504
23615
|
Action,
|
|
23505
23616
|
{
|
|
23506
23617
|
title: t3("overwriteConfirm.action.exportToImage.title"),
|
|
@@ -23516,7 +23627,7 @@ var ExportToImage = () => {
|
|
|
23516
23627
|
var SaveToDisk = () => {
|
|
23517
23628
|
const { t: t3 } = useI18n();
|
|
23518
23629
|
const actionManager = useExcalidrawActionManager();
|
|
23519
|
-
return /* @__PURE__ */ (0,
|
|
23630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
23520
23631
|
Action,
|
|
23521
23632
|
{
|
|
23522
23633
|
title: t3("overwriteConfirm.action.saveToDisk.title"),
|
|
@@ -23530,7 +23641,7 @@ var SaveToDisk = () => {
|
|
|
23530
23641
|
};
|
|
23531
23642
|
var Actions = Object.assign(
|
|
23532
23643
|
({ children }) => {
|
|
23533
|
-
return /* @__PURE__ */ (0,
|
|
23644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "OverwriteConfirm__Actions", children });
|
|
23534
23645
|
},
|
|
23535
23646
|
{
|
|
23536
23647
|
ExportToImage,
|
|
@@ -23539,7 +23650,7 @@ var Actions = Object.assign(
|
|
|
23539
23650
|
);
|
|
23540
23651
|
|
|
23541
23652
|
// components/OverwriteConfirm/OverwriteConfirm.tsx
|
|
23542
|
-
var
|
|
23653
|
+
var import_jsx_runtime102 = __toESM(require_jsx_runtime(), 1);
|
|
23543
23654
|
var OverwriteConfirmDialog = Object.assign(
|
|
23544
23655
|
withInternalFallback(
|
|
23545
23656
|
"OverwriteConfirmDialog",
|
|
@@ -23560,17 +23671,17 @@ var OverwriteConfirmDialog = Object.assign(
|
|
|
23560
23671
|
overwriteConfirmState.onConfirm();
|
|
23561
23672
|
setState((state) => ({ ...state, active: false }));
|
|
23562
23673
|
};
|
|
23563
|
-
return /* @__PURE__ */ (0,
|
|
23564
|
-
/* @__PURE__ */ (0,
|
|
23565
|
-
/* @__PURE__ */ (0,
|
|
23674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(OverwriteConfirmDialogTunnel.In, { children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Dialog, { onCloseRequest: handleClose, title: false, size: 916, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "OverwriteConfirm", children: [
|
|
23675
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("h3", { children: overwriteConfirmState.title }),
|
|
23676
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
|
|
23566
23677
|
"div",
|
|
23567
23678
|
{
|
|
23568
23679
|
className: `OverwriteConfirm__Description OverwriteConfirm__Description--color-${overwriteConfirmState.color}`,
|
|
23569
23680
|
children: [
|
|
23570
|
-
/* @__PURE__ */ (0,
|
|
23571
|
-
/* @__PURE__ */ (0,
|
|
23572
|
-
/* @__PURE__ */ (0,
|
|
23573
|
-
/* @__PURE__ */ (0,
|
|
23681
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "OverwriteConfirm__Description__icon", children: alertTriangleIcon }),
|
|
23682
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { children: overwriteConfirmState.description }),
|
|
23683
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "OverwriteConfirm__Description__spacer" }),
|
|
23684
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
23574
23685
|
FilledButton,
|
|
23575
23686
|
{
|
|
23576
23687
|
color: overwriteConfirmState.color,
|
|
@@ -23582,7 +23693,7 @@ var OverwriteConfirmDialog = Object.assign(
|
|
|
23582
23693
|
]
|
|
23583
23694
|
}
|
|
23584
23695
|
),
|
|
23585
|
-
/* @__PURE__ */ (0,
|
|
23696
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Actions, { children })
|
|
23586
23697
|
] }) }) });
|
|
23587
23698
|
}
|
|
23588
23699
|
),
|
|
@@ -23594,13 +23705,13 @@ var OverwriteConfirmDialog = Object.assign(
|
|
|
23594
23705
|
|
|
23595
23706
|
// components/DefaultSidebar.tsx
|
|
23596
23707
|
init_define_import_meta_env();
|
|
23597
|
-
var
|
|
23708
|
+
var import_jsx_runtime103 = __toESM(require_jsx_runtime(), 1);
|
|
23598
23709
|
var import_react87 = __toESM(require_react(), 1);
|
|
23599
23710
|
var DefaultSidebarTrigger = withInternalFallback(
|
|
23600
23711
|
"DefaultSidebarTrigger",
|
|
23601
23712
|
(props) => {
|
|
23602
23713
|
const { DefaultSidebarTriggerTunnel } = useTunnels();
|
|
23603
|
-
return /* @__PURE__ */ (0,
|
|
23714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(DefaultSidebarTriggerTunnel.In, { children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
23604
23715
|
Sidebar.Trigger,
|
|
23605
23716
|
{
|
|
23606
23717
|
...props,
|
|
@@ -23616,7 +23727,7 @@ var DefaultTabTriggers = ({
|
|
|
23616
23727
|
...rest
|
|
23617
23728
|
}) => {
|
|
23618
23729
|
const { DefaultSidebarTabTriggersTunnel } = useTunnels();
|
|
23619
|
-
return /* @__PURE__ */ (0,
|
|
23730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(DefaultSidebarTabTriggersTunnel.In, { children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Sidebar.TabTriggers, { ...rest, children }) });
|
|
23620
23731
|
};
|
|
23621
23732
|
DefaultTabTriggers.displayName = "DefaultTabTriggers";
|
|
23622
23733
|
var DefaultSidebar = Object.assign(
|
|
@@ -23651,9 +23762,9 @@ var DefaultSidebar = Object.assign(
|
|
|
23651
23762
|
)
|
|
23652
23763
|
)
|
|
23653
23764
|
},
|
|
23654
|
-
/* @__PURE__ */ (0,
|
|
23655
|
-
/* @__PURE__ */ (0,
|
|
23656
|
-
rest.__fallback && /* @__PURE__ */ (0,
|
|
23765
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(Sidebar.Tabs, { children: [
|
|
23766
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(Sidebar.Header, { children: [
|
|
23767
|
+
rest.__fallback && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
23657
23768
|
"div",
|
|
23658
23769
|
{
|
|
23659
23770
|
style: {
|
|
@@ -23668,9 +23779,9 @@ var DefaultSidebar = Object.assign(
|
|
|
23668
23779
|
children: t("toolBar.library")
|
|
23669
23780
|
}
|
|
23670
23781
|
),
|
|
23671
|
-
/* @__PURE__ */ (0,
|
|
23782
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(DefaultSidebarTabTriggersTunnel.Out, {})
|
|
23672
23783
|
] }),
|
|
23673
|
-
/* @__PURE__ */ (0,
|
|
23784
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Sidebar.Tab, { tab: LIBRARY_SIDEBAR_TAB, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(LibraryMenu, {}) }),
|
|
23674
23785
|
children
|
|
23675
23786
|
] })
|
|
23676
23787
|
);
|
|
@@ -23684,10 +23795,10 @@ var DefaultSidebar = Object.assign(
|
|
|
23684
23795
|
|
|
23685
23796
|
// components/LaserPointerButton.tsx
|
|
23686
23797
|
init_define_import_meta_env();
|
|
23687
|
-
var
|
|
23798
|
+
var import_jsx_runtime104 = __toESM(require_jsx_runtime(), 1);
|
|
23688
23799
|
var DEFAULT_SIZE3 = "small";
|
|
23689
23800
|
var LaserPointerButton = (props) => {
|
|
23690
|
-
return /* @__PURE__ */ (0,
|
|
23801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
23691
23802
|
"label",
|
|
23692
23803
|
{
|
|
23693
23804
|
className: clsx_m_default(
|
|
@@ -23699,7 +23810,7 @@ var LaserPointerButton = (props) => {
|
|
|
23699
23810
|
),
|
|
23700
23811
|
title: `${props.title}`,
|
|
23701
23812
|
children: [
|
|
23702
|
-
/* @__PURE__ */ (0,
|
|
23813
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
23703
23814
|
"input",
|
|
23704
23815
|
{
|
|
23705
23816
|
className: "ToolIcon_type_checkbox",
|
|
@@ -23711,7 +23822,7 @@ var LaserPointerButton = (props) => {
|
|
|
23711
23822
|
"data-testid": "toolbar-LaserPointer"
|
|
23712
23823
|
}
|
|
23713
23824
|
),
|
|
23714
|
-
/* @__PURE__ */ (0,
|
|
23825
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "ToolIcon__icon", children: laserPointerToolIcon })
|
|
23715
23826
|
]
|
|
23716
23827
|
}
|
|
23717
23828
|
);
|
|
@@ -23723,20 +23834,20 @@ var import_react89 = __toESM(require_react(), 1);
|
|
|
23723
23834
|
|
|
23724
23835
|
// components/Paragraph.tsx
|
|
23725
23836
|
init_define_import_meta_env();
|
|
23726
|
-
var
|
|
23837
|
+
var import_jsx_runtime105 = __toESM(require_jsx_runtime(), 1);
|
|
23727
23838
|
var Paragraph = (props) => {
|
|
23728
|
-
return /* @__PURE__ */ (0,
|
|
23839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("p", { className: "excalidraw__paragraph", style: props.style, children: props.children });
|
|
23729
23840
|
};
|
|
23730
23841
|
|
|
23731
23842
|
// components/TTDDialog/TTDDialogTabs.tsx
|
|
23732
23843
|
init_define_import_meta_env();
|
|
23733
23844
|
var import_react88 = __toESM(require_react(), 1);
|
|
23734
|
-
var
|
|
23845
|
+
var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1);
|
|
23735
23846
|
var TTDDialogTabs = (props) => {
|
|
23736
23847
|
const setAppState = useExcalidrawSetAppState();
|
|
23737
23848
|
const rootRef = (0, import_react88.useRef)(null);
|
|
23738
23849
|
const minHeightRef = (0, import_react88.useRef)(0);
|
|
23739
|
-
return /* @__PURE__ */ (0,
|
|
23850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
23740
23851
|
$69cb30bb0017df05$export$be92b6f5f03c0fe9,
|
|
23741
23852
|
{
|
|
23742
23853
|
ref: rootRef,
|
|
@@ -23773,18 +23884,18 @@ var TTDDialogTabs_default = TTDDialogTabs;
|
|
|
23773
23884
|
|
|
23774
23885
|
// components/TTDDialog/TTDDialogTab.tsx
|
|
23775
23886
|
init_define_import_meta_env();
|
|
23776
|
-
var
|
|
23887
|
+
var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1);
|
|
23777
23888
|
var TTDDialogTab = ({
|
|
23778
23889
|
tab,
|
|
23779
23890
|
children,
|
|
23780
23891
|
...rest
|
|
23781
23892
|
}) => {
|
|
23782
|
-
return /* @__PURE__ */ (0,
|
|
23893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)($69cb30bb0017df05$export$7c6e2c02157bb7d2, { ...rest, value: tab, children });
|
|
23783
23894
|
};
|
|
23784
23895
|
TTDDialogTab.displayName = "TTDDialogTab";
|
|
23785
23896
|
|
|
23786
23897
|
// components/MagicSettings.tsx
|
|
23787
|
-
var
|
|
23898
|
+
var import_jsx_runtime108 = __toESM(require_jsx_runtime(), 1);
|
|
23788
23899
|
var MagicSettings = (props) => {
|
|
23789
23900
|
const [keyInputValue, setKeyInputValue] = (0, import_react89.useState)(props.openAIKey || "");
|
|
23790
23901
|
const [shouldPersist, setShouldPersist] = (0, import_react89.useState)(
|
|
@@ -23797,17 +23908,17 @@ var MagicSettings = (props) => {
|
|
|
23797
23908
|
if (appState.openDialog?.name !== "settings") {
|
|
23798
23909
|
return null;
|
|
23799
23910
|
}
|
|
23800
|
-
return /* @__PURE__ */ (0,
|
|
23911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
23801
23912
|
Dialog,
|
|
23802
23913
|
{
|
|
23803
23914
|
onCloseRequest: () => {
|
|
23804
23915
|
props.onClose();
|
|
23805
23916
|
props.onConfirm(keyInputValue.trim(), shouldPersist);
|
|
23806
23917
|
},
|
|
23807
|
-
title: /* @__PURE__ */ (0,
|
|
23918
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { style: { display: "flex" }, children: [
|
|
23808
23919
|
"Wireframe to Code (AI)",
|
|
23809
23920
|
" ",
|
|
23810
|
-
/* @__PURE__ */ (0,
|
|
23921
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
23811
23922
|
"div",
|
|
23812
23923
|
{
|
|
23813
23924
|
style: {
|
|
@@ -23827,21 +23938,21 @@ var MagicSettings = (props) => {
|
|
|
23827
23938
|
] }),
|
|
23828
23939
|
className: "MagicSettings",
|
|
23829
23940
|
autofocus: false,
|
|
23830
|
-
children: /* @__PURE__ */ (0,
|
|
23941
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(TTDDialogTabs_default, { dialog: "settings", tab: appState.openDialog.tab, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
23831
23942
|
TTDDialogTab,
|
|
23832
23943
|
{
|
|
23833
23944
|
tab: "diagram-to-code",
|
|
23834
23945
|
children: [
|
|
23835
|
-
/* @__PURE__ */ (0,
|
|
23946
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Paragraph, { children: [
|
|
23836
23947
|
"For the diagram-to-code feature we use",
|
|
23837
23948
|
" ",
|
|
23838
|
-
/* @__PURE__ */ (0,
|
|
23949
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(InlineIcon, { icon: OpenAIIcon }),
|
|
23839
23950
|
"OpenAI."
|
|
23840
23951
|
] }),
|
|
23841
|
-
/* @__PURE__ */ (0,
|
|
23952
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Paragraph, { children: [
|
|
23842
23953
|
"While the OpenAI API is in beta, its use is strictly limited \u2014 as such we require you use your own API key. You can create an",
|
|
23843
23954
|
" ",
|
|
23844
|
-
/* @__PURE__ */ (0,
|
|
23955
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
23845
23956
|
"a",
|
|
23846
23957
|
{
|
|
23847
23958
|
href: "https://platform.openai.com/login?launch",
|
|
@@ -23852,7 +23963,7 @@ var MagicSettings = (props) => {
|
|
|
23852
23963
|
),
|
|
23853
23964
|
", add a small credit (5 USD minimum), and",
|
|
23854
23965
|
" ",
|
|
23855
|
-
/* @__PURE__ */ (0,
|
|
23966
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
23856
23967
|
"a",
|
|
23857
23968
|
{
|
|
23858
23969
|
href: "https://platform.openai.com/api-keys",
|
|
@@ -23863,8 +23974,8 @@ var MagicSettings = (props) => {
|
|
|
23863
23974
|
),
|
|
23864
23975
|
"."
|
|
23865
23976
|
] }),
|
|
23866
|
-
/* @__PURE__ */ (0,
|
|
23867
|
-
/* @__PURE__ */ (0,
|
|
23977
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Paragraph, { children: "Your OpenAI key does not leave the browser, and you can also set your own limit in your OpenAI account dashboard if needed." }),
|
|
23978
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
23868
23979
|
TextField,
|
|
23869
23980
|
{
|
|
23870
23981
|
isRedacted: true,
|
|
@@ -23879,20 +23990,20 @@ var MagicSettings = (props) => {
|
|
|
23879
23990
|
onKeyDown: (event) => event.key === KEYS.ENTER && onConfirm()
|
|
23880
23991
|
}
|
|
23881
23992
|
),
|
|
23882
|
-
/* @__PURE__ */ (0,
|
|
23883
|
-
/* @__PURE__ */ (0,
|
|
23884
|
-
/* @__PURE__ */ (0,
|
|
23993
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Paragraph, { children: "By default, your API token is not persisted anywhere so you'll need to insert it again after reload. But, you can persist locally in your browser below." }),
|
|
23994
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(CheckboxItem, { checked: shouldPersist, onChange: setShouldPersist, children: "Persist API key in browser storage" }),
|
|
23995
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Paragraph, { children: [
|
|
23885
23996
|
"Once API key is set, you can use the ",
|
|
23886
|
-
/* @__PURE__ */ (0,
|
|
23997
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(InlineIcon, { icon: MagicIcon }),
|
|
23887
23998
|
" ",
|
|
23888
23999
|
"tool to wrap your elements in a frame that will then allow you to turn it into code. This dialog can be accessed using the",
|
|
23889
24000
|
" ",
|
|
23890
|
-
/* @__PURE__ */ (0,
|
|
24001
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("b", { children: "AI Settings" }),
|
|
23891
24002
|
" ",
|
|
23892
|
-
/* @__PURE__ */ (0,
|
|
24003
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(InlineIcon, { icon: OpenAIIcon }),
|
|
23893
24004
|
"."
|
|
23894
24005
|
] }),
|
|
23895
|
-
/* @__PURE__ */ (0,
|
|
24006
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
23896
24007
|
FilledButton,
|
|
23897
24008
|
{
|
|
23898
24009
|
className: "MagicSettings__confirm",
|
|
@@ -24026,14 +24137,14 @@ var insertToEditor = ({
|
|
|
24026
24137
|
|
|
24027
24138
|
// components/TTDDialog/TTDDialogPanels.tsx
|
|
24028
24139
|
init_define_import_meta_env();
|
|
24029
|
-
var
|
|
24140
|
+
var import_jsx_runtime109 = __toESM(require_jsx_runtime(), 1);
|
|
24030
24141
|
var TTDDialogPanels = ({ children }) => {
|
|
24031
|
-
return /* @__PURE__ */ (0,
|
|
24142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "ttd-dialog-panels", children });
|
|
24032
24143
|
};
|
|
24033
24144
|
|
|
24034
24145
|
// components/TTDDialog/TTDDialogPanel.tsx
|
|
24035
24146
|
init_define_import_meta_env();
|
|
24036
|
-
var
|
|
24147
|
+
var import_jsx_runtime110 = __toESM(require_jsx_runtime(), 1);
|
|
24037
24148
|
var TTDDialogPanel = ({
|
|
24038
24149
|
label,
|
|
24039
24150
|
children,
|
|
@@ -24044,13 +24155,13 @@ var TTDDialogPanel = ({
|
|
|
24044
24155
|
renderSubmitShortcut,
|
|
24045
24156
|
renderBottomRight
|
|
24046
24157
|
}) => {
|
|
24047
|
-
return /* @__PURE__ */ (0,
|
|
24048
|
-
/* @__PURE__ */ (0,
|
|
24049
|
-
/* @__PURE__ */ (0,
|
|
24158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "ttd-dialog-panel", children: [
|
|
24159
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "ttd-dialog-panel__header", children: [
|
|
24160
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("label", { children: label }),
|
|
24050
24161
|
renderTopRight?.()
|
|
24051
24162
|
] }),
|
|
24052
24163
|
children,
|
|
24053
|
-
/* @__PURE__ */ (0,
|
|
24164
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
24054
24165
|
"div",
|
|
24055
24166
|
{
|
|
24056
24167
|
className: clsx_m_default("ttd-dialog-panel-button-container", {
|
|
@@ -24058,7 +24169,7 @@ var TTDDialogPanel = ({
|
|
|
24058
24169
|
}),
|
|
24059
24170
|
style: { display: "flex", alignItems: "center" },
|
|
24060
24171
|
children: [
|
|
24061
|
-
/* @__PURE__ */ (0,
|
|
24172
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
24062
24173
|
Button,
|
|
24063
24174
|
{
|
|
24064
24175
|
className: "ttd-dialog-panel-button",
|
|
@@ -24066,11 +24177,11 @@ var TTDDialogPanel = ({
|
|
|
24066
24177
|
},
|
|
24067
24178
|
disabled: panelActionDisabled || onTextSubmitInProgess,
|
|
24068
24179
|
children: [
|
|
24069
|
-
/* @__PURE__ */ (0,
|
|
24180
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: clsx_m_default({ invisible: onTextSubmitInProgess }), children: [
|
|
24070
24181
|
panelAction?.label,
|
|
24071
|
-
panelAction?.icon && /* @__PURE__ */ (0,
|
|
24182
|
+
panelAction?.icon && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { children: panelAction.icon })
|
|
24072
24183
|
] }),
|
|
24073
|
-
onTextSubmitInProgess && /* @__PURE__ */ (0,
|
|
24184
|
+
onTextSubmitInProgess && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Spinner_default, {})
|
|
24074
24185
|
]
|
|
24075
24186
|
}
|
|
24076
24187
|
),
|
|
@@ -24085,7 +24196,7 @@ var TTDDialogPanel = ({
|
|
|
24085
24196
|
// components/TTDDialog/TTDDialogInput.tsx
|
|
24086
24197
|
init_define_import_meta_env();
|
|
24087
24198
|
var import_react90 = __toESM(require_react(), 1);
|
|
24088
|
-
var
|
|
24199
|
+
var import_jsx_runtime111 = __toESM(require_jsx_runtime(), 1);
|
|
24089
24200
|
var TTDDialogInput = ({
|
|
24090
24201
|
input,
|
|
24091
24202
|
placeholder,
|
|
@@ -24113,7 +24224,7 @@ var TTDDialogInput = ({
|
|
|
24113
24224
|
};
|
|
24114
24225
|
}
|
|
24115
24226
|
}, []);
|
|
24116
|
-
return /* @__PURE__ */ (0,
|
|
24227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
24117
24228
|
"textarea",
|
|
24118
24229
|
{
|
|
24119
24230
|
className: "ttd-dialog-input",
|
|
@@ -24128,16 +24239,16 @@ var TTDDialogInput = ({
|
|
|
24128
24239
|
|
|
24129
24240
|
// components/TTDDialog/TTDDialogOutput.tsx
|
|
24130
24241
|
init_define_import_meta_env();
|
|
24131
|
-
var
|
|
24242
|
+
var import_jsx_runtime112 = __toESM(require_jsx_runtime(), 1);
|
|
24132
24243
|
var ErrorComp = ({ error }) => {
|
|
24133
|
-
return /* @__PURE__ */ (0,
|
|
24244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
24134
24245
|
"div",
|
|
24135
24246
|
{
|
|
24136
24247
|
"data-testid": "ttd-dialog-output-error",
|
|
24137
24248
|
className: "ttd-dialog-output-error",
|
|
24138
24249
|
children: [
|
|
24139
24250
|
"Error! ",
|
|
24140
|
-
/* @__PURE__ */ (0,
|
|
24251
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("p", { children: error })
|
|
24141
24252
|
]
|
|
24142
24253
|
}
|
|
24143
24254
|
);
|
|
@@ -24147,31 +24258,31 @@ var TTDDialogOutput = ({
|
|
|
24147
24258
|
canvasRef,
|
|
24148
24259
|
loaded
|
|
24149
24260
|
}) => {
|
|
24150
|
-
return /* @__PURE__ */ (0,
|
|
24151
|
-
error && /* @__PURE__ */ (0,
|
|
24152
|
-
loaded ? /* @__PURE__ */ (0,
|
|
24261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: "ttd-dialog-output-wrapper", children: [
|
|
24262
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(ErrorComp, { error: error.message }),
|
|
24263
|
+
loaded ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
24153
24264
|
"div",
|
|
24154
24265
|
{
|
|
24155
24266
|
ref: canvasRef,
|
|
24156
24267
|
style: { opacity: error ? "0.15" : 1 },
|
|
24157
24268
|
className: "ttd-dialog-output-canvas-container"
|
|
24158
24269
|
}
|
|
24159
|
-
) : /* @__PURE__ */ (0,
|
|
24270
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Spinner_default, { size: "2rem" })
|
|
24160
24271
|
] });
|
|
24161
24272
|
};
|
|
24162
24273
|
|
|
24163
24274
|
// components/TTDDialog/TTDDialogSubmitShortcut.tsx
|
|
24164
24275
|
init_define_import_meta_env();
|
|
24165
|
-
var
|
|
24276
|
+
var import_jsx_runtime113 = __toESM(require_jsx_runtime(), 1);
|
|
24166
24277
|
var TTDDialogSubmitShortcut = () => {
|
|
24167
|
-
return /* @__PURE__ */ (0,
|
|
24168
|
-
/* @__PURE__ */ (0,
|
|
24169
|
-
/* @__PURE__ */ (0,
|
|
24278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "ttd-dialog-submit-shortcut", children: [
|
|
24279
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: "ttd-dialog-submit-shortcut__key", children: getShortcutKey("CtrlOrCmd") }),
|
|
24280
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: "ttd-dialog-submit-shortcut__key", children: getShortcutKey("Enter") })
|
|
24170
24281
|
] });
|
|
24171
24282
|
};
|
|
24172
24283
|
|
|
24173
24284
|
// components/TTDDialog/MermaidToExcalidraw.tsx
|
|
24174
|
-
var
|
|
24285
|
+
var import_jsx_runtime114 = __toESM(require_jsx_runtime(), 1);
|
|
24175
24286
|
var MERMAID_EXAMPLE = "flowchart TD\n A[Christmas] -->|Get money| B(Go shopping)\n B --> C{Let me think}\n C -->|One| D[Laptop]\n C -->|Two| E[iPhone]\n C -->|Three| F[Car]";
|
|
24176
24287
|
var debouncedSaveMermaidDefinition = debounce(saveMermaidDataToStorage, 300);
|
|
24177
24288
|
var MermaidToExcalidraw = ({
|
|
@@ -24192,7 +24303,10 @@ var MermaidToExcalidraw = ({
|
|
|
24192
24303
|
mermaidToExcalidrawLib,
|
|
24193
24304
|
setError,
|
|
24194
24305
|
mermaidDefinition: deferredText
|
|
24195
|
-
}).catch(() => {
|
|
24306
|
+
}).catch((err) => {
|
|
24307
|
+
if (isDevEnv()) {
|
|
24308
|
+
console.error("Failed to parse mermaid definition", err);
|
|
24309
|
+
}
|
|
24196
24310
|
});
|
|
24197
24311
|
debouncedSaveMermaidDefinition(deferredText);
|
|
24198
24312
|
}, [deferredText, mermaidToExcalidrawLib]);
|
|
@@ -24210,18 +24324,18 @@ var MermaidToExcalidraw = ({
|
|
|
24210
24324
|
shouldSaveMermaidDataToStorage: true
|
|
24211
24325
|
});
|
|
24212
24326
|
};
|
|
24213
|
-
return /* @__PURE__ */ (0,
|
|
24214
|
-
/* @__PURE__ */ (0,
|
|
24327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(import_jsx_runtime114.Fragment, { children: [
|
|
24328
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: "ttd-dialog-desc", children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
24215
24329
|
Trans_default,
|
|
24216
24330
|
{
|
|
24217
24331
|
i18nKey: "mermaid.description",
|
|
24218
|
-
flowchartLink: (el) => /* @__PURE__ */ (0,
|
|
24219
|
-
sequenceLink: (el) => /* @__PURE__ */ (0,
|
|
24220
|
-
classLink: (el) => /* @__PURE__ */ (0,
|
|
24332
|
+
flowchartLink: (el) => /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("a", { href: "https://mermaid.js.org/syntax/flowchart.html", children: el }),
|
|
24333
|
+
sequenceLink: (el) => /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("a", { href: "https://mermaid.js.org/syntax/sequenceDiagram.html", children: el }),
|
|
24334
|
+
classLink: (el) => /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("a", { href: "https://mermaid.js.org/syntax/classDiagram.html", children: el })
|
|
24221
24335
|
}
|
|
24222
24336
|
) }),
|
|
24223
|
-
/* @__PURE__ */ (0,
|
|
24224
|
-
/* @__PURE__ */ (0,
|
|
24337
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(TTDDialogPanels, { children: [
|
|
24338
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(TTDDialogPanel, { label: t("mermaid.syntax"), children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
24225
24339
|
TTDDialogInput,
|
|
24226
24340
|
{
|
|
24227
24341
|
input: text,
|
|
@@ -24232,7 +24346,7 @@ var MermaidToExcalidraw = ({
|
|
|
24232
24346
|
}
|
|
24233
24347
|
}
|
|
24234
24348
|
) }),
|
|
24235
|
-
/* @__PURE__ */ (0,
|
|
24349
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
24236
24350
|
TTDDialogPanel,
|
|
24237
24351
|
{
|
|
24238
24352
|
label: t("mermaid.preview"),
|
|
@@ -24243,8 +24357,8 @@ var MermaidToExcalidraw = ({
|
|
|
24243
24357
|
label: t("mermaid.button"),
|
|
24244
24358
|
icon: ArrowRightIcon
|
|
24245
24359
|
},
|
|
24246
|
-
renderSubmitShortcut: () => /* @__PURE__ */ (0,
|
|
24247
|
-
children: /* @__PURE__ */ (0,
|
|
24360
|
+
renderSubmitShortcut: () => /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(TTDDialogSubmitShortcut, {}),
|
|
24361
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
24248
24362
|
TTDDialogOutput,
|
|
24249
24363
|
{
|
|
24250
24364
|
canvasRef,
|
|
@@ -24264,30 +24378,30 @@ var import_react92 = __toESM(require_react(), 1);
|
|
|
24264
24378
|
|
|
24265
24379
|
// components/TTDDialog/TTDDialogTabTriggers.tsx
|
|
24266
24380
|
init_define_import_meta_env();
|
|
24267
|
-
var
|
|
24381
|
+
var import_jsx_runtime115 = __toESM(require_jsx_runtime(), 1);
|
|
24268
24382
|
var TTDDialogTabTriggers = ({
|
|
24269
24383
|
children,
|
|
24270
24384
|
...rest
|
|
24271
24385
|
}) => {
|
|
24272
|
-
return /* @__PURE__ */ (0,
|
|
24386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)($69cb30bb0017df05$export$54c2e3dc7acea9f5, { className: "ttd-dialog-triggers", ...rest, children });
|
|
24273
24387
|
};
|
|
24274
24388
|
TTDDialogTabTriggers.displayName = "TTDDialogTabTriggers";
|
|
24275
24389
|
|
|
24276
24390
|
// components/TTDDialog/TTDDialogTabTrigger.tsx
|
|
24277
24391
|
init_define_import_meta_env();
|
|
24278
|
-
var
|
|
24392
|
+
var import_jsx_runtime116 = __toESM(require_jsx_runtime(), 1);
|
|
24279
24393
|
var TTDDialogTabTrigger = ({
|
|
24280
24394
|
children,
|
|
24281
24395
|
tab,
|
|
24282
24396
|
onSelect,
|
|
24283
24397
|
...rest
|
|
24284
24398
|
}) => {
|
|
24285
|
-
return /* @__PURE__ */ (0,
|
|
24399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)($69cb30bb0017df05$export$41fb9f06171c75f4, { value: tab, asChild: true, onSelect, children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("button", { type: "button", className: "ttd-dialog-tab-trigger", ...rest, children }) });
|
|
24286
24400
|
};
|
|
24287
24401
|
TTDDialogTabTrigger.displayName = "TTDDialogTabTrigger";
|
|
24288
24402
|
|
|
24289
24403
|
// components/TTDDialog/TTDDialog.tsx
|
|
24290
|
-
var
|
|
24404
|
+
var import_jsx_runtime117 = __toESM(require_jsx_runtime(), 1);
|
|
24291
24405
|
var MIN_PROMPT_LENGTH = 3;
|
|
24292
24406
|
var MAX_PROMPT_LENGTH = 1e3;
|
|
24293
24407
|
var rateLimitsAtom = atom2(null);
|
|
@@ -24297,7 +24411,7 @@ var TTDDialog = (props) => {
|
|
|
24297
24411
|
if (appState.openDialog?.name !== "ttd") {
|
|
24298
24412
|
return null;
|
|
24299
24413
|
}
|
|
24300
|
-
return /* @__PURE__ */ (0,
|
|
24414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TTDDialogBase, { ...props, tab: appState.openDialog.tab });
|
|
24301
24415
|
};
|
|
24302
24416
|
var TTDDialogBase = withInternalFallback(
|
|
24303
24417
|
"TTDDialogBase",
|
|
@@ -24411,7 +24525,7 @@ TTD mermaid definition render errror: ${error3.message}`,
|
|
|
24411
24525
|
}, [mermaidToExcalidrawLib.api]);
|
|
24412
24526
|
const data = (0, import_react92.useRef)({ elements: [], files: null });
|
|
24413
24527
|
const [error, setError] = (0, import_react92.useState)(null);
|
|
24414
|
-
return /* @__PURE__ */ (0,
|
|
24528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
24415
24529
|
Dialog,
|
|
24416
24530
|
{
|
|
24417
24531
|
className: "ttd-dialog",
|
|
@@ -24422,11 +24536,11 @@ TTD mermaid definition render errror: ${error3.message}`,
|
|
|
24422
24536
|
title: false,
|
|
24423
24537
|
...rest,
|
|
24424
24538
|
autofocus: false,
|
|
24425
|
-
children: /* @__PURE__ */ (0,
|
|
24426
|
-
"__fallback" in rest && rest.__fallback ? /* @__PURE__ */ (0,
|
|
24427
|
-
/* @__PURE__ */ (0,
|
|
24539
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(TTDDialogTabs_default, { dialog: "ttd", tab, children: [
|
|
24540
|
+
"__fallback" in rest && rest.__fallback ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("p", { className: "dialog-mermaid-title", children: t("mermaid.title") }) : /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(TTDDialogTabTriggers, { children: [
|
|
24541
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TTDDialogTabTrigger, { tab: "text-to-diagram", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
24428
24542
|
t("labels.textToDiagram"),
|
|
24429
|
-
/* @__PURE__ */ (0,
|
|
24543
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
24430
24544
|
"div",
|
|
24431
24545
|
{
|
|
24432
24546
|
style: {
|
|
@@ -24444,18 +24558,18 @@ TTD mermaid definition render errror: ${error3.message}`,
|
|
|
24444
24558
|
}
|
|
24445
24559
|
)
|
|
24446
24560
|
] }) }),
|
|
24447
|
-
/* @__PURE__ */ (0,
|
|
24561
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TTDDialogTabTrigger, { tab: "mermaid", children: "Mermaid" })
|
|
24448
24562
|
] }),
|
|
24449
|
-
/* @__PURE__ */ (0,
|
|
24563
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TTDDialogTab, { className: "ttd-dialog-content", tab: "mermaid", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
24450
24564
|
MermaidToExcalidraw_default,
|
|
24451
24565
|
{
|
|
24452
24566
|
mermaidToExcalidrawLib
|
|
24453
24567
|
}
|
|
24454
24568
|
) }),
|
|
24455
|
-
!("__fallback" in rest) && /* @__PURE__ */ (0,
|
|
24456
|
-
/* @__PURE__ */ (0,
|
|
24457
|
-
/* @__PURE__ */ (0,
|
|
24458
|
-
/* @__PURE__ */ (0,
|
|
24569
|
+
!("__fallback" in rest) && /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(TTDDialogTab, { className: "ttd-dialog-content", tab: "text-to-diagram", children: [
|
|
24570
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "ttd-dialog-desc", children: "Currently we use Mermaid as a middle step, so you'll get best results if you describe a diagram, workflow, flow chart, and similar." }),
|
|
24571
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(TTDDialogPanels, { children: [
|
|
24572
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
24459
24573
|
TTDDialogPanel,
|
|
24460
24574
|
{
|
|
24461
24575
|
label: t("labels.prompt"),
|
|
@@ -24470,7 +24584,7 @@ TTD mermaid definition render errror: ${error3.message}`,
|
|
|
24470
24584
|
if (!rateLimits) {
|
|
24471
24585
|
return null;
|
|
24472
24586
|
}
|
|
24473
|
-
return /* @__PURE__ */ (0,
|
|
24587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
24474
24588
|
"div",
|
|
24475
24589
|
{
|
|
24476
24590
|
className: "ttd-dialog-rate-limit",
|
|
@@ -24486,10 +24600,10 @@ TTD mermaid definition render errror: ${error3.message}`,
|
|
|
24486
24600
|
}
|
|
24487
24601
|
);
|
|
24488
24602
|
},
|
|
24489
|
-
renderSubmitShortcut: () => /* @__PURE__ */ (0,
|
|
24603
|
+
renderSubmitShortcut: () => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TTDDialogSubmitShortcut, {}),
|
|
24490
24604
|
renderBottomRight: () => {
|
|
24491
24605
|
if (typeof ttdGeneration?.generatedResponse === "string") {
|
|
24492
|
-
return /* @__PURE__ */ (0,
|
|
24606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
24493
24607
|
"div",
|
|
24494
24608
|
{
|
|
24495
24609
|
className: "excalidraw-link",
|
|
@@ -24506,14 +24620,14 @@ TTD mermaid definition render errror: ${error3.message}`,
|
|
|
24506
24620
|
},
|
|
24507
24621
|
children: [
|
|
24508
24622
|
"View as Mermaid",
|
|
24509
|
-
/* @__PURE__ */ (0,
|
|
24623
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(InlineIcon, { icon: ArrowRightIcon })
|
|
24510
24624
|
]
|
|
24511
24625
|
}
|
|
24512
24626
|
);
|
|
24513
24627
|
}
|
|
24514
24628
|
const ratio = prompt.length / MAX_PROMPT_LENGTH;
|
|
24515
24629
|
if (ratio > 0.8) {
|
|
24516
|
-
return /* @__PURE__ */ (0,
|
|
24630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
24517
24631
|
"div",
|
|
24518
24632
|
{
|
|
24519
24633
|
style: {
|
|
@@ -24533,7 +24647,7 @@ TTD mermaid definition render errror: ${error3.message}`,
|
|
|
24533
24647
|
}
|
|
24534
24648
|
return null;
|
|
24535
24649
|
},
|
|
24536
|
-
children: /* @__PURE__ */ (0,
|
|
24650
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
24537
24651
|
TTDDialogInput,
|
|
24538
24652
|
{
|
|
24539
24653
|
onChange: handleTextChange,
|
|
@@ -24546,7 +24660,7 @@ TTD mermaid definition render errror: ${error3.message}`,
|
|
|
24546
24660
|
)
|
|
24547
24661
|
}
|
|
24548
24662
|
),
|
|
24549
|
-
/* @__PURE__ */ (0,
|
|
24663
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
24550
24664
|
TTDDialogPanel,
|
|
24551
24665
|
{
|
|
24552
24666
|
label: "Preview",
|
|
@@ -24558,7 +24672,7 @@ TTD mermaid definition render errror: ${error3.message}`,
|
|
|
24558
24672
|
label: "Insert",
|
|
24559
24673
|
icon: ArrowRightIcon
|
|
24560
24674
|
},
|
|
24561
|
-
children: /* @__PURE__ */ (0,
|
|
24675
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
24562
24676
|
TTDDialogOutput,
|
|
24563
24677
|
{
|
|
24564
24678
|
canvasRef: someRandomDivRef,
|
|
@@ -24577,26 +24691,26 @@ TTD mermaid definition render errror: ${error3.message}`,
|
|
|
24577
24691
|
);
|
|
24578
24692
|
|
|
24579
24693
|
// components/LayerUI.tsx
|
|
24580
|
-
var
|
|
24694
|
+
var import_jsx_runtime118 = __toESM(require_jsx_runtime(), 1);
|
|
24581
24695
|
var DefaultMainMenu = ({ UIOptions }) => {
|
|
24582
|
-
return /* @__PURE__ */ (0,
|
|
24583
|
-
/* @__PURE__ */ (0,
|
|
24584
|
-
/* @__PURE__ */ (0,
|
|
24585
|
-
UIOptions.canvasActions.export && /* @__PURE__ */ (0,
|
|
24586
|
-
UIOptions.canvasActions.saveAsImage && /* @__PURE__ */ (0,
|
|
24587
|
-
/* @__PURE__ */ (0,
|
|
24588
|
-
/* @__PURE__ */ (0,
|
|
24589
|
-
/* @__PURE__ */ (0,
|
|
24590
|
-
/* @__PURE__ */ (0,
|
|
24591
|
-
/* @__PURE__ */ (0,
|
|
24592
|
-
/* @__PURE__ */ (0,
|
|
24593
|
-
/* @__PURE__ */ (0,
|
|
24696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(MainMenu_default, { __fallback: true, children: [
|
|
24697
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MainMenu_default.DefaultItems.LoadScene, {}),
|
|
24698
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MainMenu_default.DefaultItems.SaveToActiveFile, {}),
|
|
24699
|
+
UIOptions.canvasActions.export && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MainMenu_default.DefaultItems.Export, {}),
|
|
24700
|
+
UIOptions.canvasActions.saveAsImage && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MainMenu_default.DefaultItems.SaveAsImage, {}),
|
|
24701
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MainMenu_default.DefaultItems.Help, {}),
|
|
24702
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MainMenu_default.DefaultItems.ClearCanvas, {}),
|
|
24703
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MainMenu_default.Separator, {}),
|
|
24704
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MainMenu_default.Group, { title: "Excalidraw links", children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MainMenu_default.DefaultItems.Socials, {}) }),
|
|
24705
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MainMenu_default.Separator, {}),
|
|
24706
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MainMenu_default.DefaultItems.ToggleTheme, {}),
|
|
24707
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MainMenu_default.DefaultItems.ChangeCanvasBackground, {})
|
|
24594
24708
|
] });
|
|
24595
24709
|
};
|
|
24596
24710
|
var DefaultOverwriteConfirmDialog = () => {
|
|
24597
|
-
return /* @__PURE__ */ (0,
|
|
24598
|
-
/* @__PURE__ */ (0,
|
|
24599
|
-
/* @__PURE__ */ (0,
|
|
24711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(OverwriteConfirmDialog, { __fallback: true, children: [
|
|
24712
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(OverwriteConfirmDialog.Actions.SaveToDisk, {}),
|
|
24713
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(OverwriteConfirmDialog.Actions.ExportToImage, {})
|
|
24600
24714
|
] });
|
|
24601
24715
|
};
|
|
24602
24716
|
var LayerUI = ({
|
|
@@ -24633,7 +24747,7 @@ var LayerUI = ({
|
|
|
24633
24747
|
if (!UIOptions.canvasActions.export) {
|
|
24634
24748
|
return null;
|
|
24635
24749
|
}
|
|
24636
|
-
return /* @__PURE__ */ (0,
|
|
24750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24637
24751
|
JSONExportDialog,
|
|
24638
24752
|
{
|
|
24639
24753
|
elements,
|
|
@@ -24650,7 +24764,7 @@ var LayerUI = ({
|
|
|
24650
24764
|
if (!UIOptions.canvasActions.saveAsImage || appState.openDialog?.name !== "imageExport") {
|
|
24651
24765
|
return null;
|
|
24652
24766
|
}
|
|
24653
|
-
return /* @__PURE__ */ (0,
|
|
24767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24654
24768
|
ImageExportDialog,
|
|
24655
24769
|
{
|
|
24656
24770
|
elements,
|
|
@@ -24663,18 +24777,18 @@ var LayerUI = ({
|
|
|
24663
24777
|
}
|
|
24664
24778
|
);
|
|
24665
24779
|
};
|
|
24666
|
-
const renderCanvasActions = () => /* @__PURE__ */ (0,
|
|
24667
|
-
/* @__PURE__ */ (0,
|
|
24668
|
-
renderWelcomeScreen && /* @__PURE__ */ (0,
|
|
24780
|
+
const renderCanvasActions = () => /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { style: { position: "relative" }, children: [
|
|
24781
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(tunnels.MainMenuTunnel.Out, {}),
|
|
24782
|
+
renderWelcomeScreen && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(tunnels.WelcomeScreenMenuHintTunnel.Out, {})
|
|
24669
24783
|
] });
|
|
24670
|
-
const renderSelectedShapeActions = () => /* @__PURE__ */ (0,
|
|
24784
|
+
const renderSelectedShapeActions = () => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24671
24785
|
Section,
|
|
24672
24786
|
{
|
|
24673
24787
|
heading: "selectedShapeActions",
|
|
24674
24788
|
className: clsx_m_default("selected-shape-actions zen-mode-transition", {
|
|
24675
24789
|
"transition-left": appState.zenModeEnabled
|
|
24676
24790
|
}),
|
|
24677
|
-
children: /* @__PURE__ */ (0,
|
|
24791
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24678
24792
|
Island,
|
|
24679
24793
|
{
|
|
24680
24794
|
className: CLASSES.SHAPE_ACTIONS_MENU,
|
|
@@ -24684,7 +24798,7 @@ var LayerUI = ({
|
|
|
24684
24798
|
// approximate height of hamburgerMenu + footer
|
|
24685
24799
|
maxHeight: `${appState.height - 166}px`
|
|
24686
24800
|
},
|
|
24687
|
-
children: /* @__PURE__ */ (0,
|
|
24801
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24688
24802
|
SelectedShapeActions,
|
|
24689
24803
|
{
|
|
24690
24804
|
appState,
|
|
@@ -24701,14 +24815,14 @@ var LayerUI = ({
|
|
|
24701
24815
|
appState,
|
|
24702
24816
|
elements
|
|
24703
24817
|
);
|
|
24704
|
-
return /* @__PURE__ */ (0,
|
|
24705
|
-
/* @__PURE__ */ (0,
|
|
24818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(FixedSideContainer, { side: "top", children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { className: "App-menu App-menu_top", children: [
|
|
24819
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(Stack_default.Col, { gap: 6, className: clsx_m_default("App-menu_top__left"), children: [
|
|
24706
24820
|
renderCanvasActions(),
|
|
24707
24821
|
shouldRenderSelectedShapeActions && renderSelectedShapeActions()
|
|
24708
24822
|
] }),
|
|
24709
|
-
!appState.viewModeEnabled && /* @__PURE__ */ (0,
|
|
24710
|
-
renderWelcomeScreen && /* @__PURE__ */ (0,
|
|
24711
|
-
/* @__PURE__ */ (0,
|
|
24823
|
+
!appState.viewModeEnabled && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Section, { heading: "shapes", className: "shapes-section", children: (heading) => /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { style: { position: "relative" }, children: [
|
|
24824
|
+
renderWelcomeScreen && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(tunnels.WelcomeScreenToolbarHintTunnel.Out, {}),
|
|
24825
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Stack_default.Col, { gap: 4, align: "start", children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
24712
24826
|
Stack_default.Row,
|
|
24713
24827
|
{
|
|
24714
24828
|
gap: 1,
|
|
@@ -24716,7 +24830,7 @@ var LayerUI = ({
|
|
|
24716
24830
|
"zen-mode": appState.zenModeEnabled
|
|
24717
24831
|
}),
|
|
24718
24832
|
children: [
|
|
24719
|
-
/* @__PURE__ */ (0,
|
|
24833
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
24720
24834
|
Island,
|
|
24721
24835
|
{
|
|
24722
24836
|
padding: 1,
|
|
@@ -24724,7 +24838,7 @@ var LayerUI = ({
|
|
|
24724
24838
|
"zen-mode": appState.zenModeEnabled
|
|
24725
24839
|
}),
|
|
24726
24840
|
children: [
|
|
24727
|
-
/* @__PURE__ */ (0,
|
|
24841
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24728
24842
|
HintViewer,
|
|
24729
24843
|
{
|
|
24730
24844
|
appState,
|
|
@@ -24734,8 +24848,8 @@ var LayerUI = ({
|
|
|
24734
24848
|
}
|
|
24735
24849
|
),
|
|
24736
24850
|
heading,
|
|
24737
|
-
/* @__PURE__ */ (0,
|
|
24738
|
-
/* @__PURE__ */ (0,
|
|
24851
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(Stack_default.Row, { gap: 1, children: [
|
|
24852
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24739
24853
|
PenModeButton,
|
|
24740
24854
|
{
|
|
24741
24855
|
zenModeEnabled: appState.zenModeEnabled,
|
|
@@ -24745,7 +24859,7 @@ var LayerUI = ({
|
|
|
24745
24859
|
penDetected: appState.penDetected
|
|
24746
24860
|
}
|
|
24747
24861
|
),
|
|
24748
|
-
/* @__PURE__ */ (0,
|
|
24862
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24749
24863
|
LockButton,
|
|
24750
24864
|
{
|
|
24751
24865
|
checked: appState.activeTool.locked,
|
|
@@ -24753,8 +24867,8 @@ var LayerUI = ({
|
|
|
24753
24867
|
title: t("toolBar.lock")
|
|
24754
24868
|
}
|
|
24755
24869
|
),
|
|
24756
|
-
/* @__PURE__ */ (0,
|
|
24757
|
-
/* @__PURE__ */ (0,
|
|
24870
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "App-toolbar__divider" }),
|
|
24871
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24758
24872
|
HandButton,
|
|
24759
24873
|
{
|
|
24760
24874
|
checked: isHandToolActive(appState),
|
|
@@ -24763,7 +24877,7 @@ var LayerUI = ({
|
|
|
24763
24877
|
isMobile: true
|
|
24764
24878
|
}
|
|
24765
24879
|
),
|
|
24766
|
-
/* @__PURE__ */ (0,
|
|
24880
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24767
24881
|
ShapesSwitcher,
|
|
24768
24882
|
{
|
|
24769
24883
|
appState,
|
|
@@ -24776,7 +24890,7 @@ var LayerUI = ({
|
|
|
24776
24890
|
]
|
|
24777
24891
|
}
|
|
24778
24892
|
),
|
|
24779
|
-
isCollaborating && /* @__PURE__ */ (0,
|
|
24893
|
+
isCollaborating && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24780
24894
|
Island,
|
|
24781
24895
|
{
|
|
24782
24896
|
style: {
|
|
@@ -24784,7 +24898,7 @@ var LayerUI = ({
|
|
|
24784
24898
|
alignSelf: "center",
|
|
24785
24899
|
height: "fit-content"
|
|
24786
24900
|
},
|
|
24787
|
-
children: /* @__PURE__ */ (0,
|
|
24901
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24788
24902
|
LaserPointerButton,
|
|
24789
24903
|
{
|
|
24790
24904
|
title: t("toolBar.laser"),
|
|
@@ -24799,7 +24913,7 @@ var LayerUI = ({
|
|
|
24799
24913
|
}
|
|
24800
24914
|
) })
|
|
24801
24915
|
] }) }),
|
|
24802
|
-
/* @__PURE__ */ (0,
|
|
24916
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
24803
24917
|
"div",
|
|
24804
24918
|
{
|
|
24805
24919
|
className: clsx_m_default(
|
|
@@ -24809,7 +24923,7 @@ var LayerUI = ({
|
|
|
24809
24923
|
}
|
|
24810
24924
|
),
|
|
24811
24925
|
children: [
|
|
24812
|
-
appState.collaborators.size > 0 && /* @__PURE__ */ (0,
|
|
24926
|
+
appState.collaborators.size > 0 && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24813
24927
|
UserList,
|
|
24814
24928
|
{
|
|
24815
24929
|
collaborators: appState.collaborators,
|
|
@@ -24818,14 +24932,14 @@ var LayerUI = ({
|
|
|
24818
24932
|
),
|
|
24819
24933
|
renderTopRightUI?.(device.editor.isMobile, appState),
|
|
24820
24934
|
!appState.viewModeEnabled && // hide button when sidebar docked
|
|
24821
|
-
(!isSidebarDocked || appState.openSidebar?.name !== DEFAULT_SIDEBAR.name) && /* @__PURE__ */ (0,
|
|
24935
|
+
(!isSidebarDocked || appState.openSidebar?.name !== DEFAULT_SIDEBAR.name) && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(tunnels.DefaultSidebarTriggerTunnel.Out, {})
|
|
24822
24936
|
]
|
|
24823
24937
|
}
|
|
24824
24938
|
)
|
|
24825
24939
|
] }) });
|
|
24826
24940
|
};
|
|
24827
24941
|
const renderSidebars = () => {
|
|
24828
|
-
return /* @__PURE__ */ (0,
|
|
24942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24829
24943
|
DefaultSidebar,
|
|
24830
24944
|
{
|
|
24831
24945
|
__fallback: true,
|
|
@@ -24840,10 +24954,10 @@ var LayerUI = ({
|
|
|
24840
24954
|
);
|
|
24841
24955
|
};
|
|
24842
24956
|
const isSidebarDocked = useAtomValue(isSidebarDockedAtom, jotaiScope);
|
|
24843
|
-
const layerUIJSX = /* @__PURE__ */ (0,
|
|
24957
|
+
const layerUIJSX = /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_jsx_runtime118.Fragment, { children: [
|
|
24844
24958
|
children,
|
|
24845
|
-
/* @__PURE__ */ (0,
|
|
24846
|
-
/* @__PURE__ */ (0,
|
|
24959
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(DefaultMainMenu, { UIOptions }),
|
|
24960
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24847
24961
|
DefaultSidebar.Trigger,
|
|
24848
24962
|
{
|
|
24849
24963
|
__fallback: true,
|
|
@@ -24862,11 +24976,11 @@ var LayerUI = ({
|
|
|
24862
24976
|
children: t("toolBar.library")
|
|
24863
24977
|
}
|
|
24864
24978
|
),
|
|
24865
|
-
/* @__PURE__ */ (0,
|
|
24866
|
-
appState.openDialog?.name === "ttd" && /* @__PURE__ */ (0,
|
|
24867
|
-
appState.isLoading && /* @__PURE__ */ (0,
|
|
24868
|
-
appState.errorMessage && /* @__PURE__ */ (0,
|
|
24869
|
-
eyeDropperState && !device.editor.isMobile && /* @__PURE__ */ (0,
|
|
24979
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(DefaultOverwriteConfirmDialog, {}),
|
|
24980
|
+
appState.openDialog?.name === "ttd" && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(TTDDialog, { __fallback: true }),
|
|
24981
|
+
appState.isLoading && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(LoadingMessage, { delay: 250 }),
|
|
24982
|
+
appState.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(ErrorDialog, { onClose: () => setAppState({ errorMessage: null }), children: appState.errorMessage }),
|
|
24983
|
+
eyeDropperState && !device.editor.isMobile && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24870
24984
|
EyeDropper,
|
|
24871
24985
|
{
|
|
24872
24986
|
colorPickerType: eyeDropperState.colorPickerType,
|
|
@@ -24905,7 +25019,7 @@ var LayerUI = ({
|
|
|
24905
25019
|
}
|
|
24906
25020
|
}
|
|
24907
25021
|
),
|
|
24908
|
-
appState.openDialog?.name === "help" && /* @__PURE__ */ (0,
|
|
25022
|
+
appState.openDialog?.name === "help" && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24909
25023
|
HelpDialog,
|
|
24910
25024
|
{
|
|
24911
25025
|
onClose: () => {
|
|
@@ -24913,7 +25027,7 @@ var LayerUI = ({
|
|
|
24913
25027
|
}
|
|
24914
25028
|
}
|
|
24915
25029
|
),
|
|
24916
|
-
appState.openDialog?.name === "settings" && /* @__PURE__ */ (0,
|
|
25030
|
+
appState.openDialog?.name === "settings" && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24917
25031
|
MagicSettings,
|
|
24918
25032
|
{
|
|
24919
25033
|
openAIKey,
|
|
@@ -24930,11 +25044,11 @@ var LayerUI = ({
|
|
|
24930
25044
|
}
|
|
24931
25045
|
}
|
|
24932
25046
|
),
|
|
24933
|
-
/* @__PURE__ */ (0,
|
|
24934
|
-
/* @__PURE__ */ (0,
|
|
25047
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(ActiveConfirmDialog, {}),
|
|
25048
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(tunnels.OverwriteConfirmDialogTunnel.Out, {}),
|
|
24935
25049
|
renderImageExportDialog(),
|
|
24936
25050
|
renderJSONExportDialog(),
|
|
24937
|
-
appState.pasteDialog.shown && /* @__PURE__ */ (0,
|
|
25051
|
+
appState.pasteDialog.shown && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24938
25052
|
PasteChartDialog,
|
|
24939
25053
|
{
|
|
24940
25054
|
setAppState,
|
|
@@ -24944,7 +25058,7 @@ var LayerUI = ({
|
|
|
24944
25058
|
})
|
|
24945
25059
|
}
|
|
24946
25060
|
),
|
|
24947
|
-
device.editor.isMobile && /* @__PURE__ */ (0,
|
|
25061
|
+
device.editor.isMobile && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24948
25062
|
MobileMenu,
|
|
24949
25063
|
{
|
|
24950
25064
|
app,
|
|
@@ -24965,16 +25079,16 @@ var LayerUI = ({
|
|
|
24965
25079
|
UIOptions
|
|
24966
25080
|
}
|
|
24967
25081
|
),
|
|
24968
|
-
!device.editor.isMobile && /* @__PURE__ */ (0,
|
|
24969
|
-
/* @__PURE__ */ (0,
|
|
25082
|
+
!device.editor.isMobile && /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_jsx_runtime118.Fragment, { children: [
|
|
25083
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
24970
25084
|
"div",
|
|
24971
25085
|
{
|
|
24972
25086
|
className: "layer-ui__wrapper",
|
|
24973
25087
|
style: appState.openSidebar && isSidebarDocked && device.editor.canFitSidebar ? { width: `calc(100% - ${LIBRARY_SIDEBAR_WIDTH}px)` } : {},
|
|
24974
25088
|
children: [
|
|
24975
|
-
renderWelcomeScreen && /* @__PURE__ */ (0,
|
|
25089
|
+
renderWelcomeScreen && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(tunnels.WelcomeScreenCenterTunnel.Out, {}),
|
|
24976
25090
|
renderFixedSideContainer(),
|
|
24977
|
-
/* @__PURE__ */ (0,
|
|
25091
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24978
25092
|
Footer_default,
|
|
24979
25093
|
{
|
|
24980
25094
|
appState,
|
|
@@ -24983,7 +25097,7 @@ var LayerUI = ({
|
|
|
24983
25097
|
renderWelcomeScreen
|
|
24984
25098
|
}
|
|
24985
25099
|
),
|
|
24986
|
-
appState.showStats && /* @__PURE__ */ (0,
|
|
25100
|
+
appState.showStats && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24987
25101
|
Stats,
|
|
24988
25102
|
{
|
|
24989
25103
|
appState,
|
|
@@ -24995,7 +25109,7 @@ var LayerUI = ({
|
|
|
24995
25109
|
renderCustomStats
|
|
24996
25110
|
}
|
|
24997
25111
|
),
|
|
24998
|
-
appState.scrolledOutside && /* @__PURE__ */ (0,
|
|
25112
|
+
appState.scrolledOutside && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
24999
25113
|
"button",
|
|
25000
25114
|
{
|
|
25001
25115
|
className: "scroll-back-to-content",
|
|
@@ -25013,7 +25127,7 @@ var LayerUI = ({
|
|
|
25013
25127
|
renderSidebars()
|
|
25014
25128
|
] })
|
|
25015
25129
|
] });
|
|
25016
|
-
return /* @__PURE__ */ (0,
|
|
25130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(UIAppStateContext.Provider, { value: appState, children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Provider, { scope: tunnels.jotaiScope, children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(TunnelsContext.Provider, { value: tunnels, children: layerUIJSX }) }) });
|
|
25017
25131
|
};
|
|
25018
25132
|
var stripIrrelevantAppStateProps = (appState) => {
|
|
25019
25133
|
const {
|
|
@@ -25048,7 +25162,7 @@ var LayerUI_default = import_react93.default.memo(LayerUI, areEqual);
|
|
|
25048
25162
|
// components/Toast.tsx
|
|
25049
25163
|
init_define_import_meta_env();
|
|
25050
25164
|
var import_react94 = __toESM(require_react(), 1);
|
|
25051
|
-
var
|
|
25165
|
+
var import_jsx_runtime119 = __toESM(require_jsx_runtime(), 1);
|
|
25052
25166
|
var DEFAULT_TOAST_TIMEOUT = 5e3;
|
|
25053
25167
|
var Toast = ({
|
|
25054
25168
|
message,
|
|
@@ -25075,7 +25189,7 @@ var Toast = ({
|
|
|
25075
25189
|
}, [scheduleTimeout, message, duration, shouldAutoClose]);
|
|
25076
25190
|
const onMouseEnter = shouldAutoClose ? () => clearTimeout(timerRef?.current) : void 0;
|
|
25077
25191
|
const onMouseLeave = shouldAutoClose ? scheduleTimeout : void 0;
|
|
25078
|
-
return /* @__PURE__ */ (0,
|
|
25192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
25079
25193
|
"div",
|
|
25080
25194
|
{
|
|
25081
25195
|
className: "Toast",
|
|
@@ -25083,8 +25197,8 @@ var Toast = ({
|
|
|
25083
25197
|
onMouseLeave,
|
|
25084
25198
|
style,
|
|
25085
25199
|
children: [
|
|
25086
|
-
/* @__PURE__ */ (0,
|
|
25087
|
-
closable && /* @__PURE__ */ (0,
|
|
25200
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("p", { className: "Toast__message", children: message }),
|
|
25201
|
+
closable && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
25088
25202
|
ToolButton,
|
|
25089
25203
|
{
|
|
25090
25204
|
icon: CloseIcon,
|
|
@@ -26267,36 +26381,36 @@ var isActiveToolNonLinearSnappable = (activeToolType) => {
|
|
|
26267
26381
|
|
|
26268
26382
|
// components/BraveMeasureTextError.tsx
|
|
26269
26383
|
init_define_import_meta_env();
|
|
26270
|
-
var
|
|
26384
|
+
var import_jsx_runtime120 = __toESM(require_jsx_runtime(), 1);
|
|
26271
26385
|
var BraveMeasureTextError = () => {
|
|
26272
|
-
return /* @__PURE__ */ (0,
|
|
26273
|
-
/* @__PURE__ */ (0,
|
|
26386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { "data-testid": "brave-measure-text-error", children: [
|
|
26387
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
26274
26388
|
Trans_default,
|
|
26275
26389
|
{
|
|
26276
26390
|
i18nKey: "errors.brave_measure_text_error.line1",
|
|
26277
|
-
bold: (el) => /* @__PURE__ */ (0,
|
|
26391
|
+
bold: (el) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { style: { fontWeight: 600 }, children: el })
|
|
26278
26392
|
}
|
|
26279
26393
|
) }),
|
|
26280
|
-
/* @__PURE__ */ (0,
|
|
26394
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
26281
26395
|
Trans_default,
|
|
26282
26396
|
{
|
|
26283
26397
|
i18nKey: "errors.brave_measure_text_error.line2",
|
|
26284
|
-
bold: (el) => /* @__PURE__ */ (0,
|
|
26398
|
+
bold: (el) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { style: { fontWeight: 600 }, children: el })
|
|
26285
26399
|
}
|
|
26286
26400
|
) }),
|
|
26287
|
-
/* @__PURE__ */ (0,
|
|
26401
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
26288
26402
|
Trans_default,
|
|
26289
26403
|
{
|
|
26290
26404
|
i18nKey: "errors.brave_measure_text_error.line3",
|
|
26291
|
-
link: (el) => /* @__PURE__ */ (0,
|
|
26405
|
+
link: (el) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("a", { href: "http://docs.excalidraw.com/docs/@excalidraw/excalidraw/faq#turning-off-aggresive-block-fingerprinting-in-brave-browser", children: el })
|
|
26292
26406
|
}
|
|
26293
26407
|
) }),
|
|
26294
|
-
/* @__PURE__ */ (0,
|
|
26408
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
26295
26409
|
Trans_default,
|
|
26296
26410
|
{
|
|
26297
26411
|
i18nKey: "errors.brave_measure_text_error.line4",
|
|
26298
|
-
issueLink: (el) => /* @__PURE__ */ (0,
|
|
26299
|
-
discordLink: (el) => /* @__PURE__ */ (0,
|
|
26412
|
+
issueLink: (el) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("a", { href: "https://github.com/excalidraw/excalidraw/issues/new", children: el }),
|
|
26413
|
+
discordLink: (el) => /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("a", { href: "https://discord.gg/UexuTaE", children: [
|
|
26300
26414
|
el,
|
|
26301
26415
|
"."
|
|
26302
26416
|
] })
|
|
@@ -26480,6 +26594,13 @@ var bindLinearElementToElement = (linearElement, start2, end, elementStore, elem
|
|
|
26480
26594
|
);
|
|
26481
26595
|
}
|
|
26482
26596
|
}
|
|
26597
|
+
if (linearElement.points.length < 2) {
|
|
26598
|
+
return {
|
|
26599
|
+
linearElement,
|
|
26600
|
+
startBoundElement,
|
|
26601
|
+
endBoundElement
|
|
26602
|
+
};
|
|
26603
|
+
}
|
|
26483
26604
|
const endPointIndex = linearElement.points.length - 1;
|
|
26484
26605
|
const delta = 0.5;
|
|
26485
26606
|
const newPoints = cloneJSON(linearElement.points);
|
|
@@ -26515,10 +26636,12 @@ var ElementStore = class {
|
|
|
26515
26636
|
this.excalidrawElements.set(ele.id, ele);
|
|
26516
26637
|
};
|
|
26517
26638
|
getElements = () => {
|
|
26518
|
-
return Array.from(this.excalidrawElements.values());
|
|
26639
|
+
return syncInvalidIndices(Array.from(this.excalidrawElements.values()));
|
|
26519
26640
|
};
|
|
26520
26641
|
getElementsMap = () => {
|
|
26521
|
-
return toBrandedType(
|
|
26642
|
+
return toBrandedType(
|
|
26643
|
+
arrayToMap(this.getElements())
|
|
26644
|
+
);
|
|
26522
26645
|
};
|
|
26523
26646
|
getElement = (id) => {
|
|
26524
26647
|
return this.excalidrawElements.get(id);
|
|
@@ -26829,7 +26952,7 @@ var renderSnaps = (context, appState) => {
|
|
|
26829
26952
|
if (!appState.snapLines.length) {
|
|
26830
26953
|
return;
|
|
26831
26954
|
}
|
|
26832
|
-
const snapColor = appState.theme ===
|
|
26955
|
+
const snapColor = appState.theme === THEME.LIGHT || appState.zenModeEnabled ? SNAP_COLOR_LIGHT : SNAP_COLOR_DARK;
|
|
26833
26956
|
const snapWidth = (appState.zenModeEnabled ? SNAP_WIDTH * 1.5 : SNAP_WIDTH) / appState.zoom.value;
|
|
26834
26957
|
context.save();
|
|
26835
26958
|
context.translate(appState.scrollX, appState.scrollY);
|
|
@@ -27565,7 +27688,7 @@ var renderInteractiveScene = (renderConfig, throttle3) => {
|
|
|
27565
27688
|
};
|
|
27566
27689
|
|
|
27567
27690
|
// components/canvases/InteractiveCanvas.tsx
|
|
27568
|
-
var
|
|
27691
|
+
var import_jsx_runtime121 = __toESM(require_jsx_runtime(), 1);
|
|
27569
27692
|
var InteractiveCanvas = (props) => {
|
|
27570
27693
|
const isComponentMounted = (0, import_react96.useRef)(false);
|
|
27571
27694
|
(0, import_react96.useEffect)(() => {
|
|
@@ -27633,7 +27756,7 @@ var InteractiveCanvas = (props) => {
|
|
|
27633
27756
|
isRenderThrottlingEnabled()
|
|
27634
27757
|
);
|
|
27635
27758
|
});
|
|
27636
|
-
return /* @__PURE__ */ (0,
|
|
27759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
27637
27760
|
"canvas",
|
|
27638
27761
|
{
|
|
27639
27762
|
className: "excalidraw__canvas interactive",
|
|
@@ -27704,7 +27827,7 @@ var InteractiveCanvas_default = import_react96.default.memo(InteractiveCanvas, a
|
|
|
27704
27827
|
// components/canvases/StaticCanvas.tsx
|
|
27705
27828
|
init_define_import_meta_env();
|
|
27706
27829
|
var import_react97 = __toESM(require_react(), 1);
|
|
27707
|
-
var
|
|
27830
|
+
var import_jsx_runtime122 = __toESM(require_jsx_runtime(), 1);
|
|
27708
27831
|
var StaticCanvas = (props) => {
|
|
27709
27832
|
const wrapperRef = (0, import_react97.useRef)(null);
|
|
27710
27833
|
const isComponentMounted = (0, import_react97.useRef)(false);
|
|
@@ -27749,7 +27872,7 @@ var StaticCanvas = (props) => {
|
|
|
27749
27872
|
isRenderThrottlingEnabled()
|
|
27750
27873
|
);
|
|
27751
27874
|
});
|
|
27752
|
-
return /* @__PURE__ */ (0,
|
|
27875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "excalidraw__canvas-wrapper", ref: wrapperRef });
|
|
27753
27876
|
};
|
|
27754
27877
|
var getRelevantAppStateProps2 = (appState) => ({
|
|
27755
27878
|
zoom: appState.zoom,
|
|
@@ -27894,7 +28017,7 @@ var Renderer = class {
|
|
|
27894
28017
|
// components/SVGLayer.tsx
|
|
27895
28018
|
init_define_import_meta_env();
|
|
27896
28019
|
var import_react98 = __toESM(require_react(), 1);
|
|
27897
|
-
var
|
|
28020
|
+
var import_jsx_runtime123 = __toESM(require_jsx_runtime(), 1);
|
|
27898
28021
|
var SVGLayer = ({ trails }) => {
|
|
27899
28022
|
const svgRef = (0, import_react98.useRef)(null);
|
|
27900
28023
|
(0, import_react98.useEffect)(() => {
|
|
@@ -27909,12 +28032,12 @@ var SVGLayer = ({ trails }) => {
|
|
|
27909
28032
|
}
|
|
27910
28033
|
};
|
|
27911
28034
|
}, trails);
|
|
27912
|
-
return /* @__PURE__ */ (0,
|
|
28035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "SVGLayer", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("svg", { ref: svgRef }) });
|
|
27913
28036
|
};
|
|
27914
28037
|
|
|
27915
28038
|
// element/ElementCanvasButtons.tsx
|
|
27916
28039
|
init_define_import_meta_env();
|
|
27917
|
-
var
|
|
28040
|
+
var import_jsx_runtime124 = __toESM(require_jsx_runtime(), 1);
|
|
27918
28041
|
var CONTAINER_PADDING2 = 5;
|
|
27919
28042
|
var getContainerCoords = (element, appState, elementsMap) => {
|
|
27920
28043
|
const [x1, y1] = getElementAbsoluteCoords(element, elementsMap);
|
|
@@ -27936,7 +28059,7 @@ var ElementCanvasButtons = ({
|
|
|
27936
28059
|
return null;
|
|
27937
28060
|
}
|
|
27938
28061
|
const { x: x3, y: y3 } = getContainerCoords(element, appState, elementsMap);
|
|
27939
|
-
return /* @__PURE__ */ (0,
|
|
28062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
27940
28063
|
"div",
|
|
27941
28064
|
{
|
|
27942
28065
|
className: "excalidraw-canvas-buttons",
|
|
@@ -27978,7 +28101,7 @@ async function diagramToHTML({
|
|
|
27978
28101
|
image,
|
|
27979
28102
|
apiKey,
|
|
27980
28103
|
text,
|
|
27981
|
-
theme =
|
|
28104
|
+
theme = THEME.LIGHT
|
|
27982
28105
|
}) {
|
|
27983
28106
|
const body = {
|
|
27984
28107
|
model: "gpt-4-vision-preview",
|
|
@@ -28033,10 +28156,10 @@ async function diagramToHTML({
|
|
|
28033
28156
|
|
|
28034
28157
|
// components/MagicButton.tsx
|
|
28035
28158
|
init_define_import_meta_env();
|
|
28036
|
-
var
|
|
28159
|
+
var import_jsx_runtime125 = __toESM(require_jsx_runtime(), 1);
|
|
28037
28160
|
var DEFAULT_SIZE4 = "small";
|
|
28038
28161
|
var ElementCanvasButton = (props) => {
|
|
28039
|
-
return /* @__PURE__ */ (0,
|
|
28162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
28040
28163
|
"label",
|
|
28041
28164
|
{
|
|
28042
28165
|
className: clsx_m_default(
|
|
@@ -28048,7 +28171,7 @@ var ElementCanvasButton = (props) => {
|
|
|
28048
28171
|
),
|
|
28049
28172
|
title: `${props.title}`,
|
|
28050
28173
|
children: [
|
|
28051
|
-
/* @__PURE__ */ (0,
|
|
28174
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
28052
28175
|
"input",
|
|
28053
28176
|
{
|
|
28054
28177
|
className: "ToolIcon_type_checkbox",
|
|
@@ -28059,7 +28182,7 @@ var ElementCanvasButton = (props) => {
|
|
|
28059
28182
|
"aria-label": props.title
|
|
28060
28183
|
}
|
|
28061
28184
|
),
|
|
28062
|
-
/* @__PURE__ */ (0,
|
|
28185
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "ToolIcon__icon", children: props.icon })
|
|
28063
28186
|
]
|
|
28064
28187
|
}
|
|
28065
28188
|
);
|
|
@@ -28067,18 +28190,18 @@ var ElementCanvasButton = (props) => {
|
|
|
28067
28190
|
|
|
28068
28191
|
// components/FollowMode/FollowMode.tsx
|
|
28069
28192
|
init_define_import_meta_env();
|
|
28070
|
-
var
|
|
28193
|
+
var import_jsx_runtime126 = __toESM(require_jsx_runtime(), 1);
|
|
28071
28194
|
var FollowMode = ({
|
|
28072
28195
|
height,
|
|
28073
28196
|
width,
|
|
28074
28197
|
userToFollow,
|
|
28075
28198
|
onDisconnect
|
|
28076
28199
|
}) => {
|
|
28077
|
-
return /* @__PURE__ */ (0,
|
|
28078
|
-
/* @__PURE__ */ (0,
|
|
28200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "follow-mode", style: { width, height }, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "follow-mode__badge", children: [
|
|
28201
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "follow-mode__badge__label", children: [
|
|
28079
28202
|
"Following",
|
|
28080
28203
|
" ",
|
|
28081
|
-
/* @__PURE__ */ (0,
|
|
28204
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
28082
28205
|
"span",
|
|
28083
28206
|
{
|
|
28084
28207
|
className: "follow-mode__badge__username",
|
|
@@ -28087,7 +28210,7 @@ var FollowMode = ({
|
|
|
28087
28210
|
}
|
|
28088
28211
|
)
|
|
28089
28212
|
] }),
|
|
28090
|
-
/* @__PURE__ */ (0,
|
|
28213
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("button", { onClick: onDisconnect, className: "follow-mode__disconnect-btn", children: CloseIcon })
|
|
28091
28214
|
] }) });
|
|
28092
28215
|
};
|
|
28093
28216
|
var FollowMode_default = FollowMode;
|
|
@@ -29162,7 +29285,7 @@ var textWysiwyg = ({
|
|
|
29162
29285
|
};
|
|
29163
29286
|
|
|
29164
29287
|
// components/App.tsx
|
|
29165
|
-
var
|
|
29288
|
+
var import_jsx_runtime127 = __toESM(require_jsx_runtime(), 1);
|
|
29166
29289
|
var AppContext = import_react99.default.createContext(null);
|
|
29167
29290
|
var AppPropsContext = import_react99.default.createContext(null);
|
|
29168
29291
|
var deviceContextInitialValue = {
|
|
@@ -29536,7 +29659,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
29536
29659
|
const embeddableElements = this.scene.getNonDeletedElements().filter(
|
|
29537
29660
|
(el) => isEmbeddableElement(el) && this.embedsValidationStatus.get(el.id) === true || isIframeElement(el)
|
|
29538
29661
|
);
|
|
29539
|
-
return /* @__PURE__ */ (0,
|
|
29662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_jsx_runtime127.Fragment, { children: embeddableElements.map((el) => {
|
|
29540
29663
|
const { x: x3, y: y3 } = sceneCoordsToViewportCoords(
|
|
29541
29664
|
{ sceneX: el.x, sceneY: el.y },
|
|
29542
29665
|
this.state
|
|
@@ -29583,7 +29706,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
29583
29706
|
html, body {
|
|
29584
29707
|
width: 100%;
|
|
29585
29708
|
height: 100%;
|
|
29586
|
-
color: ${this.state.theme ===
|
|
29709
|
+
color: ${this.state.theme === THEME.DARK ? "white" : "black"};
|
|
29587
29710
|
}
|
|
29588
29711
|
body {
|
|
29589
29712
|
display: flex;
|
|
@@ -29692,7 +29815,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
29692
29815
|
}
|
|
29693
29816
|
const isActive = this.state.activeEmbeddable?.element === el && this.state.activeEmbeddable?.state === "active";
|
|
29694
29817
|
const isHovered = this.state.activeEmbeddable?.element === el && this.state.activeEmbeddable?.state === "hover";
|
|
29695
|
-
return /* @__PURE__ */ (0,
|
|
29818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
29696
29819
|
"div",
|
|
29697
29820
|
{
|
|
29698
29821
|
className: clsx_m_default("excalidraw__embeddable-container", {
|
|
@@ -29711,7 +29834,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
29711
29834
|
el
|
|
29712
29835
|
)}px`
|
|
29713
29836
|
},
|
|
29714
|
-
children: /* @__PURE__ */ (0,
|
|
29837
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
29715
29838
|
"div",
|
|
29716
29839
|
{
|
|
29717
29840
|
className: "excalidraw__embeddable-container__inner",
|
|
@@ -29722,15 +29845,15 @@ var App = class _App extends import_react99.default.Component {
|
|
|
29722
29845
|
pointerEvents: isActive ? POINTER_EVENTS.enabled : POINTER_EVENTS.disabled
|
|
29723
29846
|
},
|
|
29724
29847
|
children: [
|
|
29725
|
-
isHovered && /* @__PURE__ */ (0,
|
|
29726
|
-
/* @__PURE__ */ (0,
|
|
29848
|
+
isHovered && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "excalidraw__embeddable-hint", children: t("buttons.embeddableInteractionButton") }),
|
|
29849
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
29727
29850
|
"div",
|
|
29728
29851
|
{
|
|
29729
29852
|
className: "excalidraw__embeddable__outer",
|
|
29730
29853
|
style: {
|
|
29731
29854
|
padding: `${el.strokeWidth}px`
|
|
29732
29855
|
},
|
|
29733
|
-
children: (isEmbeddableElement(el) ? this.props.renderEmbeddable?.(el, this.state) : null) ?? /* @__PURE__ */ (0,
|
|
29856
|
+
children: (isEmbeddableElement(el) ? this.props.renderEmbeddable?.(el, this.state) : null) ?? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
29734
29857
|
"iframe",
|
|
29735
29858
|
{
|
|
29736
29859
|
ref: (ref) => this.cacheEmbeddableRef(el, ref),
|
|
@@ -29742,7 +29865,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
29742
29865
|
title: "Excalidraw Embedded Content",
|
|
29743
29866
|
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
|
|
29744
29867
|
allowFullScreen: true,
|
|
29745
|
-
sandbox: "allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-downloads
|
|
29868
|
+
sandbox: `${src?.sandbox?.allowSameOrigin ? "allow-same-origin" : ""} allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-downloads`
|
|
29746
29869
|
}
|
|
29747
29870
|
)
|
|
29748
29871
|
}
|
|
@@ -29800,7 +29923,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
29800
29923
|
if (!this.state.frameRendering.enabled || !this.state.frameRendering.name) {
|
|
29801
29924
|
return null;
|
|
29802
29925
|
}
|
|
29803
|
-
const isDarkTheme = this.state.theme ===
|
|
29926
|
+
const isDarkTheme = this.state.theme === THEME.DARK;
|
|
29804
29927
|
let frameIndex = 0;
|
|
29805
29928
|
let magicFrameIndex = 0;
|
|
29806
29929
|
return this.scene.getNonDeletedFramesLikes().map((f3) => {
|
|
@@ -29840,7 +29963,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
29840
29963
|
);
|
|
29841
29964
|
if (f3.id === this.state.editingFrame) {
|
|
29842
29965
|
const frameNameInEdit = frameName;
|
|
29843
|
-
frameNameJSX = /* @__PURE__ */ (0,
|
|
29966
|
+
frameNameJSX = /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
29844
29967
|
"input",
|
|
29845
29968
|
{
|
|
29846
29969
|
autoFocus: true,
|
|
@@ -29883,7 +30006,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
29883
30006
|
} else {
|
|
29884
30007
|
frameNameJSX = frameName;
|
|
29885
30008
|
}
|
|
29886
|
-
return /* @__PURE__ */ (0,
|
|
30009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
29887
30010
|
"div",
|
|
29888
30011
|
{
|
|
29889
30012
|
id: this.getFrameNameDOMId(f3),
|
|
@@ -29945,7 +30068,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
29945
30068
|
const shouldBlockPointerEvents = !(this.state.editingElement && isLinearElement(this.state.editingElement)) && (this.state.selectionElement || this.state.draggingElement || this.state.resizingElement || this.state.activeTool.type === "laser" && // technically we can just test on this once we make it more safe
|
|
29946
30069
|
this.state.cursorButton === "down" || this.state.editingElement && !isTextElement(this.state.editingElement));
|
|
29947
30070
|
const firstSelectedElement = selectedElements[0];
|
|
29948
|
-
return /* @__PURE__ */ (0,
|
|
30071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
29949
30072
|
"div",
|
|
29950
30073
|
{
|
|
29951
30074
|
className: clsx_m_default("excalidraw excalidraw-container", {
|
|
@@ -29961,21 +30084,21 @@ var App = class _App extends import_react99.default.Component {
|
|
|
29961
30084
|
onKeyDown: this.props.handleKeyboardGlobally ? void 0 : this.onKeyDown,
|
|
29962
30085
|
onPointerEnter: this.toggleOverscrollBehavior,
|
|
29963
30086
|
onPointerLeave: this.toggleOverscrollBehavior,
|
|
29964
|
-
children: /* @__PURE__ */ (0,
|
|
30087
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(AppContext.Provider, { value: this, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(AppPropsContext.Provider, { value: this.props, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
29965
30088
|
ExcalidrawContainerContext.Provider,
|
|
29966
30089
|
{
|
|
29967
30090
|
value: this.excalidrawContainerValue,
|
|
29968
|
-
children: /* @__PURE__ */ (0,
|
|
30091
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(DeviceContext.Provider, { value: this.device, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ExcalidrawSetAppStateContext.Provider, { value: this.setAppState, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ExcalidrawAppStateContext.Provider, { value: this.state, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
29969
30092
|
ExcalidrawElementsContext.Provider,
|
|
29970
30093
|
{
|
|
29971
30094
|
value: this.scene.getNonDeletedElements(),
|
|
29972
30095
|
children: [
|
|
29973
|
-
/* @__PURE__ */ (0,
|
|
30096
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
29974
30097
|
ExcalidrawActionManagerContext.Provider,
|
|
29975
30098
|
{
|
|
29976
30099
|
value: this.actionManager,
|
|
29977
30100
|
children: [
|
|
29978
|
-
/* @__PURE__ */ (0,
|
|
30101
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
29979
30102
|
LayerUI_default,
|
|
29980
30103
|
{
|
|
29981
30104
|
canvas: this.canvas,
|
|
@@ -30003,16 +30126,16 @@ var App = class _App extends import_react99.default.Component {
|
|
|
30003
30126
|
children: this.props.children
|
|
30004
30127
|
}
|
|
30005
30128
|
),
|
|
30006
|
-
/* @__PURE__ */ (0,
|
|
30007
|
-
/* @__PURE__ */ (0,
|
|
30008
|
-
/* @__PURE__ */ (0,
|
|
30009
|
-
/* @__PURE__ */ (0,
|
|
30129
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "excalidraw-textEditorContainer" }),
|
|
30130
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "excalidraw-contextMenuContainer" }),
|
|
30131
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "excalidraw-eye-dropper-container" }),
|
|
30132
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
30010
30133
|
SVGLayer,
|
|
30011
30134
|
{
|
|
30012
30135
|
trails: [this.laserTrails, this.eraserTrail]
|
|
30013
30136
|
}
|
|
30014
30137
|
),
|
|
30015
|
-
selectedElements.length === 1 && this.state.showHyperlinkPopup && /* @__PURE__ */ (0,
|
|
30138
|
+
selectedElements.length === 1 && this.state.showHyperlinkPopup && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
30016
30139
|
Hyperlink,
|
|
30017
30140
|
{
|
|
30018
30141
|
element: firstSelectedElement,
|
|
@@ -30024,12 +30147,12 @@ var App = class _App extends import_react99.default.Component {
|
|
|
30024
30147
|
},
|
|
30025
30148
|
firstSelectedElement.id
|
|
30026
30149
|
),
|
|
30027
|
-
this.props.aiEnabled !== false && selectedElements.length === 1 && isMagicFrameElement(firstSelectedElement) && /* @__PURE__ */ (0,
|
|
30150
|
+
this.props.aiEnabled !== false && selectedElements.length === 1 && isMagicFrameElement(firstSelectedElement) && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
30028
30151
|
ElementCanvasButtons,
|
|
30029
30152
|
{
|
|
30030
30153
|
element: firstSelectedElement,
|
|
30031
30154
|
elementsMap,
|
|
30032
|
-
children: /* @__PURE__ */ (0,
|
|
30155
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
30033
30156
|
ElementCanvasButton,
|
|
30034
30157
|
{
|
|
30035
30158
|
title: t("labels.convertToCode"),
|
|
@@ -30043,13 +30166,13 @@ var App = class _App extends import_react99.default.Component {
|
|
|
30043
30166
|
)
|
|
30044
30167
|
}
|
|
30045
30168
|
),
|
|
30046
|
-
selectedElements.length === 1 && isIframeElement(firstSelectedElement) && firstSelectedElement.customData?.generationData?.status === "done" && /* @__PURE__ */ (0,
|
|
30169
|
+
selectedElements.length === 1 && isIframeElement(firstSelectedElement) && firstSelectedElement.customData?.generationData?.status === "done" && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
30047
30170
|
ElementCanvasButtons,
|
|
30048
30171
|
{
|
|
30049
30172
|
element: firstSelectedElement,
|
|
30050
30173
|
elementsMap,
|
|
30051
30174
|
children: [
|
|
30052
|
-
/* @__PURE__ */ (0,
|
|
30175
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
30053
30176
|
ElementCanvasButton,
|
|
30054
30177
|
{
|
|
30055
30178
|
title: t("labels.copySource"),
|
|
@@ -30058,7 +30181,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
30058
30181
|
onChange: () => this.onIframeSrcCopy(firstSelectedElement)
|
|
30059
30182
|
}
|
|
30060
30183
|
),
|
|
30061
|
-
/* @__PURE__ */ (0,
|
|
30184
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
30062
30185
|
ElementCanvasButton,
|
|
30063
30186
|
{
|
|
30064
30187
|
title: "Enter fullscreen",
|
|
@@ -30095,7 +30218,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
30095
30218
|
]
|
|
30096
30219
|
}
|
|
30097
30220
|
),
|
|
30098
|
-
this.state.toast !== null && /* @__PURE__ */ (0,
|
|
30221
|
+
this.state.toast !== null && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
30099
30222
|
Toast,
|
|
30100
30223
|
{
|
|
30101
30224
|
message: this.state.toast.message,
|
|
@@ -30104,7 +30227,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
30104
30227
|
closable: this.state.toast.closable
|
|
30105
30228
|
}
|
|
30106
30229
|
),
|
|
30107
|
-
this.state.contextMenu && /* @__PURE__ */ (0,
|
|
30230
|
+
this.state.contextMenu && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
30108
30231
|
ContextMenu,
|
|
30109
30232
|
{
|
|
30110
30233
|
items: this.state.contextMenu.items,
|
|
@@ -30119,7 +30242,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
30119
30242
|
}
|
|
30120
30243
|
}
|
|
30121
30244
|
),
|
|
30122
|
-
/* @__PURE__ */ (0,
|
|
30245
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
30123
30246
|
StaticCanvas_default,
|
|
30124
30247
|
{
|
|
30125
30248
|
canvas: this.canvas,
|
|
@@ -30141,7 +30264,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
30141
30264
|
}
|
|
30142
30265
|
}
|
|
30143
30266
|
),
|
|
30144
|
-
/* @__PURE__ */ (0,
|
|
30267
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
30145
30268
|
InteractiveCanvas_default,
|
|
30146
30269
|
{
|
|
30147
30270
|
containerRef: this.excalidrawContainerRef,
|
|
@@ -30164,7 +30287,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
30164
30287
|
onDoubleClick: this.handleCanvasDoubleClick
|
|
30165
30288
|
}
|
|
30166
30289
|
),
|
|
30167
|
-
this.state.userToFollow && /* @__PURE__ */ (0,
|
|
30290
|
+
this.state.userToFollow && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
30168
30291
|
FollowMode_default,
|
|
30169
30292
|
{
|
|
30170
30293
|
width: this.state.width,
|
|
@@ -30433,7 +30556,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
30433
30556
|
opacity: 100,
|
|
30434
30557
|
locked: false
|
|
30435
30558
|
});
|
|
30436
|
-
this.scene.
|
|
30559
|
+
this.scene.insertElement(frame);
|
|
30437
30560
|
for (const child of selectedElements) {
|
|
30438
30561
|
mutateElement(child, { frameId: frame.id });
|
|
30439
30562
|
}
|
|
@@ -30748,7 +30871,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
30748
30871
|
}
|
|
30749
30872
|
if (isBrave() && !isMeasureTextSupported()) {
|
|
30750
30873
|
this.setState({
|
|
30751
|
-
errorMessage: /* @__PURE__ */ (0,
|
|
30874
|
+
errorMessage: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(BraveMeasureTextError_default, {})
|
|
30752
30875
|
});
|
|
30753
30876
|
}
|
|
30754
30877
|
}
|
|
@@ -30963,7 +31086,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
30963
31086
|
}
|
|
30964
31087
|
this.excalidrawContainerRef.current?.classList.toggle(
|
|
30965
31088
|
"theme--dark",
|
|
30966
|
-
this.state.theme ===
|
|
31089
|
+
this.state.theme === THEME.DARK
|
|
30967
31090
|
);
|
|
30968
31091
|
if (this.state.editingLinearElement && !this.state.selectedElementIds[this.state.editingLinearElement.elementId]) {
|
|
30969
31092
|
setTimeout(() => {
|
|
@@ -30981,7 +31104,6 @@ var App = class _App extends import_react99.default.Component {
|
|
|
30981
31104
|
maybeBindLinearElement(
|
|
30982
31105
|
multiElement,
|
|
30983
31106
|
this.state,
|
|
30984
|
-
this.scene,
|
|
30985
31107
|
tupleToCoors(
|
|
30986
31108
|
LinearElementEditor.getPointAtIndexGlobalCoordinates(
|
|
30987
31109
|
multiElement,
|
|
@@ -30989,7 +31111,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
30989
31111
|
elementsMap
|
|
30990
31112
|
)
|
|
30991
31113
|
),
|
|
30992
|
-
|
|
31114
|
+
this
|
|
30993
31115
|
);
|
|
30994
31116
|
}
|
|
30995
31117
|
this.history.record(this.state, elements);
|
|
@@ -31237,19 +31359,18 @@ var App = class _App extends import_react99.default.Component {
|
|
|
31237
31359
|
randomizeSeed: !opts.retainSeed
|
|
31238
31360
|
}
|
|
31239
31361
|
);
|
|
31240
|
-
const
|
|
31241
|
-
|
|
31242
|
-
|
|
31243
|
-
];
|
|
31362
|
+
const prevElements = this.scene.getElementsIncludingDeleted();
|
|
31363
|
+
const nextElements = [...prevElements, ...newElements];
|
|
31364
|
+
syncMovedIndices(nextElements, arrayToMap(newElements));
|
|
31244
31365
|
const topLayerFrame = this.getTopLayerFrameAtSceneCoords({ x: x3, y: y3 });
|
|
31245
31366
|
if (topLayerFrame) {
|
|
31246
31367
|
const eligibleElements = filterElementsEligibleAsFrameChildren(
|
|
31247
31368
|
newElements,
|
|
31248
31369
|
topLayerFrame
|
|
31249
31370
|
);
|
|
31250
|
-
addElementsToFrame(
|
|
31371
|
+
addElementsToFrame(nextElements, eligibleElements, topLayerFrame);
|
|
31251
31372
|
}
|
|
31252
|
-
this.scene.replaceAllElements(
|
|
31373
|
+
this.scene.replaceAllElements(nextElements);
|
|
31253
31374
|
newElements.forEach((newElement2) => {
|
|
31254
31375
|
if (isTextElement(newElement2) && isBoundToContainer(newElement2)) {
|
|
31255
31376
|
const container = getContainerElement(
|
|
@@ -31437,18 +31558,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
31437
31558
|
if (textElements.length === 0) {
|
|
31438
31559
|
return;
|
|
31439
31560
|
}
|
|
31440
|
-
|
|
31441
|
-
if (frameId) {
|
|
31442
|
-
this.scene.insertElementsAtIndex(
|
|
31443
|
-
textElements,
|
|
31444
|
-
this.scene.getElementIndex(frameId)
|
|
31445
|
-
);
|
|
31446
|
-
} else {
|
|
31447
|
-
this.scene.replaceAllElements([
|
|
31448
|
-
...this.scene.getElementsIncludingDeleted(),
|
|
31449
|
-
...textElements
|
|
31450
|
-
]);
|
|
31451
|
-
}
|
|
31561
|
+
this.scene.insertElements(textElements);
|
|
31452
31562
|
this.setState({
|
|
31453
31563
|
selectedElementIds: makeNextSelectedElementIds(
|
|
31454
31564
|
Object.fromEntries(textElements.map((el) => [el.id, true])),
|
|
@@ -31714,8 +31824,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
31714
31824
|
if (event[KEYS.CTRL_OR_CMD] && event.key === KEYS.P && !event.shiftKey && !event.altKey) {
|
|
31715
31825
|
this.setToast({
|
|
31716
31826
|
message: t("commandPalette.shortcutHint", {
|
|
31717
|
-
|
|
31718
|
-
shortcutTwo: getShortcutFromShortcutName("commandPalette", 1)
|
|
31827
|
+
shortcut: getShortcutFromShortcutName("commandPalette")
|
|
31719
31828
|
})
|
|
31720
31829
|
});
|
|
31721
31830
|
event.preventDefault();
|
|
@@ -31930,11 +32039,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
31930
32039
|
if (isArrowKey(event.key)) {
|
|
31931
32040
|
const selectedElements = this.scene.getSelectedElements(this.state);
|
|
31932
32041
|
const elementsMap = this.scene.getNonDeletedElementsMap();
|
|
31933
|
-
isBindingEnabled(this.state) ? bindOrUnbindSelectedElements(
|
|
31934
|
-
selectedElements,
|
|
31935
|
-
this.scene.getNonDeletedElements(),
|
|
31936
|
-
elementsMap
|
|
31937
|
-
) : unbindLinearElements(selectedElements, elementsMap);
|
|
32042
|
+
isBindingEnabled(this.state) ? bindOrUnbindSelectedElements(selectedElements, this) : unbindLinearElements(selectedElements, elementsMap);
|
|
31938
32043
|
this.setState({ suggestedBindings: [] });
|
|
31939
32044
|
}
|
|
31940
32045
|
});
|
|
@@ -32159,6 +32264,73 @@ var App = class _App extends import_react99.default.Component {
|
|
|
32159
32264
|
}
|
|
32160
32265
|
return null;
|
|
32161
32266
|
}
|
|
32267
|
+
/**
|
|
32268
|
+
* get the pure geometric shape of an excalidraw element
|
|
32269
|
+
* which is then used for hit detection
|
|
32270
|
+
*/
|
|
32271
|
+
getElementShape(element) {
|
|
32272
|
+
switch (element.type) {
|
|
32273
|
+
case "rectangle":
|
|
32274
|
+
case "diamond":
|
|
32275
|
+
case "frame":
|
|
32276
|
+
case "magicframe":
|
|
32277
|
+
case "embeddable":
|
|
32278
|
+
case "image":
|
|
32279
|
+
case "iframe":
|
|
32280
|
+
case "text":
|
|
32281
|
+
case "selection":
|
|
32282
|
+
return getPolygonShape(element);
|
|
32283
|
+
case "arrow":
|
|
32284
|
+
case "line": {
|
|
32285
|
+
const roughShape = ShapeCache.get(element)?.[0] ?? ShapeCache.generateElementShape(element, null)[0];
|
|
32286
|
+
const [, , , , cx, cy] = getElementAbsoluteCoords(
|
|
32287
|
+
element,
|
|
32288
|
+
this.scene.getNonDeletedElementsMap()
|
|
32289
|
+
);
|
|
32290
|
+
return shouldTestInside(element) ? getClosedCurveShape(
|
|
32291
|
+
element,
|
|
32292
|
+
roughShape,
|
|
32293
|
+
[element.x, element.y],
|
|
32294
|
+
element.angle,
|
|
32295
|
+
[cx, cy]
|
|
32296
|
+
) : getCurveShape(roughShape, [element.x, element.y], element.angle, [
|
|
32297
|
+
cx,
|
|
32298
|
+
cy
|
|
32299
|
+
]);
|
|
32300
|
+
}
|
|
32301
|
+
case "ellipse":
|
|
32302
|
+
return getEllipseShape(element);
|
|
32303
|
+
case "freedraw": {
|
|
32304
|
+
const [, , , , cx, cy] = getElementAbsoluteCoords(
|
|
32305
|
+
element,
|
|
32306
|
+
this.scene.getNonDeletedElementsMap()
|
|
32307
|
+
);
|
|
32308
|
+
return getFreedrawShape(element, [cx, cy], shouldTestInside(element));
|
|
32309
|
+
}
|
|
32310
|
+
}
|
|
32311
|
+
}
|
|
32312
|
+
getBoundTextShape(element) {
|
|
32313
|
+
const boundTextElement = getBoundTextElement(
|
|
32314
|
+
element,
|
|
32315
|
+
this.scene.getNonDeletedElementsMap()
|
|
32316
|
+
);
|
|
32317
|
+
if (boundTextElement) {
|
|
32318
|
+
if (element.type === "arrow") {
|
|
32319
|
+
return this.getElementShape({
|
|
32320
|
+
...boundTextElement,
|
|
32321
|
+
// arrow's bound text accurate position is not stored in the element's property
|
|
32322
|
+
// but rather calculated and returned from the following static method
|
|
32323
|
+
...LinearElementEditor.getBoundTextElementPosition(
|
|
32324
|
+
element,
|
|
32325
|
+
boundTextElement,
|
|
32326
|
+
this.scene.getNonDeletedElementsMap()
|
|
32327
|
+
)
|
|
32328
|
+
});
|
|
32329
|
+
}
|
|
32330
|
+
return this.getElementShape(boundTextElement);
|
|
32331
|
+
}
|
|
32332
|
+
return null;
|
|
32333
|
+
}
|
|
32162
32334
|
getElementAtPosition(x3, y3, opts) {
|
|
32163
32335
|
const allHitElements = this.getElementsAtPosition(
|
|
32164
32336
|
x3,
|
|
@@ -32175,14 +32347,10 @@ var App = class _App extends import_react99.default.Component {
|
|
|
32175
32347
|
}
|
|
32176
32348
|
}
|
|
32177
32349
|
const elementWithHighestZIndex = allHitElements[allHitElements.length - 1];
|
|
32178
|
-
return
|
|
32179
|
-
|
|
32180
|
-
this.
|
|
32181
|
-
|
|
32182
|
-
x3,
|
|
32183
|
-
y3,
|
|
32184
|
-
this.scene.getNonDeletedElementsMap()
|
|
32185
|
-
) ? allHitElements[allHitElements.length - 2] : elementWithHighestZIndex;
|
|
32350
|
+
return isPointInShape(
|
|
32351
|
+
[x3, y3],
|
|
32352
|
+
this.getElementShape(elementWithHighestZIndex)
|
|
32353
|
+
) ? elementWithHighestZIndex : allHitElements[allHitElements.length - 2];
|
|
32186
32354
|
}
|
|
32187
32355
|
if (allHitElements.length === 1) {
|
|
32188
32356
|
return allHitElements[0];
|
|
@@ -32190,25 +32358,83 @@ var App = class _App extends import_react99.default.Component {
|
|
|
32190
32358
|
return null;
|
|
32191
32359
|
}
|
|
32192
32360
|
getElementsAtPosition(x3, y3, includeBoundTextElement = false, includeLockedElements = false) {
|
|
32193
|
-
const
|
|
32194
|
-
(element) => (includeLockedElements || !element.locked) && (includeBoundTextElement || !(isTextElement(element) && element.containerId))
|
|
32195
|
-
);
|
|
32361
|
+
const iframeLikes = [];
|
|
32196
32362
|
const elementsMap = this.scene.getNonDeletedElementsMap();
|
|
32197
|
-
|
|
32198
|
-
|
|
32199
|
-
|
|
32200
|
-
element,
|
|
32201
|
-
this.state,
|
|
32202
|
-
this.frameNameBoundsCache,
|
|
32203
|
-
x3,
|
|
32204
|
-
y3,
|
|
32205
|
-
elementsMap
|
|
32206
|
-
)
|
|
32207
|
-
).filter((element) => {
|
|
32363
|
+
const elements = (includeBoundTextElement && includeLockedElements ? this.scene.getNonDeletedElements() : this.scene.getNonDeletedElements().filter(
|
|
32364
|
+
(element) => (includeLockedElements || !element.locked) && (includeBoundTextElement || !(isTextElement(element) && element.containerId))
|
|
32365
|
+
)).filter((el) => this.hitElement(x3, y3, el)).filter((element) => {
|
|
32208
32366
|
const containingFrame = getContainingFrame(element, elementsMap);
|
|
32209
32367
|
return containingFrame && this.state.frameRendering.enabled && this.state.frameRendering.clip ? isCursorInFrame({ x: x3, y: y3 }, containingFrame, elementsMap) : true;
|
|
32368
|
+
}).filter((el) => {
|
|
32369
|
+
if (isIframeElement(el)) {
|
|
32370
|
+
iframeLikes.push(el);
|
|
32371
|
+
return false;
|
|
32372
|
+
}
|
|
32373
|
+
return true;
|
|
32374
|
+
}).concat(iframeLikes);
|
|
32375
|
+
return elements;
|
|
32376
|
+
}
|
|
32377
|
+
getHitThreshold() {
|
|
32378
|
+
return 10 / this.state.zoom.value;
|
|
32379
|
+
}
|
|
32380
|
+
hitElement(x3, y3, element, considerBoundingBox = true) {
|
|
32381
|
+
if (considerBoundingBox && this.state.selectedElementIds[element.id] && shouldShowBoundingBox([element], this.state)) {
|
|
32382
|
+
return hitElementBoundingBox(
|
|
32383
|
+
x3,
|
|
32384
|
+
y3,
|
|
32385
|
+
element,
|
|
32386
|
+
this.scene.getNonDeletedElementsMap(),
|
|
32387
|
+
this.getHitThreshold()
|
|
32388
|
+
);
|
|
32389
|
+
}
|
|
32390
|
+
const hitBoundTextOfElement = hitElementBoundText(
|
|
32391
|
+
x3,
|
|
32392
|
+
y3,
|
|
32393
|
+
this.getBoundTextShape(element)
|
|
32394
|
+
);
|
|
32395
|
+
if (hitBoundTextOfElement) {
|
|
32396
|
+
return true;
|
|
32397
|
+
}
|
|
32398
|
+
return hitElementItself({
|
|
32399
|
+
x: x3,
|
|
32400
|
+
y: y3,
|
|
32401
|
+
element,
|
|
32402
|
+
shape: this.getElementShape(element),
|
|
32403
|
+
threshold: this.getHitThreshold(),
|
|
32404
|
+
frameNameBound: isFrameLikeElement(element) ? this.frameNameBoundsCache.get(element) : null
|
|
32210
32405
|
});
|
|
32211
32406
|
}
|
|
32407
|
+
getTextBindableContainerAtPosition(x3, y3) {
|
|
32408
|
+
const elements = this.scene.getNonDeletedElements();
|
|
32409
|
+
const selectedElements = this.scene.getSelectedElements(this.state);
|
|
32410
|
+
if (selectedElements.length === 1) {
|
|
32411
|
+
return isTextBindableContainer(selectedElements[0], false) ? selectedElements[0] : null;
|
|
32412
|
+
}
|
|
32413
|
+
let hitElement = null;
|
|
32414
|
+
for (let index2 = elements.length - 1; index2 >= 0; --index2) {
|
|
32415
|
+
if (elements[index2].isDeleted) {
|
|
32416
|
+
continue;
|
|
32417
|
+
}
|
|
32418
|
+
const [x1, y1, x22, y22] = getElementAbsoluteCoords(
|
|
32419
|
+
elements[index2],
|
|
32420
|
+
this.scene.getNonDeletedElementsMap()
|
|
32421
|
+
);
|
|
32422
|
+
if (isArrowElement(elements[index2]) && hitElementItself({
|
|
32423
|
+
x: x3,
|
|
32424
|
+
y: y3,
|
|
32425
|
+
element: elements[index2],
|
|
32426
|
+
shape: this.getElementShape(elements[index2]),
|
|
32427
|
+
threshold: this.getHitThreshold()
|
|
32428
|
+
})) {
|
|
32429
|
+
hitElement = elements[index2];
|
|
32430
|
+
break;
|
|
32431
|
+
} else if (x1 < x3 && x3 < x22 && y1 < y3 && y3 < y22) {
|
|
32432
|
+
hitElement = elements[index2];
|
|
32433
|
+
break;
|
|
32434
|
+
}
|
|
32435
|
+
}
|
|
32436
|
+
return isTextBindableContainer(hitElement, false) ? hitElement : null;
|
|
32437
|
+
}
|
|
32212
32438
|
startTextEditing = ({
|
|
32213
32439
|
sceneX,
|
|
32214
32440
|
sceneY,
|
|
@@ -32313,7 +32539,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
32313
32539
|
const containerIndex = this.scene.getElementIndex(container.id);
|
|
32314
32540
|
this.scene.insertElementAtIndex(element, containerIndex + 1);
|
|
32315
32541
|
} else {
|
|
32316
|
-
this.scene.
|
|
32542
|
+
this.scene.insertElement(element);
|
|
32317
32543
|
}
|
|
32318
32544
|
}
|
|
32319
32545
|
this.setState({
|
|
@@ -32374,21 +32600,15 @@ var App = class _App extends import_react99.default.Component {
|
|
|
32374
32600
|
});
|
|
32375
32601
|
return;
|
|
32376
32602
|
}
|
|
32377
|
-
const container = getTextBindableContainerAtPosition(
|
|
32378
|
-
this.scene.getNonDeletedElements(),
|
|
32379
|
-
this.state,
|
|
32380
|
-
sceneX,
|
|
32381
|
-
sceneY,
|
|
32382
|
-
this.scene.getNonDeletedElementsMap()
|
|
32383
|
-
);
|
|
32603
|
+
const container = this.getTextBindableContainerAtPosition(sceneX, sceneY);
|
|
32384
32604
|
if (container) {
|
|
32385
|
-
if (hasBoundTextElement(container) || !isTransparent(container.backgroundColor) ||
|
|
32386
|
-
|
|
32387
|
-
|
|
32388
|
-
|
|
32389
|
-
|
|
32390
|
-
this.
|
|
32391
|
-
)) {
|
|
32605
|
+
if (hasBoundTextElement(container) || !isTransparent(container.backgroundColor) || hitElementItself({
|
|
32606
|
+
x: sceneX,
|
|
32607
|
+
y: sceneY,
|
|
32608
|
+
element: container,
|
|
32609
|
+
shape: this.getElementShape(container),
|
|
32610
|
+
threshold: this.getHitThreshold()
|
|
32611
|
+
})) {
|
|
32392
32612
|
const midPoint = getContainerCenter(
|
|
32393
32613
|
container,
|
|
32394
32614
|
this.state,
|
|
@@ -32473,11 +32693,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
32473
32693
|
}
|
|
32474
32694
|
if (!customEvent?.defaultPrevented) {
|
|
32475
32695
|
const target = isLocalLink(url) ? "_self" : "_blank";
|
|
32476
|
-
const newWindow = window.open(
|
|
32477
|
-
void 0,
|
|
32478
|
-
target,
|
|
32479
|
-
"noopener noreferrer"
|
|
32480
|
-
);
|
|
32696
|
+
const newWindow = window.open(void 0, target);
|
|
32481
32697
|
if (newWindow) {
|
|
32482
32698
|
newWindow.opener = null;
|
|
32483
32699
|
newWindow.location = url;
|
|
@@ -32830,7 +33046,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
32830
33046
|
scenePointer.x,
|
|
32831
33047
|
scenePointer.y
|
|
32832
33048
|
);
|
|
32833
|
-
const threshold =
|
|
33049
|
+
const threshold = this.getHitThreshold();
|
|
32834
33050
|
const point = { ...pointerDownState.lastCoords };
|
|
32835
33051
|
let samplingInterval = 0;
|
|
32836
33052
|
while (samplingInterval <= distance2) {
|
|
@@ -32874,20 +33090,18 @@ var App = class _App extends import_react99.default.Component {
|
|
|
32874
33090
|
linearElementEditor.elementId,
|
|
32875
33091
|
elementsMap
|
|
32876
33092
|
);
|
|
32877
|
-
const boundTextElement = getBoundTextElement(element, elementsMap);
|
|
32878
33093
|
if (!element) {
|
|
32879
33094
|
return;
|
|
32880
33095
|
}
|
|
32881
33096
|
if (this.state.selectedLinearElement) {
|
|
32882
33097
|
let hoverPointIndex = -1;
|
|
32883
33098
|
let segmentMidPointHoveredCoords = null;
|
|
32884
|
-
if (
|
|
33099
|
+
if (hitElementItself({
|
|
33100
|
+
x: scenePointerX,
|
|
33101
|
+
y: scenePointerY,
|
|
32885
33102
|
element,
|
|
32886
|
-
this.
|
|
32887
|
-
|
|
32888
|
-
[scenePointerX, scenePointerY],
|
|
32889
|
-
elementsMap
|
|
32890
|
-
)) {
|
|
33103
|
+
shape: this.getElementShape(element)
|
|
33104
|
+
})) {
|
|
32891
33105
|
hoverPointIndex = LinearElementEditor.getPointIndexUnderCursor(
|
|
32892
33106
|
element,
|
|
32893
33107
|
elementsMap,
|
|
@@ -32906,23 +33120,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
32906
33120
|
} else {
|
|
32907
33121
|
setCursor(this.interactiveCanvas, CURSOR_TYPE.MOVE);
|
|
32908
33122
|
}
|
|
32909
|
-
} else if (
|
|
32910
|
-
element,
|
|
32911
|
-
this.state,
|
|
32912
|
-
this.frameNameBoundsCache,
|
|
32913
|
-
scenePointerX,
|
|
32914
|
-
scenePointerY,
|
|
32915
|
-
elementsMap
|
|
32916
|
-
)) {
|
|
32917
|
-
setCursor(this.interactiveCanvas, CURSOR_TYPE.MOVE);
|
|
32918
|
-
} else if (boundTextElement && hitTest(
|
|
32919
|
-
boundTextElement,
|
|
32920
|
-
this.state,
|
|
32921
|
-
this.frameNameBoundsCache,
|
|
32922
|
-
scenePointerX,
|
|
32923
|
-
scenePointerY,
|
|
32924
|
-
this.scene.getNonDeletedElementsMap()
|
|
32925
|
-
)) {
|
|
33123
|
+
} else if (this.hitElement(scenePointerX, scenePointerY, element)) {
|
|
32926
33124
|
setCursor(this.interactiveCanvas, CURSOR_TYPE.MOVE);
|
|
32927
33125
|
}
|
|
32928
33126
|
if (this.state.selectedLinearElement.hoverPointIndex !== hoverPointIndex) {
|
|
@@ -33467,8 +33665,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
33467
33665
|
this.history,
|
|
33468
33666
|
pointerDownState.origin,
|
|
33469
33667
|
linearElementEditor,
|
|
33470
|
-
this
|
|
33471
|
-
elementsMap
|
|
33668
|
+
this
|
|
33472
33669
|
);
|
|
33473
33670
|
if (ret.hitElement) {
|
|
33474
33671
|
pointerDownState.hit.element = ret.hitElement;
|
|
@@ -33618,7 +33815,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
33618
33815
|
if (selectedElements.length < 2) {
|
|
33619
33816
|
return false;
|
|
33620
33817
|
}
|
|
33621
|
-
const threshold =
|
|
33818
|
+
const threshold = this.getHitThreshold();
|
|
33622
33819
|
const [x1, y1, x22, y22] = getCommonBounds(selectedElements);
|
|
33623
33820
|
return point.x > x1 - threshold && point.x < x22 + threshold && point.y > y1 - threshold && point.y < y22 + threshold;
|
|
33624
33821
|
}
|
|
@@ -33631,13 +33828,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
33631
33828
|
const element = this.getElementAtPosition(sceneX, sceneY, {
|
|
33632
33829
|
includeBoundTextElement: true
|
|
33633
33830
|
});
|
|
33634
|
-
let container = getTextBindableContainerAtPosition(
|
|
33635
|
-
this.scene.getNonDeletedElements(),
|
|
33636
|
-
this.state,
|
|
33637
|
-
sceneX,
|
|
33638
|
-
sceneY,
|
|
33639
|
-
this.scene.getNonDeletedElementsMap()
|
|
33640
|
-
);
|
|
33831
|
+
let container = this.getTextBindableContainerAtPosition(sceneX, sceneY);
|
|
33641
33832
|
if (hasBoundTextElement(element)) {
|
|
33642
33833
|
container = element;
|
|
33643
33834
|
sceneX = element.x + element.width / 2;
|
|
@@ -33701,10 +33892,9 @@ var App = class _App extends import_react99.default.Component {
|
|
|
33701
33892
|
});
|
|
33702
33893
|
const boundElement = getHoveredElementForBinding(
|
|
33703
33894
|
pointerDownState.origin,
|
|
33704
|
-
this
|
|
33705
|
-
this.scene.getNonDeletedElementsMap()
|
|
33895
|
+
this
|
|
33706
33896
|
);
|
|
33707
|
-
this.scene.
|
|
33897
|
+
this.scene.insertElement(element);
|
|
33708
33898
|
this.setState({
|
|
33709
33899
|
draggingElement: element,
|
|
33710
33900
|
editingElement: element,
|
|
@@ -33739,10 +33929,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
33739
33929
|
width,
|
|
33740
33930
|
height
|
|
33741
33931
|
});
|
|
33742
|
-
this.scene.
|
|
33743
|
-
...this.scene.getElementsIncludingDeleted(),
|
|
33744
|
-
element
|
|
33745
|
-
]);
|
|
33932
|
+
this.scene.insertElement(element);
|
|
33746
33933
|
return element;
|
|
33747
33934
|
};
|
|
33748
33935
|
//create rectangle element with youtube top left on nearest grid point width / hight 640/360
|
|
@@ -33783,10 +33970,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
33783
33970
|
height: embedLink.intrinsicSize.h,
|
|
33784
33971
|
link
|
|
33785
33972
|
});
|
|
33786
|
-
this.scene.
|
|
33787
|
-
...this.scene.getElementsIncludingDeleted(),
|
|
33788
|
-
element
|
|
33789
|
-
]);
|
|
33973
|
+
this.scene.insertElement(element);
|
|
33790
33974
|
return element;
|
|
33791
33975
|
};
|
|
33792
33976
|
createImageElement = ({
|
|
@@ -33899,10 +34083,9 @@ var App = class _App extends import_react99.default.Component {
|
|
|
33899
34083
|
});
|
|
33900
34084
|
const boundElement = getHoveredElementForBinding(
|
|
33901
34085
|
pointerDownState.origin,
|
|
33902
|
-
this
|
|
33903
|
-
this.scene.getNonDeletedElementsMap()
|
|
34086
|
+
this
|
|
33904
34087
|
);
|
|
33905
|
-
this.scene.
|
|
34088
|
+
this.scene.insertElement(element);
|
|
33906
34089
|
this.setState({
|
|
33907
34090
|
draggingElement: element,
|
|
33908
34091
|
editingElement: element,
|
|
@@ -33958,7 +34141,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
33958
34141
|
draggingElement: element
|
|
33959
34142
|
});
|
|
33960
34143
|
} else {
|
|
33961
|
-
this.scene.
|
|
34144
|
+
this.scene.insertElement(element);
|
|
33962
34145
|
this.setState({
|
|
33963
34146
|
multiElement: null,
|
|
33964
34147
|
draggingElement: element,
|
|
@@ -33980,10 +34163,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
33980
34163
|
...FRAME_STYLE
|
|
33981
34164
|
};
|
|
33982
34165
|
const frame = type === TOOL_TYPE.magicframe ? newMagicFrameElement(constructorOpts) : newFrameElement(constructorOpts);
|
|
33983
|
-
this.scene.
|
|
33984
|
-
...this.scene.getElementsIncludingDeleted(),
|
|
33985
|
-
frame
|
|
33986
|
-
]);
|
|
34166
|
+
this.scene.insertElement(frame);
|
|
33987
34167
|
this.setState({
|
|
33988
34168
|
multiElement: null,
|
|
33989
34169
|
draggingElement: frame,
|
|
@@ -34271,6 +34451,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
34271
34451
|
}
|
|
34272
34452
|
}
|
|
34273
34453
|
const nextSceneElements = [...nextElements, ...elementsToAppend];
|
|
34454
|
+
syncMovedIndices(nextSceneElements, arrayToMap(elementsToAppend));
|
|
34274
34455
|
bindTextToShapeAfterDuplication(
|
|
34275
34456
|
nextElements,
|
|
34276
34457
|
elementsToAppend,
|
|
@@ -34487,8 +34668,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
34487
34668
|
childEvent,
|
|
34488
34669
|
this.state.editingLinearElement,
|
|
34489
34670
|
this.state,
|
|
34490
|
-
this
|
|
34491
|
-
elementsMap
|
|
34671
|
+
this
|
|
34492
34672
|
);
|
|
34493
34673
|
if (editingLinearElement !== this.state.editingLinearElement) {
|
|
34494
34674
|
this.setState({
|
|
@@ -34508,8 +34688,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
34508
34688
|
childEvent,
|
|
34509
34689
|
this.state.selectedLinearElement,
|
|
34510
34690
|
this.state,
|
|
34511
|
-
this
|
|
34512
|
-
elementsMap
|
|
34691
|
+
this
|
|
34513
34692
|
);
|
|
34514
34693
|
const { startBindingElement, endBindingElement } = linearElementEditor;
|
|
34515
34694
|
const element = this.scene.getElement(linearElementEditor.elementId);
|
|
@@ -34630,9 +34809,8 @@ var App = class _App extends import_react99.default.Component {
|
|
|
34630
34809
|
maybeBindLinearElement(
|
|
34631
34810
|
draggingElement,
|
|
34632
34811
|
this.state,
|
|
34633
|
-
this.scene,
|
|
34634
34812
|
pointerCoords,
|
|
34635
|
-
|
|
34813
|
+
this
|
|
34636
34814
|
);
|
|
34637
34815
|
}
|
|
34638
34816
|
this.setState({ suggestedBindings: [], startBoundElement: null });
|
|
@@ -34961,14 +35139,22 @@ var App = class _App extends import_react99.default.Component {
|
|
|
34961
35139
|
}));
|
|
34962
35140
|
}
|
|
34963
35141
|
}
|
|
34964
|
-
if (
|
|
34965
|
-
|
|
34966
|
-
|
|
34967
|
-
this.
|
|
34968
|
-
|
|
34969
|
-
|
|
34970
|
-
|
|
34971
|
-
|
|
35142
|
+
if (
|
|
35143
|
+
// not dragged
|
|
35144
|
+
!pointerDownState.drag.hasOccurred && // not resized
|
|
35145
|
+
!this.state.isResizing && // only hitting the bounding box of the previous hit element
|
|
35146
|
+
(hitElement && hitElementBoundingBoxOnly(
|
|
35147
|
+
{
|
|
35148
|
+
x: pointerDownState.origin.x,
|
|
35149
|
+
y: pointerDownState.origin.y,
|
|
35150
|
+
element: hitElement,
|
|
35151
|
+
shape: this.getElementShape(hitElement),
|
|
35152
|
+
threshold: this.getHitThreshold(),
|
|
35153
|
+
frameNameBound: isFrameLikeElement(hitElement) ? this.frameNameBoundsCache.get(hitElement) : null
|
|
35154
|
+
},
|
|
35155
|
+
elementsMap
|
|
35156
|
+
) || !hitElement && pointerDownState.hit.hasHitCommonBoundingBoxOfSelectedElements)
|
|
35157
|
+
) {
|
|
34972
35158
|
if (this.state.editingLinearElement) {
|
|
34973
35159
|
this.setState({ editingLinearElement: null });
|
|
34974
35160
|
} else {
|
|
@@ -34979,6 +35165,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
34979
35165
|
activeEmbeddable: null
|
|
34980
35166
|
});
|
|
34981
35167
|
}
|
|
35168
|
+
setCursor(this.interactiveCanvas, CURSOR_TYPE.AUTO);
|
|
34982
35169
|
return;
|
|
34983
35170
|
}
|
|
34984
35171
|
if (!activeTool.locked && activeTool.type !== "freedraw" && draggingElement && draggingElement.type !== "selection") {
|
|
@@ -34999,10 +35186,9 @@ var App = class _App extends import_react99.default.Component {
|
|
|
34999
35186
|
if (pointerDownState.drag.hasOccurred || isResizing || isRotating) {
|
|
35000
35187
|
isBindingEnabled(this.state) ? bindOrUnbindSelectedElements(
|
|
35001
35188
|
this.scene.getSelectedElements(this.state),
|
|
35002
|
-
this
|
|
35003
|
-
elementsMap
|
|
35189
|
+
this
|
|
35004
35190
|
) : unbindLinearElements(
|
|
35005
|
-
this.scene.
|
|
35191
|
+
this.scene.getNonDeletedElements(),
|
|
35006
35192
|
elementsMap
|
|
35007
35193
|
);
|
|
35008
35194
|
}
|
|
@@ -35159,7 +35345,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
35159
35345
|
this.setState({ errorMessage: t("errors.imageToolNotSupported") });
|
|
35160
35346
|
return;
|
|
35161
35347
|
}
|
|
35162
|
-
this.scene.
|
|
35348
|
+
this.scene.insertElement(imageElement);
|
|
35163
35349
|
try {
|
|
35164
35350
|
return await this.initializeImage({
|
|
35165
35351
|
imageFile,
|
|
@@ -35368,8 +35554,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
35368
35554
|
maybeSuggestBindingAtCursor = (pointerCoords) => {
|
|
35369
35555
|
const hoveredBindableElement = getHoveredElementForBinding(
|
|
35370
35556
|
pointerCoords,
|
|
35371
|
-
this
|
|
35372
|
-
this.scene.getNonDeletedElementsMap()
|
|
35557
|
+
this
|
|
35373
35558
|
);
|
|
35374
35559
|
this.setState({
|
|
35375
35560
|
suggestedBindings: hoveredBindableElement != null ? [hoveredBindableElement] : []
|
|
@@ -35383,8 +35568,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
35383
35568
|
(acc, coords) => {
|
|
35384
35569
|
const hoveredBindableElement = getHoveredElementForBinding(
|
|
35385
35570
|
coords,
|
|
35386
|
-
this
|
|
35387
|
-
this.scene.getNonDeletedElementsMap()
|
|
35571
|
+
this
|
|
35388
35572
|
);
|
|
35389
35573
|
if (hoveredBindableElement != null && !isLinearElementSimpleAndAlreadyBound(
|
|
35390
35574
|
linearElement,
|
|
@@ -35405,8 +35589,7 @@ var App = class _App extends import_react99.default.Component {
|
|
|
35405
35589
|
}
|
|
35406
35590
|
const suggestedBindings = getEligibleElementsForBinding(
|
|
35407
35591
|
selectedElements,
|
|
35408
|
-
this
|
|
35409
|
-
this.scene.getNonDeletedElementsMap()
|
|
35592
|
+
this
|
|
35410
35593
|
);
|
|
35411
35594
|
this.setState({ suggestedBindings });
|
|
35412
35595
|
}
|
|
@@ -36030,7 +36213,9 @@ var createTestHook = () => {
|
|
|
36030
36213
|
return this.app?.scene.getElementsIncludingDeleted();
|
|
36031
36214
|
},
|
|
36032
36215
|
set(elements) {
|
|
36033
|
-
return this.app?.scene.replaceAllElements(
|
|
36216
|
+
return this.app?.scene.replaceAllElements(
|
|
36217
|
+
syncInvalidIndices(elements)
|
|
36218
|
+
);
|
|
36034
36219
|
}
|
|
36035
36220
|
}
|
|
36036
36221
|
});
|
|
@@ -36070,11 +36255,11 @@ var polyfill_default = polyfill;
|
|
|
36070
36255
|
|
|
36071
36256
|
// components/footer/FooterCenter.tsx
|
|
36072
36257
|
init_define_import_meta_env();
|
|
36073
|
-
var
|
|
36258
|
+
var import_jsx_runtime128 = __toESM(require_jsx_runtime(), 1);
|
|
36074
36259
|
var FooterCenter = ({ children }) => {
|
|
36075
36260
|
const { FooterCenterTunnel } = useTunnels();
|
|
36076
36261
|
const appState = useUIAppState();
|
|
36077
|
-
return /* @__PURE__ */ (0,
|
|
36262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(FooterCenterTunnel.In, { children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
36078
36263
|
"div",
|
|
36079
36264
|
{
|
|
36080
36265
|
className: clsx_m_default("footer-center zen-mode-transition", {
|
|
@@ -36095,15 +36280,15 @@ init_define_import_meta_env();
|
|
|
36095
36280
|
|
|
36096
36281
|
// components/ExcalidrawLogo.tsx
|
|
36097
36282
|
init_define_import_meta_env();
|
|
36098
|
-
var
|
|
36099
|
-
var LogoIcon = () => /* @__PURE__ */ (0,
|
|
36283
|
+
var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1);
|
|
36284
|
+
var LogoIcon = () => /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
36100
36285
|
"svg",
|
|
36101
36286
|
{
|
|
36102
36287
|
viewBox: "0 0 40 40",
|
|
36103
36288
|
fill: "none",
|
|
36104
36289
|
xmlns: "http://www.w3.org/2000/svg",
|
|
36105
36290
|
className: "ExcalidrawLogo-icon",
|
|
36106
|
-
children: /* @__PURE__ */ (0,
|
|
36291
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
36107
36292
|
"path",
|
|
36108
36293
|
{
|
|
36109
36294
|
d: "M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",
|
|
@@ -36112,7 +36297,7 @@ var LogoIcon = () => /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
|
36112
36297
|
)
|
|
36113
36298
|
}
|
|
36114
36299
|
);
|
|
36115
|
-
var LogoText = () => /* @__PURE__ */ (0,
|
|
36300
|
+
var LogoText = () => /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
|
|
36116
36301
|
"svg",
|
|
36117
36302
|
{
|
|
36118
36303
|
viewBox: "0 0 450 55",
|
|
@@ -36120,28 +36305,28 @@ var LogoText = () => /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
|
36120
36305
|
fill: "none",
|
|
36121
36306
|
className: "ExcalidrawLogo-text",
|
|
36122
36307
|
children: [
|
|
36123
|
-
/* @__PURE__ */ (0,
|
|
36308
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
36124
36309
|
"path",
|
|
36125
36310
|
{
|
|
36126
36311
|
d: "M429.27 96.74c2.47-1.39 4.78-3.02 6.83-4.95 1.43-1.35 2.73-2.86 3.81-4.51-.66.9-1.4 1.77-2.23 2.59-2.91 2.84-5.72 5.09-8.42 6.87h.01ZM343.6 69.36c.33 3.13.58 6.27.79 9.4.09 1.37.18 2.75.25 4.12-.12-4.46-.27-8.93-.5-13.39-.11-2.08-.24-4.16-.4-6.24-.06 1.79-.11 3.85-.13 6.11h-.01ZM378.47 98.34c.01-.37.07-1.13.01-6.51-.11 1.9-.22 3.81-.31 5.71-.07 1.42-.22 2.91-.16 4.35.39.03.78.07 1.17.1-.92-.85-.76-2.01-.72-3.66l.01.01ZM344.09 86.12c-.09-2.41-.22-4.83-.39-7.24v12.21c.15-.05.32-.09.47-.14.05-1.61-.03-3.23-.09-4.83h.01ZM440.69 66.79c-.22-.34-.45-.67-.69-.99-3.71-4.87-9.91-7.14-15.65-8.55-1.05-.26-2.12-.49-3.18-.71 2.29.59 4.48 1.26 6.64 2.02 7.19 2.54 10.57 5.41 12.88 8.23ZM305.09 72.46l1.2 3.6c.84 2.53 1.67 5.06 2.46 7.61.24.78.5 1.57.73 2.36.22-.04.44-.08.67-.12a776.9 776.9 0 0 1-5.01-13.57c-.02.04-.03.09-.05.13v-.01ZM345.49 90.25v.31c1.48-.42 3.05-.83 4.66-1.2-1.56.25-3.12.52-4.66.89ZM371.02 90.22c0-.57-.04-1.14-.11-1.71-.06-.02-.12-.04-.19-.05-.21-.05-.43-.08-.65-.11.42.16.74.88.95 1.87ZM398.93 54.23c-.13 0-.27-.01-.4-.02l.03.4c.11-.15.23-.27.37-.38ZM401.57 62.28v-.15c-1.22-.24-2.86-.61-3.23-1.25-.09-.15-.18-.51-.27-.98-.09.37-.2.73-.33 1.09 1.24.56 2.52.98 3.83 1.29ZM421.73 88.68c-2.97 1.65-6.28 3.12-9.69 3.68v.18c4.72-.14 11.63-3.85 16.33-8.38-2.04 1.75-4.33 3.24-6.63 4.53l-.01-.01ZM411.28 80.92c-.05-1.2-.09-2.4-.15-3.6-.21 5.66-.46 11.38-.47 14.51.24-.02.48-.04.71-.07.15-3.61.05-7.23-.09-10.83v-.01Z",
|
|
36127
36312
|
transform: "translate(-144.023 -51.76)"
|
|
36128
36313
|
}
|
|
36129
36314
|
),
|
|
36130
|
-
/* @__PURE__ */ (0,
|
|
36315
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
36131
36316
|
"path",
|
|
36132
36317
|
{
|
|
36133
36318
|
d: "M425.38 67.41c-3.5-1.45-7.19-2.57-14.06-3.62.09 1.97.06 4.88-.03 8.12.03.04.06.09.06.15.19 1.36.28 2.73.37 4.1.25 3.77.39 7.55.41 11.33 0 1.38-.01 2.76-.07 4.13 1.4-.25 2.78-.65 4.12-1.15 4.07-1.5 7.94-3.78 11.28-6.54 2.33-1.92 5.13-4.49 5.88-7.58.63-3.53-2.45-6.68-7.97-8.96l.01.02ZM411.35 92.53v-.06l-.34.03c.11.01.22.03.34.03ZM314.26 64.06c-.23-.59-.47-1.17-.7-1.75.57 1.62 1.11 3.25 1.6 4.9l.15.54 2.35 6.05c.32.82.66 1.64.98 2.46-1.38-4.1-2.83-8.17-4.39-12.2h.01ZM156.82 103.07c-.18.13-.38.23-.58.33 1.32-.03 2.66-.2 3.93-.34.86-.09 1.72-.22 2.58-.33-2.12.1-4.12.17-5.94.34h.01ZM210.14 68.88s.03.04.05.07c.18-.31.39-.64.58-.96-.21.3-.42.6-.64.89h.01ZM201.65 82.8c-.5.77-1.02 1.56-1.49 2.37 1.11-1.55 2.21-3.1 3.2-4.59-.23.23-.49.51-.75.79-.32.47-.65.95-.96 1.43ZM194.03 98.66c-.33-.4-.65-.84-1.05-1.17-.24-.2-.07-.49.17-.56-.23-.26-.42-.5-.63-.75 1.51-2.55 3.93-5.87 6.4-9.28-.17-.08-.29-.28-.2-.49.04-.09.09-.17.13-.26-1.21 1.78-2.42 3.55-3.61 5.33-.87 1.31-1.74 2.64-2.54 4-.29.5-.63 1.04-.87 1.61.81.65 1.63 1.27 2.47 1.88-.09-.11-.18-.21-.27-.32v.01ZM307.79 82.93c-1-3.17-2.05-6.32-3.1-9.48-1.62 4.08-3.69 9.17-6.16 15.19 3.32-1.04 6.77-1.87 10.27-2.5-.32-1.08-.67-2.15-1.01-3.21ZM149.5 80.7c.05-1.71.04-3.43 0-5.14-.1 2.26-.16 4.51-.22 6.77-.02.73-.03 1.46-.04 2.19.14-1.27.2-2.55.24-3.82h.02ZM228.98 98.3c.39 1.25.91 3.03.94 3.91.06-.03.12-.07.17-.1.08-1.29-.55-2.65-1.11-3.81ZM307.72 53.36c.81.5 1.53 1.04 2.07 1.49-.38-.8-.78-1.58-1.21-2.35-.17.03-.34.06-.51.11-.43.12-.86.26-1.29.41.35-.01.53.1.94.34ZM283.69 96.14c3.91-7.25 6.89-13.35 8.88-18.15l1.1-2.66c-1.27 2.64-2.56 5.27-3.83 7.9-1.53 3.15-3.06 6.31-4.58 9.47-.87 1.81-1.76 3.62-2.54 5.47.04.02.07.04.11.07.05.05.1.09.15.14.05-.73.27-1.48.71-2.24ZM289.92 103.23s-.04.01-.05.03c0-.02.04-.03.05-.04.05-.05.11-.1.16-.15l.21-.21c-.55 0-1.5-.27-2.55-.72.4.26.8.51 1.22.74.24.13.48.26.73.37.05.02.1.03.14.05a.27.27 0 0 1 .08-.07h.01ZM269.23 68.49c-.39-.19-.82-.48-1.33-.87-3.06-1.56-6.31-2.78-9.36-2.35-3.5.49-5.7 1.11-7.74 2.44 5.71-2.6 12.82-2.07 18.44.79l-.01-.01ZM177.87 53.69l1.06.03c-.96-.22-2-.25-2.89-.3-4.95-.26-9.99.33-14.86 1.19-2.44.43-4.88.95-7.28 1.59 9.09-1.76 15.69-2.77 23.97-2.51ZM219.85 55.51c-.18.12-.36.27-.56.45-.45.53-.86 1.11-1.26 1.66-1.91 2.61-3.71 5.31-5.57 7.95l-.12.18 8.05-10.11c-.18-.05-.36-.1-.55-.13h.01ZM510.71 54.1c.12-.15.29-.3.53-.45.69-.4 3.72-.63 5.87-.74-.36-.02-.73-.04-1.09-.05-1.84-.03-3.67.09-5.49.35.05.3.12.59.18.88v.01ZM510.76 86.02c1.37-3.07 2.49-6.27 3.57-9.46.55-1.64 1.12-3.3 1.6-4.97-1.59 4.01-3.67 9.14-6.2 15.3.24-.08.5-.14.74-.22.1-.22.19-.44.29-.65ZM566.95 75.76c.11-.02.23.03.31.11-.05-.13-.09-.26-.14-.39-.05.09-.11.18-.17.28ZM511.33 86.41c3.08-.89 6.24-1.62 9.46-2.14-1.51-3.98-2.98-7.96-4.39-11.87-.05.15-.09.31-.14.46-1.02 3.32-2.15 6.61-3.39 9.85-.48 1.25-.98 2.49-1.53 3.7h-.01ZM578.24 74.45c.11-.44.23-.87.35-1.31-.31.7-.64 1.39-.97 2.08.09.21.19.4.28.61.12-.46.23-.92.35-1.38h-.01ZM520.62 53.11c-.09 0-.18-.01-.28-.02.38.34.29 1.08.93 2.53l6.65 17.15c2.2 5.68 4.69 11.36 7.41 16.87l1.06 2.17c-2.95-7.05-5.92-14.08-8.87-21.13-1.58-3.79-3.16-7.59-4.7-11.4-.78-1.92-1.73-3.89-2.25-5.91-.03-.1 0-.19.04-.26h.01ZM578.78 77.87c1.45-5.77 3.07-10.43 3.58-13.36.05-.34.16-.88.31-1.55-.67 1.79-1.37 3.56-2.08 5.33-.12.43-.23.86-.35 1.29-.65 2.43-1.29 4.86-1.9 7.3.14.33.29.65.43 1l.01-.01ZM545.3 94.66c.02-.44.03-.83.05-1.12.02-1.01.05-2.02.11-3.02.03-6.66-.46-14.33-1.46-22.8-.13-.42-.27-1.24-.56-2.89 0-.02 0-.04-.01-.06.62 6.61.95 13.25 1.32 19.87.17 3.08.33 6.16.52 9.23.02.25.03.52.04.78l-.01.01ZM580.77 102.81c.13.2.27.38.37.49.27-.11.53-.22.8-.32-.43.09-.82.05-1.17-.16v-.01ZM530.48 104.07h.33c-.36-.13-.71-.32-1.04-.56.14.24.3.47.45.7.06-.08.14-.13.26-.13v-.01ZM542.63 58.82c.06.23.11.47.15.71.14-.33.36-.62.7-.86-.28.05-.57.11-.85.15ZM583.81 57.87c.15-.7.29-1.41.42-2.11-.14.45-.28.9-.42 1.34-.46 1.44-.89 2.89-1.31 4.34.44-1.19.88-2.37 1.31-3.57ZM523.62 91.48c-4.66 1.17-9.05 2.89-14.02 5.27 4.65-1.84 9.48-3.29 14.28-4.63-.09-.22-.17-.41-.26-.64ZM460.64 78.3c-.04-2.9-.11-5.81-.28-8.71-.1-1.68-.17-3.43-.5-5.09-.07.02-.14.03-.2.05.3 6.54.45 12.17.51 17.12.17-.07.34-.14.51-.2 0-1.06-.01-2.11-.03-3.17h-.01ZM470.63 63.24c-3.38-.26-6.81.32-10.1 1.1.41 2.01.47 4.14.57 6.18.18 3.55.25 7.11.27 10.67 3.31-1.38 6.5-3.12 9.3-5.35 1.96-1.56 3.86-3.41 5.02-5.66.73-1.41 1.19-3.22.26-4.65-1.09-1.7-3.46-2.14-5.32-2.29ZM460.29 63.68c1-.24 2.01-.46 3.04-.65-1.15.16-2.37.38-3.71.69v.13c.07-.02.15-.04.22-.05.11-.13.3-.18.45-.11v-.01ZM457.24 100.96c.43-.03.86-.07 1.29-.11.14-.49.27-.99.38-1.49-.44.7-1 1.23-1.67 1.6ZM482.88 104.98c-.18.23-.36.38-.55.47.14.09.27.19.4.28a70.76 70.76 0 0 0 4.37-4.63c.76-.89 1.52-1.81 2.19-2.77-.3-.27-.61-.53-.92-.79-.07 1.94-4.62 6.32-5.49 7.45v-.01Z",
|
|
36134
36319
|
transform: "translate(-144.023 -51.76)"
|
|
36135
36320
|
}
|
|
36136
36321
|
),
|
|
36137
|
-
/* @__PURE__ */ (0,
|
|
36322
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
36138
36323
|
"path",
|
|
36139
36324
|
{
|
|
36140
36325
|
d: "M474.36 63.31c-.4-.16-.84-.27-1.29-.37 1.56.42 3.08 1.22 3.76 2.74.62 1.4.32 2.95-.28 4.32.7-1.22.94-2.34.74-3.47-.24-1.33-1.19-2.54-2.93-3.21v-.01ZM477.34 89.18c-1.2-.81-2.4-1.62-3.6-2.42-.14.1-.26.19-.4.29 1.4.67 2.73 1.39 4 2.13ZM465.88 93.85c.37.25.74.5 1.1.75.46.32.92.65 1.38.97-1.57-1.2-2.01-1.61-2.49-1.72h.01ZM574.92 90.06c-2.28-5.21-4.93-11.13-5.67-12.26-.1-.15-1.57-3.01-1.63-3.08 0 0-.01.02-.02.02.4 1.37 1.09 2.69 1.65 3.99 2.14 4.95 4.36 9.86 6.67 14.73.6 1.26 1.21 2.52 1.83 3.78-.75-2.01-1.64-4.45-2.83-7.18ZM448.73 65.29c.1.2.22.38.34.57.22-.02.43-.06.65-.08v-.08c-.14-.05-.25 0-.99-.41ZM460.16 94.81c-.02.31-.06.59-.1.89-.03 1.71-.33 3.43-.79 5.07.15-.02.3-.03.45-.05.01-.04.02-.08.03-.11.09-.34.15-.69.2-1.03.17-1.07.25-2.16.33-3.24.05-.69.08-1.39.12-2.08-.27.1-.27.26-.24.57v-.02Z",
|
|
36141
36326
|
transform: "translate(-144.023 -51.76)"
|
|
36142
36327
|
}
|
|
36143
36328
|
),
|
|
36144
|
-
/* @__PURE__ */ (0,
|
|
36329
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
36145
36330
|
"path",
|
|
36146
36331
|
{
|
|
36147
36332
|
d: "m328.67 98.12-3.22-6.58c-1.29-2.63-2.53-5.29-3.72-7.97-.25-.85-.52-1.69-.79-2.53-.81-2.57-1.67-5.12-2.55-7.67-1.92-5.53-3.9-11.08-6.32-16.41-.72-1.58-1.46-3.44-2.63-4.79-.03-.17-.16-.29-.34-.36a.282.282 0 0 0-.23-.04c-.06-.01-.12 0-.18.01-.74.06-1.5.38-2.19.61-2.22.77-4.4 1.64-6.63 2.38-.03-.08-.06-.16-.09-.25-.15-.42-.82-.24-.67.19.03.09.07.19.1.28l-.18.06c-.36.11-.28.6 0 .68.18 1.18.63 2.36.98 3.49.03.09.06.17.08.26-.08.23-.17.46-.24.64-.37.98-.79 1.94-1.21 2.9-1.27 2.89-2.62 5.75-3.98 8.6-3.18 6.67-6.44 13.31-9.64 19.97-1.08 2.25-2.2 4.5-3.15 6.81-.13.32.24.5.5.37 1.34 1.33 2.84 2.5 4.4 3.57.65.44 1.31.87 2.01 1.24.4.22.86.48 1.33.5.24.01.35-.19.33-.37.11-.1.21-.21.28-.28.41-.41.81-.84 1.2-1.26.85-.92 1.69-1.87 2.5-2.84 6.31-2.34 12.6-4.31 18.71-5.84 2.14 5.3 3.43 8.43 3.97 9.58.55 1.05 1.15 1.88 1.82 2.52 1.32.56 6.96-.03 9.23-1.96.87-1.28 1.19-2.67.93-4.15-.09-.5-.22-.95-.4-1.33l-.01-.03Zm-20.09-45.61c.43.77.83 1.56 1.21 2.35-.54-.45-1.27-.99-2.07-1.49-.42-.24-.6-.35-.94-.34.43-.15.85-.29 1.29-.41.17-.05.34-.08.51-.11Zm-25.86 45.66c.78-1.85 1.67-3.66 2.54-5.47 1.51-3.16 3.05-6.31 4.58-9.47 1.28-2.63 2.56-5.26 3.83-7.9l-1.1 2.66c-1.99 4.79-4.97 10.9-8.88 18.15-.43.76-.66 1.51-.71 2.24-.05-.05-.1-.09-.15-.14a.259.259 0 0 0-.11-.07Zm6.24 4.71c-.42-.23-.82-.48-1.22-.74 1.05.45 2 .72 2.55.72l-.21.21c-.05.05-.11.1-.16.15-.01.01-.04.03-.05.04 0-.02.03-.02.05-.03a.27.27 0 0 0-.08.07c-.05-.02-.1-.03-.14-.05-.25-.1-.49-.24-.73-.37h-.01Zm15.73-29.43c1.05 3.15 2.1 6.31 3.1 9.48.34 1.06.69 2.13 1.01 3.21-3.5.63-6.95 1.46-10.27 2.5 2.48-6.03 4.54-11.11 6.16-15.19Zm4.79 12.57c-.23-.79-.49-1.58-.73-2.36-.79-2.54-1.63-5.08-2.46-7.61l-1.2-3.6c.02-.04.04-.09.05-.13 1.6 4.45 3.28 9 5.01 13.57l-.67.12v.01Zm5.83-18.27-.15-.54c-.49-1.64-1.03-3.28-1.6-4.9.23.58.47 1.17.7 1.75 1.56 4.03 3.01 8.1 4.39 12.2-.33-.82-.67-1.64-.98-2.46l-2.35-6.05h-.01ZM390.43 79.37c-.13-10.43-.22-17.5-.24-19.97-.24-1.6.21-2.88-.65-3.65-.14-.13-.32-.23-.52-.32h.03c.45 0 .45-.69 0-.7-1.75-.03-3.5-.04-5.25-.14-1.38-.08-2.76-.21-4.15-.31-.07 0-.12.01-.17.04-.21-.07-.47.03-.45.31l.03.45c-.11.14-.19.3-.22.5-.21 1.26-.32 13.67-.36 23.59-.32 5.79-.67 11.57-.97 17.36-.09 1.73-.29 3.54-.21 5.3-.39.02-.38.64.04.69v.12c.05.44.74.45.7 0v-.06c1.1.09 2.2.21 3.3.3 1.14.19 2.44.2 3.29.17 1.73-.05 2.92-.05 3.8-.37.45-.05.9-.11 1.35-.17.44-.06.25-.73-.19-.67h-.01c.24-.32.45-.72.62-1.25.66-1.84.41-6.36.34-11.33l-.13-9.9.02.01Zm-12.26 18.17c.09-1.91.2-3.81.31-5.71.06 5.38 0 6.14-.01 6.51-.05 1.65-.21 2.81.72 3.66-.39-.04-.78-.07-1.17-.1-.06-1.44.09-2.93.16-4.35l-.01-.01ZM588.97 53.85c-2.06-.25-3.17-.51-3.76-.6a.3.3 0 0 1 .04-.08c.22-.39-.39-.75-.6-.35-.56 1.02-.9 2.19-1.26 3.29-.61 1.88-1.17 3.78-1.72 5.68-.63 2.19-1.24 4.39-1.83 6.59-.81 2.03-1.67 4.05-2.61 6.03-1.7-3.64-3.11-6.04-4.03-7.57-2.26-3.74-2.85-5.48-3.57-6.08l.31-.09c.43-.12.25-.8-.19-.67-1.06.3-2.12.6-3.17.95-.93.32-1.85.69-2.76 1.07-.13.05-.19.16-.22.27-.04.02-.08.05-.11.07-.04-.06-.07-.12-.11-.18a.354.354 0 0 0-.48-.12c-.16.09-.22.32-.13.48l.33.54c0 .09.02.18.06.28.51 1.16.78 1.38.72 1.47-2.42 3.44-5.41 7.86-6.2 9.1-1.27 1.97-2.01 3.14-2.45 3.84l-.91-6.56-.43-4.1c-.19-1.85-.37-3.23-.53-4.13-.19-1.1-.3-2.15-.45-3.16-.2-1.36-.29-2.06-.47-2.42h.04c.45.02.45-.68 0-.7-3.43-.16-6.81.94-10.17 1.48-.24-.22-.73-.04-.58.32.24.59.33 1.25.43 1.87.17 1.06.29 2.13.4 3.2.32 3.09.53 6.2.74 9.3.44 6.75.77 13.51 1.17 20.26.11 1.95.13 3.96.46 5.89.05.3.37.31.55.14.74 1.71 2.87 1.27 6.13 1.27 1.34 0 2.39.04 2.99-.11.02.32.48.53.63.18 3.61-8.26 7.41-16.46 12.05-24.2.03-.05.04-.1.05-.15.3.73.64 1.45.94 2.16.97 2.26 1.97 4.52 2.98 6.76 2.26 5.03 4.54 10.07 7.09 14.96.47.9.94 1.79 1.47 2.65.2.32.4.67.66.96-.18.25 0 .68.34.54.91-.38 1.82-.75 2.76-1.07 1.04-.35 2.11-.65 3.17-.95.39-.11.28-.66-.07-.68.62-.4.95-.96.87-1.91-.3-3.34.72-7.47.86-8.52l2.14-11.43c1.75-10.74 3.13-17.51 3.23-20.86.02-.49.08-2.84.13-3.24.17-1.25.48-1-4.96-1.65l.03-.02Zm-46.19 5.67c-.04-.24-.09-.48-.15-.71l.85-.15c-.34.24-.56.53-.7.86Zm1.95 25.12c-.36-6.63-.7-13.26-1.32-19.87 0 .02 0 .04.01.06.29 1.65.44 2.47.56 2.89 1 8.46 1.5 16.14 1.46 22.8-.06.99-.1 2-.11 3.02-.01.29-.03.68-.05 1.12-.01-.26-.03-.53-.04-.78-.19-3.08-.35-6.16-.52-9.23l.01-.01Zm36.4 18.66c-.11-.11-.24-.29-.37-.49.35.21.74.26 1.17.16-.27.11-.53.22-.8.32v.01Zm-.89-33.72c.12-.43.23-.86.35-1.29.71-1.77 1.41-3.55 2.08-5.33-.15.68-.26 1.22-.31 1.55-.5 2.94-2.13 7.59-3.58 13.36-.15-.35-.29-.66-.43-1 .61-2.44 1.25-4.87 1.9-7.3l-.01.01Zm3.56-12.48c.14-.44.28-.89.42-1.34-.13.7-.27 1.41-.42 2.11-.43 1.19-.86 2.38-1.31 3.57.42-1.45.85-2.9 1.31-4.34Zm-5.22 16.05c-.11.44-.23.87-.35 1.31-.12.46-.23.92-.35 1.38-.1-.22-.19-.4-.28-.61.34-.69.66-1.38.97-2.08h.01Zm-11.64 2.62c.06-.1.12-.19.17-.28.05.13.09.26.14.39a.398.398 0 0 0-.31-.11Zm2.3 2.98c-.56-1.3-1.25-2.63-1.65-3.99 0 0 .01-.02.02-.02.06.08 1.52 2.93 1.63 3.08.73 1.13 3.38 7.04 5.67 12.26 1.2 2.73 2.08 5.17 2.83 7.18-.62-1.25-1.23-2.51-1.83-3.78-2.31-4.87-4.53-9.78-6.67-14.73ZM275.92 87.03c-1.06-2.18-1.13-3.45-2.44-2.93-1.52.57-2.94 1.3-4.5 2.1-1.4.72-2.68 1.44-3.92 2.12.01-.25-.24-.5-.51-.34-4.8 2.93-12.41 4.7-17.28 1.31-1.98-1.77-3.32-4.15-3.97-5.78-.29-.95-.49-1.94-.63-2.93-.14-3.34 1.58-6.53 3.9-9.12.8-.79 1.68-1.51 2.66-2.12 3.7-2.3 8.22-3.07 12.51-2.51 2.71.35 5.32 1.24 7.71 2.55.39.22.75-.39.35-.6-.18-.1-.37-.18-.55-.27.56.27 1.03.33 1.51.19l-.48.39c-.15.11-.23.3-.13.48.09.15.33.24.48.13 1.3-.97 2.46-2.09 3.45-3.37.37-.29.64-.6.65-.97v-.02c.08-.33-.03-.7-.21-1.08-.31-.87-.98-2.01-2.19-3.26-2.43-2.52-3.79-3.45-5.68-4.26-1.14-.49-3.12-1.06-4.42-1.23-3.28-.42-10.64-1.21-18.18 4.11-7.74 5.46-11.94 12.3-12.23 20.61-.08 2.06.04 3.98.34 5.71.74 4.18 2.57 8 5.44 11.34 4.26 4.99 9.76 7.52 16.34 7.52 4.85 0 9.69-1.77 14.89-4.62.23-.12.45-.23.68-.35 2.19-1.1 4.37-2.23 6.46-3.5.49-.3 1.03-.61 1.5-.98 1.47-.87 1.11-1.12.49-2.95-.39-1.14-.76-2.7-2.06-5.36l.02-.01Zm-17.38-21.76c3.05-.42 6.31.79 9.36 2.35.51.39.94.68 1.33.87-5.61-2.86-12.72-3.39-18.44-.79 2.05-1.33 4.24-1.95 7.74-2.44l.01.01ZM443.67 72.67c-.4-2.2-1.15-4.33-2.37-6.22-1.49-2.32-3.58-4.19-5.91-5.64-6.17-3.81-13.75-5.11-20.83-6.01-3.23-.41-6.47-.69-9.72-.92l-1.39-.12c-.85-.07-1.52-.1-2.05-.1-1.08-.06-2.17-.12-3.25-.17-.08 0-.14.02-.19.05-.1.05-.18.14-.16.3.27 2.55-.01 5.12-.92 7.52-.15.38.4.56.62.28 1.32.59 2.68 1.05 4.08 1.37 0 2.78-.14 7.58-.33 12.91 0 0 0 .02-.01.03-.61 3.66-.79 7.42-1 11.12-.23 4.01-.43 8.03-.44 12.05 0 .64 0 1.28.03 1.93.02.31 0 .68.15.96.06.11.14.16.24.17-.2.17-.21.54.11.59 3.83.67 7.78.71 11.68.25 2.3-.19 4.87-.65 7.65-1.56 1.85-.54 3.67-1.18 5.43-1.91 7.2-3.02 14.31-8.07 17.35-15.53.76-1.86 1.17-3.8 1.31-5.75.3-1.93.28-3.82-.09-5.58l.01-.02Zm-19.32-15.42c5.74 1.41 11.94 3.68 15.65 8.55.25.32.47.65.69.99-2.3-2.82-5.68-5.69-12.88-8.23-2.16-.76-4.35-1.43-6.64-2.02 1.06.21 2.13.45 3.18.71Zm-25.82-3.04c.13 0 .27.01.4.02-.14.1-.26.23-.37.38 0-.13-.02-.26-.03-.4Zm34.82 22.17c-.75 3.09-3.55 5.66-5.88 7.58-3.35 2.76-7.21 5.03-11.28 6.54-1.33.49-2.71.9-4.12 1.15.06-1.38.08-2.76.07-4.13-.02-3.78-.16-7.56-.41-11.33-.09-1.37-.18-2.74-.37-4.1 0-.06-.03-.11-.06-.15.09-3.25.12-6.16.03-8.12 6.86 1.05 10.56 2.17 14.06 3.62 5.52 2.28 8.59 5.44 7.97 8.96l-.01-.02Zm-22 16.15c-.12 0-.23-.02-.34-.03l.34-.03v.06Zm-.69-.7c0-3.13.26-8.84.47-14.51.06 1.2.11 2.41.15 3.6.15 3.6.25 7.23.09 10.83-.24.03-.48.05-.71.07v.01Zm-12.33-30.94c.37.63 2.01 1.01 3.23 1.25v.15c-1.31-.31-2.59-.73-3.83-1.29.12-.36.23-.72.33-1.09.08.48.18.84.27.98Zm13.7 31.65v-.18c3.41-.56 6.71-2.02 9.69-3.68 2.31-1.28 4.59-2.78 6.63-4.53-4.69 4.53-11.61 8.24-16.33 8.38l.01.01Zm24.07-.75c-2.05 1.93-4.37 3.56-6.83 4.95 2.7-1.78 5.52-4.03 8.42-6.87.82-.82 1.56-1.69 2.23-2.59-1.08 1.65-2.38 3.16-3.81 4.51h-.01ZM187.16 92.14c-.79-2.47-2.1-7.12-3.1-6.87-.19-.01-2.09.77-4.08 1.54-3.06 1.18-5.91 2.13-10.09 2.82-2.74.42-5.87 1.01-10.61 1.06.04-3.34.05-6.01.05-7.99 7.97-.65 12.33-2.11 16.37-3.55 1.11-.39 2.69-1.01 2.63-1.8-.08-.35-.55-1.39-1.17-2.61-.47-1.16-.98-2.31-1.61-3.38-.42-.71-1.04-1.69-1.86-2.06-.11-.08-.22-.13-.29-.12-.02 0-.04 0-.07.01-.19-.04-.39-.05-.6-.01-.17.03-.24.15-.25.28-.04.02-.09.04-.14.05-4.33 1.48-8.85 2.33-13.24 3.61a499.1 499.1 0 0 0-.31-8.19c4.51-.99 8.88-1.38 13.11-1.82 3.68-.38 6.28.12 7.47.34.59.11.9.16 1.16.18h.1c-.1.37.44.66.62.28.02-.04.03-.08.05-.13.15.2.53.22.62-.1.17-.58.19-1.21.21-1.81v-.36c.03-.15.05-.3.07-.45.52-2.47.33-5.09-.64-7.44-.11-.27-.44-.28-.6-.14-.08-.21-.15-.42-.24-.62-.19-.41-.79-.05-.6.35.03.07.05.15.09.22-.98-.42-2.15-.54-3.17-.63-2.17-.19-4.37-.14-6.54 0-5.7.35-11.4 1.3-16.91 2.79-2.08.56-4.13 1.22-6.14 2-4.54 1.05-3.79 1.51-2.17 6.07.18.51.46 1.68.54 1.94.82 2.47 1.08 2.13 3.1 2.13s0 .05 0 .08h.52c-.48 2.66-.51 5.45-.62 8.13-.15 3.48-.22 6.96-.28 10.45 0 .41-.01.82-.02 1.23-.16.29-.33.57-.51.85-.05.38-.09.77-.14 1.18-.42 3.52-.59 6.48-.52 8.8v.34c.02.47.05.76.06.87.16 1.57-.26 3.47 1.35 3.79 1.61.32 3.5.55 4.85.55.11 0 .22-.02.33-.02 1.79.24 3.67.05 5.45-.12 2.85-.28 5.69-.7 8.51-1.19 3.03-.53 6.05-1.14 9.04-1.86 2.4-.58 4.82-1.19 7.13-2.06.51-.19 1.73-.57 2.46-1.14 1.81-.68 2.18-1 1.57-2.67-.23-.62-.48-1.49-.91-2.78l-.03-.02Zm-11.12-38.71c.89.05 1.93.08 2.89.3-.33 0-.68-.02-1.06-.03-8.28-.26-14.88.75-23.97 2.51 2.41-.64 4.85-1.16 7.28-1.59 4.87-.86 9.91-1.45 14.86-1.19Zm-26.53 22.13c.03 1.71.04 3.43 0 5.14-.04 1.27-.11 2.55-.24 3.82 0-.73.02-1.46.04-2.19.05-2.26.12-4.51.22-6.77h-.02Zm6.73 27.85c.2-.1.4-.21.58-.33 1.82-.17 3.82-.24 5.94-.34-.86.11-1.72.24-2.58.33-1.27.14-2.61.31-3.93.34h-.01ZM534.48 85.44c-3.52-8.38-7.07-16.75-10.5-25.17-.63-1.54-1.25-3.09-1.86-4.65-.31-.8-.65-1.6-.87-2.43-.04-.17-.17-.24-.31-.25.1-.2 0-.51-.29-.53-1.59-.08-3.18-.22-4.78-.25-1.96-.03-3.91.13-5.84.42-.31.05-.31.38-.13.56-.03.06-.05.14-.04.22.23 1.54.63 3.06 1.16 4.53.13.35.27.7.41 1.06l-2.68 6.18c-.11.03-.2.09-.25.22-.67 1.9-1.52 3.73-2.34 5.56a536.85 536.85 0 0 1-3.9 8.45c-2.64 5.64-5.34 11.25-7.91 16.93-.44.97-.88 1.94-1.29 2.93-.2.48-.47 1-.55 1.52v.05c-.02.12.02.26.16.34 1.19.73 2.41 1.41 3.66 2.05 1.2.62 2.45 1.25 3.76 1.61.43.12.62-.55.19-.67-1.13-.31-2.2-.83-3.24-1.36 1.09.36 2.1.69 2.75.93 2.82 1.01 2.38 1.1 4.3-3.75 2.1-1.09 4.34-1.96 6.53-2.79 4.35-1.64 8.8-3.03 13.27-4.29.82 2.01 1.77 3.97 2.72 5.92.35.83.62 1.45.79 1.82.22.42.45.8.69 1.15.17.33.33.67.5 1 .42.8.84 1.63 1.4 2.35.23.29.6 0 .55-.31 1.53-.02 3.06-.07 4.58-.27.92-.12 1.82-.32 2.71-.54 1.39-.27 3.85-1.11 3.74-1.42-.67-1.96-1.55-3.87-2.34-5.78-1.57-3.78-3.16-7.56-4.75-11.33v-.01Zm-11.65-26.16c1.54 3.81 3.12 7.6 4.7 11.4 2.94 7.05 5.91 14.09 8.87 21.13l-1.06-2.17c-2.71-5.51-5.2-11.19-7.41-16.87l-6.65-17.15c-.65-1.45-.55-2.19-.93-2.53.09 0 .18.01.28.02a.29.29 0 0 0-.04.26c.52 2.02 1.47 3.98 2.25 5.91h-.01Zm-6.58 13.58c.05-.15.09-.31.14-.46 1.41 3.92 2.88 7.9 4.39 11.87-3.22.52-6.38 1.25-9.46 2.14.55-1.22 1.05-2.46 1.53-3.7 1.24-3.24 2.37-6.53 3.39-9.85h.01Zm-.23-20c.36 0 .73.03 1.09.05-2.15.1-5.18.33-5.87.74-.24.15-.41.3-.53.45-.06-.29-.13-.58-.18-.88 1.82-.26 3.65-.39 5.49-.35v-.01Zm-.09 18.72c-.49 1.67-1.05 3.33-1.6 4.97-1.07 3.19-2.19 6.38-3.57 9.46-.09.21-.19.43-.29.65-.25.07-.5.14-.74.22 2.53-6.16 4.61-11.29 6.2-15.3Zm-6.34 25.16c4.97-2.38 9.37-4.1 14.02-5.27l.26.64c-4.8 1.35-9.63 2.8-14.28 4.63Zm20.17 6.76c.33.23.68.42 1.04.56h-.33c-.12 0-.21.06-.26.13-.15-.23-.31-.45-.45-.7v.01ZM226.57 91.75c-3.55-4.74-6.68-9.11-9.31-12.99 9.2-15.25 10.05-17.81 10.35-18.38.17-.34 1.09-2.27.64-2.53-1.13-.65-1.03-.65-2.97-1.71-1.19-.65-3.04-1.61-4.53-2.12-1.71-.59-1.24-.36-3 2.77-.06.1-.11.2-.17.3-.75 1.02-1.48 2.05-2.2 3.09-1.88 2.71-3.73 5.45-5.69 8.1-3.68-4.91-6.88-8.76-9.51-11.43-.15-.15-.3-.29-.46-.42-1.27-1.28-7.24 3.53-7.93 5.58-.09.09-.19.16-.28.25-.27.26.03.64.33.58.19.65.5 1.29.94 1.91 3.85 5.06 7.19 9.76 9.94 14-1.23 2.61-3.06 5-4.67 7.38l-2.28 3.33c-.5.66-.93 1.23-1.29 1.69-.67.93-2.09 2.61-2.3 3.87-.51.85-1.16 1.84-1.29 2.83-.06.44.61.63.67.19.01-.08.04-.15.06-.22 1.36 1.08 2.76 2.11 4.19 3.11 1.3.91 2.62 1.85 4.04 2.56.21.1.4 0 .48-.17.24.07.48.14.72.2.44.1.62-.57.19-.67-2.02-.48-3.77-1.57-5.23-3.02-.47-.46-.9-.96-1.32-1.46 1.74 1.35 4.2 2.89 5.89 4.14 1.39 1.03 2.85-2.27 4.22-4.2 1.86-2.64 3.96-5.86 5.52-8.29l10.39 14.51c.67.81 1.14 1.21 1.57 1.36-.05.24.12.51.41.4 1.53-.58 3.05-1.19 4.54-1.87 1.52-.69 3.06-1.45 4.36-2.5a.28.28 0 0 0 .12-.23c1.66-1.1.81-1.74-1.41-4.91-1.13-1.58-1.71-2.36-3.7-5.01l-.03-.02Zm2.41 6.54c.56 1.15 1.19 2.52 1.11 3.81-.06.04-.12.07-.17.1-.03-.88-.55-2.66-.94-3.91Zm-16.51-32.73c1.86-2.65 3.65-5.35 5.57-7.95.4-.55.81-1.13 1.26-1.66.19-.18.38-.33.56-.45.18.03.36.08.55.13l-8.05 10.11.12-.18h-.01ZM192.7 95.48c.79-1.37 1.66-2.69 2.54-4 1.19-1.79 2.4-3.56 3.61-5.33-.04.09-.09.17-.13.26-.1.22.03.41.2.49-2.47 3.42-4.89 6.73-6.4 9.28.21.24.4.48.63.75-.24.07-.4.36-.17.56.4.33.72.77 1.05 1.17.09.11.18.21.27.32-.84-.61-1.66-1.24-2.47-1.88.24-.57.58-1.11.87-1.61v-.01Zm7.46-10.32c.47-.81.98-1.59 1.49-2.37.31-.48.64-.95.96-1.43.26-.29.52-.56.75-.79-.99 1.48-2.09 3.03-3.2 4.59Zm10.03-16.22s-.03-.05-.05-.07c.22-.29.43-.59.64-.89-.2.32-.4.65-.58.96h-.01ZM371.54 87.96c-.01-.08-.01-.16-.03-.23-.06-.38-.58-.29-.66.03-.3-.05-.6-.08-.81-.11-1.14-.15-2.29-.19-3.44-.2 1.04-.09 2.09-.18 3.14-.23.45-.02.45-.72 0-.7-6.57.35-13.14 1.23-19.65 2.11-1.53.21-3.05.42-4.57.68-.01 0-.02.01-.04.01-.04-3.33-.13-6.66-.24-9.99-.19-5.7-.4-11.41-.88-17.1-.13-1.51-.23-3.07-.49-4.58 0-.25 0-.48-.02-.68-.06-1.19-.04-2.61-.68-2.78-.16-.07-.72-.16-1.5-.24.22-.17.16-.62-.2-.63-1.19-.04-2.39.09-3.57.23-1.2.14-2.41.32-3.59.6-.16-.1-.41-.06-.5.12-.06.02-.13.03-.19.05-.35.1-.29.55-.03.66-.26.6-.19 2.27-.21 3-.02.66-.66 33.73-.9 40.3-.03.65.06 1.12.04 1.45-.16 3.05.87 4.96 6.34 3.93 1.09-.08 2.75-.77 5.36-1.43 4.13-1.04 5.78-1.52 6.2-1.65 6.43-1.69 6.78-1.97 11.72-2.43.55-.05 4.8-.38 6.03-.3.64.04 1.19.07 1.65.1.09 0 .16-.03.24-.05.1.27.56.33.66-.02.39-1.32.61-2.71.78-4.08.2-1.61.29-3.24.15-4.86.24.03.52-.23.38-.53-.09-.2-.27-.33-.49-.43v-.02Zm-.63.56c.07.57.11 1.14.11 1.71-.21-.99-.53-1.71-.95-1.87.22.03.44.06.65.11.06.01.12.04.19.05Zm-25.41 1.73c1.54-.36 3.1-.64 4.66-.89-1.61.37-3.18.77-4.66 1.2v-.31Zm-.86-7.37c-.07-1.37-.16-2.75-.25-4.12-.21-3.13-.45-6.27-.79-9.4.02-2.25.08-4.31.13-6.11.16 2.08.29 4.16.4 6.24.23 4.46.38 8.93.5 13.39h.01Zm-.94-4c.16 2.41.29 4.83.39 7.24.06 1.6.14 3.22.09 4.83-.15.05-.32.09-.47.14V78.88h-.01ZM483.72 92.83c-3.05-2.28-6.22-4.4-9.38-6.51 8.86-6.49 13.49-12.95 13.73-19.23.04-.76 0-1.5-.13-2.2-.67-3.82-3.5-6.68-8.39-8.48.13.04.27.08.4.13 3.92 1.39 7.74 4.23 8.5 8.56.34 1.95-.05 3.96-.98 5.69-.21.4.39.75.6.35 1.86-3.46 1.46-7.55-.97-10.63-3.53-4.47-9.76-5.88-15.16-6.16-2.32-.12-4.64-.04-6.95.19-6 .32-12.71 1.68-17.63 3.21-.37.11-.67.23-.92.35-.2-.17-.62.02-.57.37v.03c-.64.68-.18 1.64.48 3.21.38.91.67 1.89 1.15 2.58.32.76.68 1.51 1.13 2.19.14.21.38.19.53.07.19-.02.38-.05.57-.08v1.57c-.06.06-.1.13-.11.23-.27 4.18-.34 8.38-.48 12.57l-.3 9.03c-.24 3.91-.44 6.77-.46 7.26-.05.88-.11 1.95.07 2.81-.01.22-.02.43-.04.65 0 .11-.02.23-.03.35 0 .05-.03.27-.01.16-.05.4.5.59.64.28.05.04.12.08.2.08 1.75.13 3.5.28 5.25.3 1.69.02 3.38-.12 5.06-.32.08.23.36.39.55.15.06-.08.11-.17.16-.26.18-.09.24-.32.18-.48.05-.2.1-.4.13-.6.16-.86.25-1.74.33-2.62.11-1.17.17-2.34.23-3.51.15-.01.32-.03.52-.04.36-.03 1.73-.15 2.06-.15.39 0 .7-.02.95-.04 1.76 1.11 3.45 2.35 5.14 3.55 2.83 2.01 5.64 4.04 8.47 6.04 1.42 1 2.85 2 4.29 2.97.1.06.19.07.27.04.08 0 .17-.02.25-.1 1.61-1.56 3.15-3.18 4.6-4.88.75-.88 1.49-1.78 2.15-2.73.01.01.03.02.04.03.34.3.83-.2.49-.49-2.16-1.9-4.34-3.76-6.64-5.48l.03-.01Zm-6.38-3.65a55.72 55.72 0 0 0-4-2.13c.14-.1.26-.19.4-.29 1.2.81 2.4 1.61 3.6 2.42Zm-20.1 11.78c.67-.37 1.23-.91 1.67-1.6-.11.5-.24 1-.38 1.49-.43.04-.86.08-1.29.11Zm2.38-37.24c1.34-.31 2.56-.52 3.71-.69-1.03.19-2.04.41-3.04.65-.14-.07-.34-.02-.45.11-.07.02-.15.04-.22.05v-.13.01Zm.04.84c.07-.02.14-.03.2-.05.34 1.66.41 3.41.5 5.09.17 2.9.24 5.81.28 8.71l.03 3.17c-.17.07-.34.14-.51.2-.06-4.96-.21-10.58-.51-17.12h.01Zm16.04 5.62c-1.16 2.25-3.06 4.1-5.02 5.66-2.8 2.23-5.99 3.97-9.3 5.35-.01-3.56-.09-7.12-.27-10.67-.1-2.04-.16-4.16-.57-6.18 3.3-.78 6.72-1.36 10.1-1.1 1.85.14 4.23.59 5.32 2.29.92 1.43.46 3.24-.26 4.65Zm.85-.18c.6-1.37.9-2.92.28-4.32-.67-1.52-2.2-2.32-3.76-2.74.46.1.89.21 1.29.37 1.74.67 2.69 1.88 2.93 3.21.2 1.13-.05 2.25-.74 3.47V70Zm-27.47-4.14c-.12-.19-.23-.38-.34-.57.74.42.85.36.99.41v.08c-.22.03-.43.06-.65.08Zm11.21 30.46c-.08 1.08-.16 2.17-.33 3.24-.05.35-.11.69-.2 1.03 0 .04-.02.07-.03.11-.15.02-.3.04-.45.05.45-1.64.76-3.36.79-5.07.03-.29.08-.57.1-.89-.03-.31-.03-.47.24-.57-.04.69-.07 1.39-.12 2.08v.02Zm5.6-2.47c.48.11.92.52 2.49 1.72-.46-.32-.92-.65-1.38-.97-.37-.25-.73-.5-1.1-.75h-.01Zm21.23 7.24a70.76 70.76 0 0 1-4.37 4.63c-.14-.09-.27-.19-.4-.28.19-.09.37-.24.55-.47.87-1.14 5.43-5.51 5.49-7.45.31.26.62.53.92.79-.67.97-1.42 1.88-2.19 2.77v.01Z",
|
|
@@ -36157,24 +36342,24 @@ var ExcalidrawLogo = ({
|
|
|
36157
36342
|
size = "small",
|
|
36158
36343
|
withText
|
|
36159
36344
|
}) => {
|
|
36160
|
-
return /* @__PURE__ */ (0,
|
|
36161
|
-
/* @__PURE__ */ (0,
|
|
36162
|
-
withText && /* @__PURE__ */ (0,
|
|
36345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: `ExcalidrawLogo is-${size}`, style, children: [
|
|
36346
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(LogoIcon, {}),
|
|
36347
|
+
withText && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(LogoText, {})
|
|
36163
36348
|
] });
|
|
36164
36349
|
};
|
|
36165
36350
|
|
|
36166
36351
|
// components/welcome-screen/WelcomeScreen.Center.tsx
|
|
36167
|
-
var
|
|
36352
|
+
var import_jsx_runtime130 = __toESM(require_jsx_runtime(), 1);
|
|
36168
36353
|
var WelcomeScreenMenuItemContent = ({
|
|
36169
36354
|
icon,
|
|
36170
36355
|
shortcut,
|
|
36171
36356
|
children
|
|
36172
36357
|
}) => {
|
|
36173
36358
|
const device = useDevice();
|
|
36174
|
-
return /* @__PURE__ */ (0,
|
|
36175
|
-
/* @__PURE__ */ (0,
|
|
36176
|
-
/* @__PURE__ */ (0,
|
|
36177
|
-
shortcut && !device.editor.isMobile && /* @__PURE__ */ (0,
|
|
36359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
|
|
36360
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "welcome-screen-menu-item__icon", children: icon }),
|
|
36361
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "welcome-screen-menu-item__text", children }),
|
|
36362
|
+
shortcut && !device.editor.isMobile && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "welcome-screen-menu-item__shortcut", children: shortcut })
|
|
36178
36363
|
] });
|
|
36179
36364
|
};
|
|
36180
36365
|
WelcomeScreenMenuItemContent.displayName = "WelcomeScreenMenuItemContent";
|
|
@@ -36186,14 +36371,14 @@ var WelcomeScreenMenuItem = ({
|
|
|
36186
36371
|
className = "",
|
|
36187
36372
|
...props
|
|
36188
36373
|
}) => {
|
|
36189
|
-
return /* @__PURE__ */ (0,
|
|
36374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
36190
36375
|
"button",
|
|
36191
36376
|
{
|
|
36192
36377
|
...props,
|
|
36193
36378
|
type: "button",
|
|
36194
36379
|
className: `welcome-screen-menu-item ${className}`,
|
|
36195
36380
|
onClick: onSelect,
|
|
36196
|
-
children: /* @__PURE__ */ (0,
|
|
36381
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(WelcomeScreenMenuItemContent, { icon, shortcut, children })
|
|
36197
36382
|
}
|
|
36198
36383
|
);
|
|
36199
36384
|
};
|
|
@@ -36206,7 +36391,7 @@ var WelcomeScreenMenuItemLink = ({
|
|
|
36206
36391
|
className = "",
|
|
36207
36392
|
...props
|
|
36208
36393
|
}) => {
|
|
36209
|
-
return /* @__PURE__ */ (0,
|
|
36394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
36210
36395
|
"a",
|
|
36211
36396
|
{
|
|
36212
36397
|
...props,
|
|
@@ -36214,38 +36399,38 @@ var WelcomeScreenMenuItemLink = ({
|
|
|
36214
36399
|
href,
|
|
36215
36400
|
target: "_blank",
|
|
36216
36401
|
rel: "noreferrer",
|
|
36217
|
-
children: /* @__PURE__ */ (0,
|
|
36402
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(WelcomeScreenMenuItemContent, { icon, shortcut, children })
|
|
36218
36403
|
}
|
|
36219
36404
|
);
|
|
36220
36405
|
};
|
|
36221
36406
|
WelcomeScreenMenuItemLink.displayName = "WelcomeScreenMenuItemLink";
|
|
36222
36407
|
var Center = ({ children }) => {
|
|
36223
36408
|
const { WelcomeScreenCenterTunnel } = useTunnels();
|
|
36224
|
-
return /* @__PURE__ */ (0,
|
|
36225
|
-
/* @__PURE__ */ (0,
|
|
36226
|
-
/* @__PURE__ */ (0,
|
|
36227
|
-
/* @__PURE__ */ (0,
|
|
36228
|
-
/* @__PURE__ */ (0,
|
|
36229
|
-
/* @__PURE__ */ (0,
|
|
36409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(WelcomeScreenCenterTunnel.In, { children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "welcome-screen-center", children: children || /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
|
|
36410
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Logo, {}),
|
|
36411
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Heading, { children: t("welcomeScreen.defaults.center_heading") }),
|
|
36412
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(Menu, { children: [
|
|
36413
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(MenuItemLoadScene, {}),
|
|
36414
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(MenuItemHelp, {})
|
|
36230
36415
|
] })
|
|
36231
36416
|
] }) }) });
|
|
36232
36417
|
};
|
|
36233
36418
|
Center.displayName = "Center";
|
|
36234
36419
|
var Logo = ({ children }) => {
|
|
36235
|
-
return /* @__PURE__ */ (0,
|
|
36420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "welcome-screen-center__logo virgil welcome-screen-decor", children: children || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ExcalidrawLogo, { withText: true }) });
|
|
36236
36421
|
};
|
|
36237
36422
|
Logo.displayName = "Logo";
|
|
36238
36423
|
var Heading = ({ children }) => {
|
|
36239
|
-
return /* @__PURE__ */ (0,
|
|
36424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "welcome-screen-center__heading welcome-screen-decor virgil", children });
|
|
36240
36425
|
};
|
|
36241
36426
|
Heading.displayName = "Heading";
|
|
36242
36427
|
var Menu = ({ children }) => {
|
|
36243
|
-
return /* @__PURE__ */ (0,
|
|
36428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "welcome-screen-menu", children });
|
|
36244
36429
|
};
|
|
36245
36430
|
Menu.displayName = "Menu";
|
|
36246
36431
|
var MenuItemHelp = () => {
|
|
36247
36432
|
const actionManager = useExcalidrawActionManager();
|
|
36248
|
-
return /* @__PURE__ */ (0,
|
|
36433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
36249
36434
|
WelcomeScreenMenuItem,
|
|
36250
36435
|
{
|
|
36251
36436
|
onSelect: () => actionManager.executeAction(actionShortcuts),
|
|
@@ -36262,7 +36447,7 @@ var MenuItemLoadScene = () => {
|
|
|
36262
36447
|
if (appState.viewModeEnabled) {
|
|
36263
36448
|
return null;
|
|
36264
36449
|
}
|
|
36265
|
-
return /* @__PURE__ */ (0,
|
|
36450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
36266
36451
|
WelcomeScreenMenuItem,
|
|
36267
36452
|
{
|
|
36268
36453
|
onSelect: () => actionManager.executeAction(actionLoadScene),
|
|
@@ -36277,7 +36462,7 @@ var MenuItemLiveCollaborationTrigger = ({
|
|
|
36277
36462
|
onSelect
|
|
36278
36463
|
}) => {
|
|
36279
36464
|
const { t: t3 } = useI18n();
|
|
36280
|
-
return /* @__PURE__ */ (0,
|
|
36465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(WelcomeScreenMenuItem, { shortcut: null, onSelect, icon: usersIcon, children: t3("labels.liveCollaboration") });
|
|
36281
36466
|
};
|
|
36282
36467
|
MenuItemLiveCollaborationTrigger.displayName = "MenuItemLiveCollaborationTrigger";
|
|
36283
36468
|
Center.Logo = Logo;
|
|
@@ -36291,40 +36476,40 @@ Center.MenuItemLiveCollaborationTrigger = MenuItemLiveCollaborationTrigger;
|
|
|
36291
36476
|
|
|
36292
36477
|
// components/welcome-screen/WelcomeScreen.Hints.tsx
|
|
36293
36478
|
init_define_import_meta_env();
|
|
36294
|
-
var
|
|
36479
|
+
var import_jsx_runtime131 = __toESM(require_jsx_runtime(), 1);
|
|
36295
36480
|
var MenuHint = ({ children }) => {
|
|
36296
36481
|
const { WelcomeScreenMenuHintTunnel } = useTunnels();
|
|
36297
|
-
return /* @__PURE__ */ (0,
|
|
36482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(WelcomeScreenMenuHintTunnel.In, { children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--menu", children: [
|
|
36298
36483
|
WelcomeScreenMenuArrow,
|
|
36299
|
-
/* @__PURE__ */ (0,
|
|
36484
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "welcome-screen-decor-hint__label", children: children || t("welcomeScreen.defaults.menuHint") })
|
|
36300
36485
|
] }) });
|
|
36301
36486
|
};
|
|
36302
36487
|
MenuHint.displayName = "MenuHint";
|
|
36303
36488
|
var ToolbarHint = ({ children }) => {
|
|
36304
36489
|
const { WelcomeScreenToolbarHintTunnel } = useTunnels();
|
|
36305
|
-
return /* @__PURE__ */ (0,
|
|
36306
|
-
/* @__PURE__ */ (0,
|
|
36490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(WelcomeScreenToolbarHintTunnel.In, { children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--toolbar", children: [
|
|
36491
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "welcome-screen-decor-hint__label", children: children || t("welcomeScreen.defaults.toolbarHint") }),
|
|
36307
36492
|
WelcomeScreenTopToolbarArrow
|
|
36308
36493
|
] }) });
|
|
36309
36494
|
};
|
|
36310
36495
|
ToolbarHint.displayName = "ToolbarHint";
|
|
36311
36496
|
var HelpHint = ({ children }) => {
|
|
36312
36497
|
const { WelcomeScreenHelpHintTunnel } = useTunnels();
|
|
36313
|
-
return /* @__PURE__ */ (0,
|
|
36314
|
-
/* @__PURE__ */ (0,
|
|
36498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(WelcomeScreenHelpHintTunnel.In, { children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--help", children: [
|
|
36499
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { children: children || t("welcomeScreen.defaults.helpHint") }),
|
|
36315
36500
|
WelcomeScreenHelpArrow
|
|
36316
36501
|
] }) });
|
|
36317
36502
|
};
|
|
36318
36503
|
HelpHint.displayName = "HelpHint";
|
|
36319
36504
|
|
|
36320
36505
|
// components/welcome-screen/WelcomeScreen.tsx
|
|
36321
|
-
var
|
|
36506
|
+
var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
|
|
36322
36507
|
var WelcomeScreen = (props) => {
|
|
36323
|
-
return /* @__PURE__ */ (0,
|
|
36324
|
-
/* @__PURE__ */ (0,
|
|
36325
|
-
/* @__PURE__ */ (0,
|
|
36326
|
-
/* @__PURE__ */ (0,
|
|
36327
|
-
/* @__PURE__ */ (0,
|
|
36508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_jsx_runtime132.Fragment, { children: props.children || /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_jsx_runtime132.Fragment, { children: [
|
|
36509
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Center, {}),
|
|
36510
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(MenuHint, {}),
|
|
36511
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ToolbarHint, {}),
|
|
36512
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(HelpHint, {})
|
|
36328
36513
|
] }) });
|
|
36329
36514
|
};
|
|
36330
36515
|
WelcomeScreen.displayName = "WelcomeScreen";
|
|
@@ -36334,7 +36519,7 @@ var WelcomeScreen_default = WelcomeScreen;
|
|
|
36334
36519
|
|
|
36335
36520
|
// components/live-collaboration/LiveCollaborationTrigger.tsx
|
|
36336
36521
|
init_define_import_meta_env();
|
|
36337
|
-
var
|
|
36522
|
+
var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
|
|
36338
36523
|
var LiveCollaborationTrigger2 = ({
|
|
36339
36524
|
isCollaborating,
|
|
36340
36525
|
onSelect,
|
|
@@ -36342,7 +36527,7 @@ var LiveCollaborationTrigger2 = ({
|
|
|
36342
36527
|
}) => {
|
|
36343
36528
|
const appState = useUIAppState();
|
|
36344
36529
|
const showIconOnly = appState.width < 830;
|
|
36345
|
-
return /* @__PURE__ */ (0,
|
|
36530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
36346
36531
|
Button,
|
|
36347
36532
|
{
|
|
36348
36533
|
...rest,
|
|
@@ -36353,7 +36538,7 @@ var LiveCollaborationTrigger2 = ({
|
|
|
36353
36538
|
title: t("labels.liveCollaboration"),
|
|
36354
36539
|
children: [
|
|
36355
36540
|
showIconOnly ? share : t("labels.share"),
|
|
36356
|
-
appState.collaborators.size > 0 && /* @__PURE__ */ (0,
|
|
36541
|
+
appState.collaborators.size > 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "CollabButton-collaborators", children: appState.collaborators.size })
|
|
36357
36542
|
]
|
|
36358
36543
|
}
|
|
36359
36544
|
);
|
|
@@ -36363,14 +36548,14 @@ LiveCollaborationTrigger2.displayName = "LiveCollaborationTrigger";
|
|
|
36363
36548
|
|
|
36364
36549
|
// components/TTDDialog/TTDDialogTrigger.tsx
|
|
36365
36550
|
init_define_import_meta_env();
|
|
36366
|
-
var
|
|
36551
|
+
var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
|
|
36367
36552
|
var TTDDialogTrigger = ({
|
|
36368
36553
|
children,
|
|
36369
36554
|
icon
|
|
36370
36555
|
}) => {
|
|
36371
36556
|
const { TTDDialogTriggerTunnel } = useTunnels();
|
|
36372
36557
|
const setAppState = useExcalidrawSetAppState();
|
|
36373
|
-
return /* @__PURE__ */ (0,
|
|
36558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(TTDDialogTriggerTunnel.In, { children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
36374
36559
|
DropdownMenu_default.Item,
|
|
36375
36560
|
{
|
|
36376
36561
|
onSelect: () => {
|
|
@@ -36380,7 +36565,7 @@ var TTDDialogTrigger = ({
|
|
|
36380
36565
|
icon: icon ?? brainIcon,
|
|
36381
36566
|
children: [
|
|
36382
36567
|
children ?? t("labels.textToDiagram"),
|
|
36383
|
-
/* @__PURE__ */ (0,
|
|
36568
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DropdownMenu_default.Item.Badge, { children: "AI" })
|
|
36384
36569
|
]
|
|
36385
36570
|
}
|
|
36386
36571
|
) });
|
|
@@ -36388,7 +36573,7 @@ var TTDDialogTrigger = ({
|
|
|
36388
36573
|
TTDDialogTrigger.displayName = "TTDDialogTrigger";
|
|
36389
36574
|
|
|
36390
36575
|
// index.tsx
|
|
36391
|
-
var
|
|
36576
|
+
var import_jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
|
|
36392
36577
|
polyfill_default();
|
|
36393
36578
|
var ExcalidrawBase = (props) => {
|
|
36394
36579
|
const {
|
|
@@ -36455,7 +36640,7 @@ var ExcalidrawBase = (props) => {
|
|
|
36455
36640
|
document.removeEventListener("touchmove", handleTouchMove);
|
|
36456
36641
|
};
|
|
36457
36642
|
}, []);
|
|
36458
|
-
return /* @__PURE__ */ (0,
|
|
36643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Provider, { unstable_createStore: () => jotaiStore, scope: jotaiScope, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(InitializeApp, { langCode, theme, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
36459
36644
|
App_default,
|
|
36460
36645
|
{
|
|
36461
36646
|
onChange,
|