@haoxin-web/excalidraw 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev/{chunk-G6EN3STO.js → chunk-3RD5RWFE.js} +85 -85
- package/dist/dev/data/{image-QP66FJQD.js → image-6VUVQVTV.js} +2 -2
- package/dist/dev/index.js +462 -462
- package/dist/prod/chunk-2BSXP2T3.js +6 -0
- package/dist/prod/data/{image-AJHKS3PW.js → image-C6AOHNJE.js} +1 -1
- package/dist/prod/index.js +11 -11
- package/package.json +1 -1
- package/dist/prod/chunk-57UWYCGH.js +0 -6
- /package/dist/dev/{chunk-G6EN3STO.js.map → chunk-3RD5RWFE.js.map} +0 -0
- /package/dist/dev/data/{image-QP66FJQD.js.map → image-6VUVQVTV.js.map} +0 -0
package/dist/dev/index.js
CHANGED
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
serializeLibraryAsJSON,
|
|
70
70
|
strokeEllipseWithRotation,
|
|
71
71
|
strokeRectWithRotation
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-3RD5RWFE.js";
|
|
73
73
|
import {
|
|
74
74
|
define_import_meta_env_default
|
|
75
75
|
} from "./chunk-R3GBEHWA.js";
|
|
@@ -87,7 +87,7 @@ import {
|
|
|
87
87
|
|
|
88
88
|
// index.tsx
|
|
89
89
|
import React48, { useEffect as useEffect49 } from "react";
|
|
90
|
-
import { DEFAULT_UI_OPTIONS, isShallowEqual as isShallowEqual9 } from "haoxin-excalidraw-
|
|
90
|
+
import { DEFAULT_UI_OPTIONS, isShallowEqual as isShallowEqual9 } from "@haoxin-web/excalidraw-common";
|
|
91
91
|
|
|
92
92
|
// components/App.tsx
|
|
93
93
|
import clsx57 from "clsx";
|
|
@@ -107,7 +107,7 @@ import {
|
|
|
107
107
|
vectorSubtract as vectorSubtract2,
|
|
108
108
|
vectorDot,
|
|
109
109
|
vectorNormalize as vectorNormalize4
|
|
110
|
-
} from "haoxin-excalidraw-
|
|
110
|
+
} from "@haoxin-web/excalidraw-math";
|
|
111
111
|
import {
|
|
112
112
|
COLOR_PALETTE as COLOR_PALETTE6,
|
|
113
113
|
CODES as CODES13,
|
|
@@ -192,7 +192,7 @@ import {
|
|
|
192
192
|
isMobile,
|
|
193
193
|
MINIMUM_ARROW_SIZE,
|
|
194
194
|
DOUBLE_TAP_POSITION_THRESHOLD
|
|
195
|
-
} from "haoxin-excalidraw-
|
|
195
|
+
} from "@haoxin-web/excalidraw-common";
|
|
196
196
|
import {
|
|
197
197
|
getObservedAppState,
|
|
198
198
|
getCommonBounds as getCommonBounds12,
|
|
@@ -324,29 +324,29 @@ import {
|
|
|
324
324
|
isSimpleArrow,
|
|
325
325
|
StoreDelta as StoreDelta2,
|
|
326
326
|
positionElementsOnGrid
|
|
327
|
-
} from "haoxin-excalidraw-
|
|
327
|
+
} from "@haoxin-web/excalidraw-element";
|
|
328
328
|
|
|
329
329
|
// actions/actionDeleteSelected.tsx
|
|
330
|
-
import { KEYS, updateActiveTool } from "haoxin-excalidraw-
|
|
331
|
-
import { getNonDeletedElements } from "haoxin-excalidraw-
|
|
332
|
-
import { fixBindingsAfterDeletion } from "haoxin-excalidraw-
|
|
333
|
-
import { LinearElementEditor } from "haoxin-excalidraw-
|
|
334
|
-
import { newElementWith } from "haoxin-excalidraw-
|
|
335
|
-
import { getContainerElement } from "haoxin-excalidraw-
|
|
330
|
+
import { KEYS, updateActiveTool } from "@haoxin-web/excalidraw-common";
|
|
331
|
+
import { getNonDeletedElements } from "@haoxin-web/excalidraw-element";
|
|
332
|
+
import { fixBindingsAfterDeletion } from "@haoxin-web/excalidraw-element";
|
|
333
|
+
import { LinearElementEditor } from "@haoxin-web/excalidraw-element";
|
|
334
|
+
import { newElementWith } from "@haoxin-web/excalidraw-element";
|
|
335
|
+
import { getContainerElement } from "@haoxin-web/excalidraw-element";
|
|
336
336
|
import {
|
|
337
337
|
isBoundToContainer,
|
|
338
338
|
isElbowArrow,
|
|
339
339
|
isFrameLikeElement
|
|
340
|
-
} from "haoxin-excalidraw-
|
|
341
|
-
import { getFrameChildren } from "haoxin-excalidraw-
|
|
340
|
+
} from "@haoxin-web/excalidraw-element";
|
|
341
|
+
import { getFrameChildren } from "@haoxin-web/excalidraw-element";
|
|
342
342
|
import {
|
|
343
343
|
getElementsInGroup,
|
|
344
344
|
selectGroupsForSelectedElements
|
|
345
|
-
} from "haoxin-excalidraw-
|
|
346
|
-
import { CaptureUpdateAction } from "haoxin-excalidraw-
|
|
345
|
+
} from "@haoxin-web/excalidraw-element";
|
|
346
|
+
import { CaptureUpdateAction } from "@haoxin-web/excalidraw-element";
|
|
347
347
|
|
|
348
348
|
// i18n.ts
|
|
349
|
-
import { isDevEnv } from "haoxin-excalidraw-
|
|
349
|
+
import { isDevEnv } from "@haoxin-web/excalidraw-common";
|
|
350
350
|
|
|
351
351
|
// editor-jotai.ts
|
|
352
352
|
import {
|
|
@@ -547,7 +547,7 @@ var useI18n = () => {
|
|
|
547
547
|
import clsx from "clsx";
|
|
548
548
|
import oc from "open-color";
|
|
549
549
|
import React from "react";
|
|
550
|
-
import { THEME } from "haoxin-excalidraw-
|
|
550
|
+
import { THEME } from "@haoxin-web/excalidraw-common";
|
|
551
551
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
552
552
|
var iconFillColor = (theme) => "var(--icon-fill-color)";
|
|
553
553
|
var handlerColor = (theme) => theme === THEME.LIGHT ? oc.white : "#1e1e1e";
|
|
@@ -2846,7 +2846,7 @@ var elementLinkIcon = createIcon(
|
|
|
2846
2846
|
// components/ToolButton.tsx
|
|
2847
2847
|
import clsx2 from "clsx";
|
|
2848
2848
|
import React3, { useEffect, useRef, useState } from "react";
|
|
2849
|
-
import { isPromiseLike } from "haoxin-excalidraw-
|
|
2849
|
+
import { isPromiseLike } from "@haoxin-web/excalidraw-common";
|
|
2850
2850
|
|
|
2851
2851
|
// components/Spinner.tsx
|
|
2852
2852
|
import React2 from "react";
|
|
@@ -3262,14 +3262,14 @@ var actionDeleteSelected = register({
|
|
|
3262
3262
|
});
|
|
3263
3263
|
|
|
3264
3264
|
// actions/actionZindex.tsx
|
|
3265
|
-
import { KEYS as KEYS2, CODES, getShortcutKey, isDarwin } from "haoxin-excalidraw-
|
|
3265
|
+
import { KEYS as KEYS2, CODES, getShortcutKey, isDarwin } from "@haoxin-web/excalidraw-common";
|
|
3266
3266
|
import {
|
|
3267
3267
|
moveOneLeft,
|
|
3268
3268
|
moveOneRight,
|
|
3269
3269
|
moveAllLeft,
|
|
3270
3270
|
moveAllRight
|
|
3271
|
-
} from "haoxin-excalidraw-
|
|
3272
|
-
import { CaptureUpdateAction as CaptureUpdateAction2 } from "haoxin-excalidraw-
|
|
3271
|
+
} from "@haoxin-web/excalidraw-element";
|
|
3272
|
+
import { CaptureUpdateAction as CaptureUpdateAction2 } from "@haoxin-web/excalidraw-element";
|
|
3273
3273
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
3274
3274
|
var actionSendBackward = register({
|
|
3275
3275
|
name: "sendBackward",
|
|
@@ -3375,12 +3375,12 @@ var actionBringToFront = register({
|
|
|
3375
3375
|
});
|
|
3376
3376
|
|
|
3377
3377
|
// actions/actionSelectAll.ts
|
|
3378
|
-
import { getNonDeletedElements as getNonDeletedElements2 } from "haoxin-excalidraw-
|
|
3379
|
-
import { LinearElementEditor as LinearElementEditor2 } from "haoxin-excalidraw-
|
|
3380
|
-
import { isLinearElement, isTextElement } from "haoxin-excalidraw-
|
|
3381
|
-
import { arrayToMap, KEYS as KEYS3 } from "haoxin-excalidraw-
|
|
3382
|
-
import { selectGroupsForSelectedElements as selectGroupsForSelectedElements2 } from "haoxin-excalidraw-
|
|
3383
|
-
import { CaptureUpdateAction as CaptureUpdateAction3 } from "haoxin-excalidraw-
|
|
3378
|
+
import { getNonDeletedElements as getNonDeletedElements2 } from "@haoxin-web/excalidraw-element";
|
|
3379
|
+
import { LinearElementEditor as LinearElementEditor2 } from "@haoxin-web/excalidraw-element";
|
|
3380
|
+
import { isLinearElement, isTextElement } from "@haoxin-web/excalidraw-element";
|
|
3381
|
+
import { arrayToMap, KEYS as KEYS3 } from "@haoxin-web/excalidraw-common";
|
|
3382
|
+
import { selectGroupsForSelectedElements as selectGroupsForSelectedElements2 } from "@haoxin-web/excalidraw-element";
|
|
3383
|
+
import { CaptureUpdateAction as CaptureUpdateAction3 } from "@haoxin-web/excalidraw-element";
|
|
3384
3384
|
var actionSelectAll = register({
|
|
3385
3385
|
name: "selectAll",
|
|
3386
3386
|
label: "labels.selectAll",
|
|
@@ -3426,16 +3426,16 @@ import {
|
|
|
3426
3426
|
KEYS as KEYS4,
|
|
3427
3427
|
arrayToMap as arrayToMap2,
|
|
3428
3428
|
getShortcutKey as getShortcutKey2
|
|
3429
|
-
} from "haoxin-excalidraw-
|
|
3430
|
-
import { getNonDeletedElements as getNonDeletedElements3 } from "haoxin-excalidraw-
|
|
3431
|
-
import { LinearElementEditor as LinearElementEditor3 } from "haoxin-excalidraw-
|
|
3429
|
+
} from "@haoxin-web/excalidraw-common";
|
|
3430
|
+
import { getNonDeletedElements as getNonDeletedElements3 } from "@haoxin-web/excalidraw-element";
|
|
3431
|
+
import { LinearElementEditor as LinearElementEditor3 } from "@haoxin-web/excalidraw-element";
|
|
3432
3432
|
import {
|
|
3433
3433
|
getSelectedElements as getSelectedElements2,
|
|
3434
3434
|
getSelectionStateForElements
|
|
3435
|
-
} from "haoxin-excalidraw-
|
|
3436
|
-
import { syncMovedIndices } from "haoxin-excalidraw-
|
|
3437
|
-
import { duplicateElements } from "haoxin-excalidraw-
|
|
3438
|
-
import { CaptureUpdateAction as CaptureUpdateAction4 } from "haoxin-excalidraw-
|
|
3435
|
+
} from "@haoxin-web/excalidraw-element";
|
|
3436
|
+
import { syncMovedIndices } from "@haoxin-web/excalidraw-element";
|
|
3437
|
+
import { duplicateElements } from "@haoxin-web/excalidraw-element";
|
|
3438
|
+
import { CaptureUpdateAction as CaptureUpdateAction4 } from "@haoxin-web/excalidraw-element";
|
|
3439
3439
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
3440
3440
|
var actionDuplicateSelection = register({
|
|
3441
3441
|
name: "duplicateSelection",
|
|
@@ -3523,7 +3523,7 @@ var actionDuplicateSelection = register({
|
|
|
3523
3523
|
});
|
|
3524
3524
|
|
|
3525
3525
|
// actions/actionProperties.tsx
|
|
3526
|
-
import { pointFrom } from "haoxin-excalidraw-
|
|
3526
|
+
import { pointFrom } from "@haoxin-web/excalidraw-math";
|
|
3527
3527
|
import { useEffect as useEffect13, useMemo as useMemo4, useRef as useRef11, useState as useState6 } from "react";
|
|
3528
3528
|
import {
|
|
3529
3529
|
DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE,
|
|
@@ -3545,19 +3545,19 @@ import {
|
|
|
3545
3545
|
getLineHeight,
|
|
3546
3546
|
isTransparent as isTransparent2,
|
|
3547
3547
|
reduceToCommonValue
|
|
3548
|
-
} from "haoxin-excalidraw-
|
|
3549
|
-
import { canBecomePolygon, getNonDeletedElements as getNonDeletedElements4 } from "haoxin-excalidraw-
|
|
3548
|
+
} from "@haoxin-web/excalidraw-common";
|
|
3549
|
+
import { canBecomePolygon, getNonDeletedElements as getNonDeletedElements4 } from "@haoxin-web/excalidraw-element";
|
|
3550
3550
|
import {
|
|
3551
3551
|
bindLinearElement,
|
|
3552
3552
|
calculateFixedPointForElbowArrowBinding,
|
|
3553
3553
|
updateBoundElements
|
|
3554
|
-
} from "haoxin-excalidraw-
|
|
3555
|
-
import { LinearElementEditor as LinearElementEditor4 } from "haoxin-excalidraw-
|
|
3556
|
-
import { newElementWith as newElementWith2 } from "haoxin-excalidraw-
|
|
3554
|
+
} from "@haoxin-web/excalidraw-element";
|
|
3555
|
+
import { LinearElementEditor as LinearElementEditor4 } from "@haoxin-web/excalidraw-element";
|
|
3556
|
+
import { newElementWith as newElementWith2 } from "@haoxin-web/excalidraw-element";
|
|
3557
3557
|
import {
|
|
3558
3558
|
getBoundTextElement,
|
|
3559
3559
|
redrawTextBoundingBox
|
|
3560
|
-
} from "haoxin-excalidraw-
|
|
3560
|
+
} from "@haoxin-web/excalidraw-element";
|
|
3561
3561
|
import {
|
|
3562
3562
|
isArrowElement,
|
|
3563
3563
|
isBoundToContainer as isBoundToContainer2,
|
|
@@ -3566,16 +3566,16 @@ import {
|
|
|
3566
3566
|
isLineElement,
|
|
3567
3567
|
isTextElement as isTextElement2,
|
|
3568
3568
|
isUsingAdaptiveRadius
|
|
3569
|
-
} from "haoxin-excalidraw-
|
|
3570
|
-
import { hasStrokeColor } from "haoxin-excalidraw-
|
|
3569
|
+
} from "@haoxin-web/excalidraw-element";
|
|
3570
|
+
import { hasStrokeColor } from "@haoxin-web/excalidraw-element";
|
|
3571
3571
|
import {
|
|
3572
3572
|
updateElbowArrowPoints,
|
|
3573
3573
|
CaptureUpdateAction as CaptureUpdateAction5,
|
|
3574
3574
|
toggleLinePolygonState
|
|
3575
|
-
} from "haoxin-excalidraw-
|
|
3575
|
+
} from "@haoxin-web/excalidraw-element";
|
|
3576
3576
|
|
|
3577
3577
|
// analytics.ts
|
|
3578
|
-
import { isDevEnv as isDevEnv2 } from "haoxin-excalidraw-
|
|
3578
|
+
import { isDevEnv as isDevEnv2 } from "@haoxin-web/excalidraw-common";
|
|
3579
3579
|
var ALLOWED_CATEGORIES_TO_TRACK = /* @__PURE__ */ new Set(["command_palette", "export"]);
|
|
3580
3580
|
var trackEvent = (category, action, label, value) => {
|
|
3581
3581
|
try {
|
|
@@ -3674,7 +3674,7 @@ import {
|
|
|
3674
3674
|
COLOR_OUTLINE_CONTRAST_THRESHOLD as COLOR_OUTLINE_CONTRAST_THRESHOLD2,
|
|
3675
3675
|
COLOR_PALETTE as COLOR_PALETTE2,
|
|
3676
3676
|
isTransparent
|
|
3677
|
-
} from "haoxin-excalidraw-
|
|
3677
|
+
} from "@haoxin-web/excalidraw-common";
|
|
3678
3678
|
|
|
3679
3679
|
// components/ButtonSeparator.tsx
|
|
3680
3680
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
@@ -3693,7 +3693,7 @@ var ButtonSeparator = () => /* @__PURE__ */ jsx9(
|
|
|
3693
3693
|
// components/EyeDropper.tsx
|
|
3694
3694
|
import { useEffect as useEffect3, useRef as useRef3 } from "react";
|
|
3695
3695
|
import { createPortal } from "react-dom";
|
|
3696
|
-
import { EVENT as EVENT2, KEYS as KEYS5, rgbToHex } from "haoxin-excalidraw-
|
|
3696
|
+
import { EVENT as EVENT2, KEYS as KEYS5, rgbToHex } from "@haoxin-web/excalidraw-common";
|
|
3697
3697
|
|
|
3698
3698
|
// context/ui-appState.ts
|
|
3699
3699
|
import React4 from "react";
|
|
@@ -3702,7 +3702,7 @@ var useUIAppState = () => React4.useContext(UIAppStateContext);
|
|
|
3702
3702
|
|
|
3703
3703
|
// hooks/useCreatePortalContainer.ts
|
|
3704
3704
|
import { useState as useState2, useLayoutEffect } from "react";
|
|
3705
|
-
import { THEME as THEME2 } from "haoxin-excalidraw-
|
|
3705
|
+
import { THEME as THEME2 } from "@haoxin-web/excalidraw-common";
|
|
3706
3706
|
var useCreatePortalContainer = (opts) => {
|
|
3707
3707
|
const [div, setDiv] = useState2(null);
|
|
3708
3708
|
const device = useDevice();
|
|
@@ -3733,7 +3733,7 @@ var useCreatePortalContainer = (opts) => {
|
|
|
3733
3733
|
|
|
3734
3734
|
// hooks/useOutsideClick.ts
|
|
3735
3735
|
import { useEffect as useEffect2 } from "react";
|
|
3736
|
-
import { EVENT } from "haoxin-excalidraw-
|
|
3736
|
+
import { EVENT } from "@haoxin-web/excalidraw-common";
|
|
3737
3737
|
function useOutsideClick(ref, callback, isInside) {
|
|
3738
3738
|
useEffect2(() => {
|
|
3739
3739
|
function onOutsideClick(event) {
|
|
@@ -3932,7 +3932,7 @@ var EyeDropper = ({ onCancel, onChange, onSelect, colorPickerType }) => {
|
|
|
3932
3932
|
import * as Popover from "@radix-ui/react-popover";
|
|
3933
3933
|
import clsx6 from "clsx";
|
|
3934
3934
|
import React6 from "react";
|
|
3935
|
-
import { isInteractive } from "haoxin-excalidraw-
|
|
3935
|
+
import { isInteractive } from "@haoxin-web/excalidraw-common";
|
|
3936
3936
|
|
|
3937
3937
|
// components/Island.tsx
|
|
3938
3938
|
import React5 from "react";
|
|
@@ -4012,10 +4012,10 @@ var PropertiesPopover = React6.forwardRef(
|
|
|
4012
4012
|
// components/ColorPicker/ColorInput.tsx
|
|
4013
4013
|
import clsx7 from "clsx";
|
|
4014
4014
|
import { useCallback, useEffect as useEffect4, useRef as useRef4, useState as useState3 } from "react";
|
|
4015
|
-
import { KEYS as KEYS6, getShortcutKey as getShortcutKey3 } from "haoxin-excalidraw-
|
|
4015
|
+
import { KEYS as KEYS6, getShortcutKey as getShortcutKey3 } from "@haoxin-web/excalidraw-common";
|
|
4016
4016
|
|
|
4017
4017
|
// components/ColorPicker/colorPickerUtils.ts
|
|
4018
|
-
import { MAX_CUSTOM_COLORS_USED_IN_CANVAS } from "haoxin-excalidraw-
|
|
4018
|
+
import { MAX_CUSTOM_COLORS_USED_IN_CANVAS } from "@haoxin-web/excalidraw-common";
|
|
4019
4019
|
var getColorNameAndShadeFromColor = ({
|
|
4020
4020
|
palette: palette2,
|
|
4021
4021
|
color
|
|
@@ -4215,12 +4215,12 @@ var ColorInput = ({
|
|
|
4215
4215
|
|
|
4216
4216
|
// components/ColorPicker/Picker.tsx
|
|
4217
4217
|
import React7, { useEffect as useEffect8, useImperativeHandle, useState as useState4 } from "react";
|
|
4218
|
-
import { EVENT as EVENT3 } from "haoxin-excalidraw-
|
|
4218
|
+
import { EVENT as EVENT3 } from "@haoxin-web/excalidraw-common";
|
|
4219
4219
|
import {
|
|
4220
4220
|
DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX,
|
|
4221
4221
|
DEFAULT_ELEMENT_STROKE_COLOR_INDEX,
|
|
4222
4222
|
KEYS as KEYS8
|
|
4223
|
-
} from "haoxin-excalidraw-
|
|
4223
|
+
} from "@haoxin-web/excalidraw-common";
|
|
4224
4224
|
|
|
4225
4225
|
// components/ColorPicker/CustomColorList.tsx
|
|
4226
4226
|
import clsx8 from "clsx";
|
|
@@ -4453,7 +4453,7 @@ var ShadeList = ({ color, onChange, palette: palette2 }) => {
|
|
|
4453
4453
|
};
|
|
4454
4454
|
|
|
4455
4455
|
// components/ColorPicker/keyboardNavHandlers.ts
|
|
4456
|
-
import { COLORS_PER_ROW, COLOR_PALETTE, KEYS as KEYS7 } from "haoxin-excalidraw-
|
|
4456
|
+
import { COLORS_PER_ROW, COLOR_PALETTE, KEYS as KEYS7 } from "@haoxin-web/excalidraw-common";
|
|
4457
4457
|
var arrowHandler = (eventKey, currentIndex, length) => {
|
|
4458
4458
|
const rows = Math.ceil(length / COLORS_PER_ROW);
|
|
4459
4459
|
currentIndex = currentIndex ?? -1;
|
|
@@ -4770,7 +4770,7 @@ import {
|
|
|
4770
4770
|
DEFAULT_CANVAS_BACKGROUND_PICKS,
|
|
4771
4771
|
DEFAULT_ELEMENT_BACKGROUND_PICKS,
|
|
4772
4772
|
DEFAULT_ELEMENT_STROKE_PICKS
|
|
4773
|
-
} from "haoxin-excalidraw-
|
|
4773
|
+
} from "@haoxin-web/excalidraw-common";
|
|
4774
4774
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
4775
4775
|
var TopPicks = ({
|
|
4776
4776
|
onChange,
|
|
@@ -4994,7 +4994,7 @@ var ColorPicker = ({
|
|
|
4994
4994
|
// components/FontPicker/FontPicker.tsx
|
|
4995
4995
|
import * as Popover4 from "@radix-ui/react-popover";
|
|
4996
4996
|
import React12, { useCallback as useCallback3, useMemo as useMemo3 } from "react";
|
|
4997
|
-
import { FONT_FAMILY as FONT_FAMILY2 } from "haoxin-excalidraw-
|
|
4997
|
+
import { FONT_FAMILY as FONT_FAMILY2 } from "@haoxin-web/excalidraw-common";
|
|
4998
4998
|
|
|
4999
4999
|
// components/FontPicker/FontPickerList.tsx
|
|
5000
5000
|
import React11, {
|
|
@@ -5009,7 +5009,7 @@ import {
|
|
|
5009
5009
|
debounce,
|
|
5010
5010
|
FONT_FAMILY,
|
|
5011
5011
|
getFontFamilyString
|
|
5012
|
-
} from "haoxin-excalidraw-
|
|
5012
|
+
} from "@haoxin-web/excalidraw-common";
|
|
5013
5013
|
|
|
5014
5014
|
// components/QuickSearch.tsx
|
|
5015
5015
|
import clsx13 from "clsx";
|
|
@@ -5064,7 +5064,7 @@ MenuGroup.displayName = "DropdownMenuGroup";
|
|
|
5064
5064
|
|
|
5065
5065
|
// components/dropdownMenu/DropdownMenuItem.tsx
|
|
5066
5066
|
import { useEffect as useEffect9, useRef as useRef9 } from "react";
|
|
5067
|
-
import { THEME as THEME3 } from "haoxin-excalidraw-
|
|
5067
|
+
import { THEME as THEME3 } from "@haoxin-web/excalidraw-common";
|
|
5068
5068
|
|
|
5069
5069
|
// components/Ellipsify.tsx
|
|
5070
5070
|
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
@@ -5106,7 +5106,7 @@ var DropdownMenuItemContent_default = MenuItemContent;
|
|
|
5106
5106
|
|
|
5107
5107
|
// components/dropdownMenu/common.ts
|
|
5108
5108
|
import React9, { useContext } from "react";
|
|
5109
|
-
import { EVENT as EVENT4, composeEventHandlers } from "haoxin-excalidraw-
|
|
5109
|
+
import { EVENT as EVENT4, composeEventHandlers } from "@haoxin-web/excalidraw-common";
|
|
5110
5110
|
var DropdownMenuContentPropsContext = React9.createContext({});
|
|
5111
5111
|
var getDropdownMenuItemClassName = (className = "", selected = false, hovered = false) => {
|
|
5112
5112
|
return `dropdown-menu-item dropdown-menu-item-base ${className}
|
|
@@ -5213,7 +5213,7 @@ DropdownMenuItem.Badge = DropDownMenuItemBadge;
|
|
|
5213
5213
|
var DropdownMenuItem_default = DropdownMenuItem;
|
|
5214
5214
|
|
|
5215
5215
|
// components/FontPicker/keyboardNavHandlers.ts
|
|
5216
|
-
import { KEYS as KEYS9 } from "haoxin-excalidraw-
|
|
5216
|
+
import { KEYS as KEYS9 } from "@haoxin-web/excalidraw-common";
|
|
5217
5217
|
var fontPickerKeyHandler = ({
|
|
5218
5218
|
event,
|
|
5219
5219
|
inputRef,
|
|
@@ -5576,7 +5576,7 @@ var FontPicker = React12.memo(
|
|
|
5576
5576
|
import * as Popover5 from "@radix-ui/react-popover";
|
|
5577
5577
|
import clsx15 from "clsx";
|
|
5578
5578
|
import React13, { useEffect as useEffect11 } from "react";
|
|
5579
|
-
import { isArrowKey, KEYS as KEYS10 } from "haoxin-excalidraw-
|
|
5579
|
+
import { isArrowKey, KEYS as KEYS10 } from "@haoxin-web/excalidraw-common";
|
|
5580
5580
|
|
|
5581
5581
|
// components/InlineIcon.tsx
|
|
5582
5582
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
@@ -7235,7 +7235,7 @@ var actionChangeArrowType = register({
|
|
|
7235
7235
|
});
|
|
7236
7236
|
|
|
7237
7237
|
// actions/actionCanvas.tsx
|
|
7238
|
-
import { clamp, roundToStep } from "haoxin-excalidraw-
|
|
7238
|
+
import { clamp, roundToStep } from "@haoxin-web/excalidraw-math";
|
|
7239
7239
|
import {
|
|
7240
7240
|
DEFAULT_CANVAS_BACKGROUND_PICKS as DEFAULT_CANVAS_BACKGROUND_PICKS2,
|
|
7241
7241
|
CURSOR_TYPE as CURSOR_TYPE2,
|
|
@@ -7247,11 +7247,11 @@ import {
|
|
|
7247
7247
|
updateActiveTool as updateActiveTool2,
|
|
7248
7248
|
CODES as CODES2,
|
|
7249
7249
|
KEYS as KEYS12
|
|
7250
|
-
} from "haoxin-excalidraw-
|
|
7251
|
-
import { getNonDeletedElements as getNonDeletedElements5 } from "haoxin-excalidraw-
|
|
7252
|
-
import { newElementWith as newElementWith3 } from "haoxin-excalidraw-
|
|
7253
|
-
import { getCommonBounds } from "haoxin-excalidraw-
|
|
7254
|
-
import { CaptureUpdateAction as CaptureUpdateAction6 } from "haoxin-excalidraw-
|
|
7250
|
+
} from "@haoxin-web/excalidraw-common";
|
|
7251
|
+
import { getNonDeletedElements as getNonDeletedElements5 } from "@haoxin-web/excalidraw-element";
|
|
7252
|
+
import { newElementWith as newElementWith3 } from "@haoxin-web/excalidraw-element";
|
|
7253
|
+
import { getCommonBounds } from "@haoxin-web/excalidraw-element";
|
|
7254
|
+
import { CaptureUpdateAction as CaptureUpdateAction6 } from "@haoxin-web/excalidraw-element";
|
|
7255
7255
|
|
|
7256
7256
|
// components/Tooltip.tsx
|
|
7257
7257
|
import { useEffect as useEffect14 } from "react";
|
|
@@ -7336,7 +7336,7 @@ var Tooltip = ({
|
|
|
7336
7336
|
|
|
7337
7337
|
// cursor.ts
|
|
7338
7338
|
import OpenColor from "open-color";
|
|
7339
|
-
import { CURSOR_TYPE, MIME_TYPES, THEME as THEME4 } from "haoxin-excalidraw-
|
|
7339
|
+
import { CURSOR_TYPE, MIME_TYPES, THEME as THEME4 } from "@haoxin-web/excalidraw-common";
|
|
7340
7340
|
var laserPointerCursorSVG_tag = `<svg viewBox="0 0 24 24" stroke-width="1" width="28" height="28" xmlns="http://www.w3.org/2000/svg">`;
|
|
7341
7341
|
var laserPointerCursorBackgroundSVG = `<path d="M6.164 11.755a5.314 5.314 0 0 1-4.932-5.298 5.314 5.314 0 0 1 5.311-5.311 5.314 5.314 0 0 1 5.307 5.113l8.773 8.773a3.322 3.322 0 0 1 0 4.696l-.895.895a3.322 3.322 0 0 1-4.696 0l-8.868-8.868Z" style="fill:#fff"/>`;
|
|
7342
7342
|
var laserPointerCursorIconSVG = `<path stroke="#1b1b1f" fill="#fff" d="m7.868 11.113 7.773 7.774a2.359 2.359 0 0 0 1.667.691 2.368 2.368 0 0 0 2.357-2.358c0-.625-.248-1.225-.69-1.667L11.201 7.78 9.558 9.469l-1.69 1.643v.001Zm10.273 3.606-3.333 3.333m-3.25-6.583 2 2m-7-7 3 3M3.664 3.625l1 1M2.529 6.922l1.407-.144m5.735-2.932-1.118.866M4.285 9.823l.758-1.194m1.863-6.207-.13 1.408"/>`;
|
|
@@ -7927,8 +7927,8 @@ var actionToggleHandTool = register({
|
|
|
7927
7927
|
});
|
|
7928
7928
|
|
|
7929
7929
|
// actions/actionEmbeddable.ts
|
|
7930
|
-
import { updateActiveTool as updateActiveTool3 } from "haoxin-excalidraw-
|
|
7931
|
-
import { CaptureUpdateAction as CaptureUpdateAction7 } from "haoxin-excalidraw-
|
|
7930
|
+
import { updateActiveTool as updateActiveTool3 } from "@haoxin-web/excalidraw-common";
|
|
7931
|
+
import { CaptureUpdateAction as CaptureUpdateAction7 } from "@haoxin-web/excalidraw-element";
|
|
7932
7932
|
var actionSetEmbeddableAsActiveTool = register({
|
|
7933
7933
|
name: "setEmbeddableAsActiveTool",
|
|
7934
7934
|
trackEvent: { category: "toolbar" },
|
|
@@ -7956,32 +7956,32 @@ var actionSetEmbeddableAsActiveTool = register({
|
|
|
7956
7956
|
});
|
|
7957
7957
|
|
|
7958
7958
|
// actions/actionFinalize.tsx
|
|
7959
|
-
import { pointFrom as pointFrom2 } from "haoxin-excalidraw-
|
|
7959
|
+
import { pointFrom as pointFrom2 } from "@haoxin-web/excalidraw-math";
|
|
7960
7960
|
import {
|
|
7961
7961
|
maybeBindLinearElement,
|
|
7962
7962
|
bindOrUnbindLinearElement,
|
|
7963
7963
|
isBindingEnabled
|
|
7964
|
-
} from "haoxin-excalidraw-
|
|
7964
|
+
} from "@haoxin-web/excalidraw-element/binding";
|
|
7965
7965
|
import {
|
|
7966
7966
|
isValidPolygon,
|
|
7967
7967
|
LinearElementEditor as LinearElementEditor5,
|
|
7968
7968
|
newElementWith as newElementWith4
|
|
7969
|
-
} from "haoxin-excalidraw-
|
|
7969
|
+
} from "@haoxin-web/excalidraw-element";
|
|
7970
7970
|
import {
|
|
7971
7971
|
isBindingElement,
|
|
7972
7972
|
isFreeDrawElement,
|
|
7973
7973
|
isLinearElement as isLinearElement3,
|
|
7974
7974
|
isLineElement as isLineElement2
|
|
7975
|
-
} from "haoxin-excalidraw-
|
|
7975
|
+
} from "@haoxin-web/excalidraw-element";
|
|
7976
7976
|
import {
|
|
7977
7977
|
KEYS as KEYS13,
|
|
7978
7978
|
arrayToMap as arrayToMap4,
|
|
7979
7979
|
tupleToCoors,
|
|
7980
7980
|
updateActiveTool as updateActiveTool4
|
|
7981
|
-
} from "haoxin-excalidraw-
|
|
7982
|
-
import { isPathALoop } from "haoxin-excalidraw-
|
|
7983
|
-
import { isInvisiblySmallElement } from "haoxin-excalidraw-
|
|
7984
|
-
import { CaptureUpdateAction as CaptureUpdateAction8 } from "haoxin-excalidraw-
|
|
7981
|
+
} from "@haoxin-web/excalidraw-common";
|
|
7982
|
+
import { isPathALoop } from "@haoxin-web/excalidraw-element";
|
|
7983
|
+
import { isInvisiblySmallElement } from "@haoxin-web/excalidraw-element";
|
|
7984
|
+
import { CaptureUpdateAction as CaptureUpdateAction8 } from "@haoxin-web/excalidraw-element";
|
|
7985
7985
|
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
7986
7986
|
var actionFinalize = register({
|
|
7987
7987
|
name: "finalize",
|
|
@@ -8203,9 +8203,9 @@ import {
|
|
|
8203
8203
|
DEFAULT_EXPORT_PADDING as DEFAULT_EXPORT_PADDING2,
|
|
8204
8204
|
EXPORT_SCALES,
|
|
8205
8205
|
THEME as THEME7
|
|
8206
|
-
} from "haoxin-excalidraw-
|
|
8207
|
-
import { getNonDeletedElements as getNonDeletedElements7 } from "haoxin-excalidraw-
|
|
8208
|
-
import { CaptureUpdateAction as CaptureUpdateAction9 } from "haoxin-excalidraw-
|
|
8206
|
+
} from "@haoxin-web/excalidraw-common";
|
|
8207
|
+
import { getNonDeletedElements as getNonDeletedElements7 } from "@haoxin-web/excalidraw-element";
|
|
8208
|
+
import { CaptureUpdateAction as CaptureUpdateAction9 } from "@haoxin-web/excalidraw-element";
|
|
8209
8209
|
|
|
8210
8210
|
// components/CheckboxItem.tsx
|
|
8211
8211
|
import clsx16 from "clsx";
|
|
@@ -8239,7 +8239,7 @@ var CheckboxItem = ({ children, checked, onChange, className }) => {
|
|
|
8239
8239
|
};
|
|
8240
8240
|
|
|
8241
8241
|
// components/DarkModeToggle.tsx
|
|
8242
|
-
import { THEME as THEME6 } from "haoxin-excalidraw-
|
|
8242
|
+
import { THEME as THEME6 } from "@haoxin-web/excalidraw-common";
|
|
8243
8243
|
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
8244
8244
|
var DarkModeToggle = (props) => {
|
|
8245
8245
|
const title = props.title || (props.value === THEME6.DARK ? t("buttons.lightMode") : t("buttons.darkMode"));
|
|
@@ -8274,7 +8274,7 @@ var ICONS = {
|
|
|
8274
8274
|
|
|
8275
8275
|
// components/ProjectName.tsx
|
|
8276
8276
|
import { useState as useState7 } from "react";
|
|
8277
|
-
import { focusNearestParent, KEYS as KEYS14 } from "haoxin-excalidraw-
|
|
8277
|
+
import { focusNearestParent, KEYS as KEYS14 } from "@haoxin-web/excalidraw-common";
|
|
8278
8278
|
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
8279
8279
|
var ProjectName = (props) => {
|
|
8280
8280
|
const { id } = useExcalidrawContainer();
|
|
@@ -8323,10 +8323,10 @@ import {
|
|
|
8323
8323
|
MIME_TYPES as MIME_TYPES3,
|
|
8324
8324
|
cloneJSON,
|
|
8325
8325
|
SVG_DOCUMENT_PREAMBLE
|
|
8326
|
-
} from "haoxin-excalidraw-
|
|
8327
|
-
import { getNonDeletedElements as getNonDeletedElements6 } from "haoxin-excalidraw-
|
|
8328
|
-
import { isFrameLikeElement as isFrameLikeElement3 } from "haoxin-excalidraw-
|
|
8329
|
-
import { getElementsOverlappingFrame } from "haoxin-excalidraw-
|
|
8326
|
+
} from "@haoxin-web/excalidraw-common";
|
|
8327
|
+
import { getNonDeletedElements as getNonDeletedElements6 } from "@haoxin-web/excalidraw-element";
|
|
8328
|
+
import { isFrameLikeElement as isFrameLikeElement3 } from "@haoxin-web/excalidraw-element";
|
|
8329
|
+
import { getElementsOverlappingFrame } from "@haoxin-web/excalidraw-element";
|
|
8330
8330
|
|
|
8331
8331
|
// clipboard.ts
|
|
8332
8332
|
import {
|
|
@@ -8337,17 +8337,17 @@ import {
|
|
|
8337
8337
|
isMemberOf,
|
|
8338
8338
|
isPromiseLike as isPromiseLike2,
|
|
8339
8339
|
EVENT as EVENT5
|
|
8340
|
-
} from "haoxin-excalidraw-
|
|
8341
|
-
import { mutateElement } from "haoxin-excalidraw-
|
|
8342
|
-
import { deepCopyElement } from "haoxin-excalidraw-
|
|
8340
|
+
} from "@haoxin-web/excalidraw-common";
|
|
8341
|
+
import { mutateElement } from "@haoxin-web/excalidraw-element";
|
|
8342
|
+
import { deepCopyElement } from "@haoxin-web/excalidraw-element";
|
|
8343
8343
|
import {
|
|
8344
8344
|
isFrameLikeElement as isFrameLikeElement2,
|
|
8345
8345
|
isInitializedImageElement
|
|
8346
|
-
} from "haoxin-excalidraw-
|
|
8347
|
-
import { getContainingFrame } from "haoxin-excalidraw-
|
|
8346
|
+
} from "@haoxin-web/excalidraw-element";
|
|
8347
|
+
import { getContainingFrame } from "@haoxin-web/excalidraw-element";
|
|
8348
8348
|
|
|
8349
8349
|
// charts.ts
|
|
8350
|
-
import { pointFrom as pointFrom3 } from "haoxin-excalidraw-
|
|
8350
|
+
import { pointFrom as pointFrom3 } from "@haoxin-web/excalidraw-math";
|
|
8351
8351
|
import {
|
|
8352
8352
|
COLOR_PALETTE as COLOR_PALETTE3,
|
|
8353
8353
|
DEFAULT_CHART_COLOR_INDEX,
|
|
@@ -8357,12 +8357,12 @@ import {
|
|
|
8357
8357
|
VERTICAL_ALIGN as VERTICAL_ALIGN2,
|
|
8358
8358
|
randomId,
|
|
8359
8359
|
isDevEnv as isDevEnv3
|
|
8360
|
-
} from "haoxin-excalidraw-
|
|
8360
|
+
} from "@haoxin-web/excalidraw-common";
|
|
8361
8361
|
import {
|
|
8362
8362
|
newTextElement,
|
|
8363
8363
|
newLinearElement,
|
|
8364
8364
|
newElement
|
|
8365
|
-
} from "haoxin-excalidraw-
|
|
8365
|
+
} from "@haoxin-web/excalidraw-element";
|
|
8366
8366
|
var BAR_WIDTH = 32;
|
|
8367
8367
|
var BAR_GAP = 12;
|
|
8368
8368
|
var BAR_HEIGHT = 256;
|
|
@@ -9180,7 +9180,7 @@ var exportCanvas = async (type, elements, appState, files, {
|
|
|
9180
9180
|
let blob = canvasToBlob(tempCanvas);
|
|
9181
9181
|
if (appState.exportEmbedScene) {
|
|
9182
9182
|
blob = blob.then(
|
|
9183
|
-
(blob2) => import("./data/image-
|
|
9183
|
+
(blob2) => import("./data/image-6VUVQVTV.js").then(
|
|
9184
9184
|
({ encodePngMetadata: encodePngMetadata2 }) => encodePngMetadata2({
|
|
9185
9185
|
blob: blob2,
|
|
9186
9186
|
metadata: serializeAsJSON(elements, appState, files, "local")
|
|
@@ -9520,8 +9520,8 @@ import {
|
|
|
9520
9520
|
CODES as CODES3,
|
|
9521
9521
|
KEYS as KEYS16,
|
|
9522
9522
|
getLineHeight as getLineHeight2
|
|
9523
|
-
} from "haoxin-excalidraw-
|
|
9524
|
-
import { newElementWith as newElementWith5 } from "haoxin-excalidraw-
|
|
9523
|
+
} from "@haoxin-web/excalidraw-common";
|
|
9524
|
+
import { newElementWith as newElementWith5 } from "@haoxin-web/excalidraw-element";
|
|
9525
9525
|
import {
|
|
9526
9526
|
hasBoundTextElement,
|
|
9527
9527
|
canApplyRoundnessTypeToElement,
|
|
@@ -9530,12 +9530,12 @@ import {
|
|
|
9530
9530
|
isArrowElement as isArrowElement2,
|
|
9531
9531
|
isExcalidrawElement,
|
|
9532
9532
|
isTextElement as isTextElement3
|
|
9533
|
-
} from "haoxin-excalidraw-
|
|
9533
|
+
} from "@haoxin-web/excalidraw-element";
|
|
9534
9534
|
import {
|
|
9535
9535
|
getBoundTextElement as getBoundTextElement2,
|
|
9536
9536
|
redrawTextBoundingBox as redrawTextBoundingBox2
|
|
9537
|
-
} from "haoxin-excalidraw-
|
|
9538
|
-
import { CaptureUpdateAction as CaptureUpdateAction10 } from "haoxin-excalidraw-
|
|
9537
|
+
} from "@haoxin-web/excalidraw-element";
|
|
9538
|
+
import { CaptureUpdateAction as CaptureUpdateAction10 } from "@haoxin-web/excalidraw-element";
|
|
9539
9539
|
var copiedStyles = "{}";
|
|
9540
9540
|
var actionCopyStyles = register({
|
|
9541
9541
|
name: "copyStyles",
|
|
@@ -9645,10 +9645,10 @@ var actionPasteStyles = register({
|
|
|
9645
9645
|
});
|
|
9646
9646
|
|
|
9647
9647
|
// actions/actionMenu.tsx
|
|
9648
|
-
import { KEYS as KEYS17 } from "haoxin-excalidraw-
|
|
9649
|
-
import { getNonDeletedElements as getNonDeletedElements8 } from "haoxin-excalidraw-
|
|
9650
|
-
import { showSelectedShapeActions } from "haoxin-excalidraw-
|
|
9651
|
-
import { CaptureUpdateAction as CaptureUpdateAction11 } from "haoxin-excalidraw-
|
|
9648
|
+
import { KEYS as KEYS17 } from "@haoxin-web/excalidraw-common";
|
|
9649
|
+
import { getNonDeletedElements as getNonDeletedElements8 } from "@haoxin-web/excalidraw-element";
|
|
9650
|
+
import { showSelectedShapeActions } from "@haoxin-web/excalidraw-element";
|
|
9651
|
+
import { CaptureUpdateAction as CaptureUpdateAction11 } from "@haoxin-web/excalidraw-element";
|
|
9652
9652
|
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
9653
9653
|
var actionToggleCanvasMenu = register({
|
|
9654
9654
|
name: "toggleCanvasMenu",
|
|
@@ -9722,9 +9722,9 @@ var actionShortcuts = register({
|
|
|
9722
9722
|
});
|
|
9723
9723
|
|
|
9724
9724
|
// actions/actionGroup.tsx
|
|
9725
|
-
import { getNonDeletedElements as getNonDeletedElements9 } from "haoxin-excalidraw-
|
|
9726
|
-
import { newElementWith as newElementWith6 } from "haoxin-excalidraw-
|
|
9727
|
-
import { isBoundToContainer as isBoundToContainer3 } from "haoxin-excalidraw-
|
|
9725
|
+
import { getNonDeletedElements as getNonDeletedElements9 } from "@haoxin-web/excalidraw-element";
|
|
9726
|
+
import { newElementWith as newElementWith6 } from "@haoxin-web/excalidraw-element";
|
|
9727
|
+
import { isBoundToContainer as isBoundToContainer3 } from "@haoxin-web/excalidraw-element";
|
|
9728
9728
|
import {
|
|
9729
9729
|
frameAndChildrenSelectedTogether,
|
|
9730
9730
|
getElementsInResizingFrame,
|
|
@@ -9733,8 +9733,8 @@ import {
|
|
|
9733
9733
|
groupByFrameLikes,
|
|
9734
9734
|
removeElementsFromFrame,
|
|
9735
9735
|
replaceAllElementsInFrame
|
|
9736
|
-
} from "haoxin-excalidraw-
|
|
9737
|
-
import { KEYS as KEYS18, randomId as randomId2, arrayToMap as arrayToMap6, getShortcutKey as getShortcutKey6 } from "haoxin-excalidraw-
|
|
9736
|
+
} from "@haoxin-web/excalidraw-element";
|
|
9737
|
+
import { KEYS as KEYS18, randomId as randomId2, arrayToMap as arrayToMap6, getShortcutKey as getShortcutKey6 } from "@haoxin-web/excalidraw-common";
|
|
9738
9738
|
import {
|
|
9739
9739
|
getSelectedGroupIds,
|
|
9740
9740
|
selectGroup,
|
|
@@ -9743,9 +9743,9 @@ import {
|
|
|
9743
9743
|
addToGroup,
|
|
9744
9744
|
removeFromSelectedGroups,
|
|
9745
9745
|
isElementInGroup
|
|
9746
|
-
} from "haoxin-excalidraw-
|
|
9747
|
-
import { syncMovedIndices as syncMovedIndices2 } from "haoxin-excalidraw-
|
|
9748
|
-
import { CaptureUpdateAction as CaptureUpdateAction12 } from "haoxin-excalidraw-
|
|
9746
|
+
} from "@haoxin-web/excalidraw-element";
|
|
9747
|
+
import { syncMovedIndices as syncMovedIndices2 } from "@haoxin-web/excalidraw-element";
|
|
9748
|
+
import { CaptureUpdateAction as CaptureUpdateAction12 } from "@haoxin-web/excalidraw-element";
|
|
9749
9749
|
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
9750
9750
|
var allElementsInSameGroup = (elements) => {
|
|
9751
9751
|
if (elements.length >= 2) {
|
|
@@ -9971,7 +9971,7 @@ var actionUngroup = register({
|
|
|
9971
9971
|
|
|
9972
9972
|
// actions/actionNavigate.tsx
|
|
9973
9973
|
import clsx18 from "clsx";
|
|
9974
|
-
import { CaptureUpdateAction as CaptureUpdateAction13 } from "haoxin-excalidraw-
|
|
9974
|
+
import { CaptureUpdateAction as CaptureUpdateAction13 } from "@haoxin-web/excalidraw-element";
|
|
9975
9975
|
|
|
9976
9976
|
// clients.ts
|
|
9977
9977
|
import {
|
|
@@ -9980,7 +9980,7 @@ import {
|
|
|
9980
9980
|
COLOR_WHITE,
|
|
9981
9981
|
THEME as THEME8,
|
|
9982
9982
|
UserIdleState
|
|
9983
|
-
} from "haoxin-excalidraw-
|
|
9983
|
+
} from "@haoxin-web/excalidraw-common";
|
|
9984
9984
|
|
|
9985
9985
|
// renderer/roundRect.ts
|
|
9986
9986
|
var roundRect = (context, x, y, width, height, radius, strokeColor) => {
|
|
@@ -10330,9 +10330,9 @@ var actionGoToCollaborator = register({
|
|
|
10330
10330
|
});
|
|
10331
10331
|
|
|
10332
10332
|
// actions/actionAddToLibrary.ts
|
|
10333
|
-
import { LIBRARY_DISABLED_TYPES, randomId as randomId3 } from "haoxin-excalidraw-
|
|
10334
|
-
import { deepCopyElement as deepCopyElement2 } from "haoxin-excalidraw-
|
|
10335
|
-
import { CaptureUpdateAction as CaptureUpdateAction14 } from "haoxin-excalidraw-
|
|
10333
|
+
import { LIBRARY_DISABLED_TYPES, randomId as randomId3 } from "@haoxin-web/excalidraw-common";
|
|
10334
|
+
import { deepCopyElement as deepCopyElement2 } from "@haoxin-web/excalidraw-element";
|
|
10335
|
+
import { CaptureUpdateAction as CaptureUpdateAction14 } from "@haoxin-web/excalidraw-element";
|
|
10336
10336
|
var actionAddToLibrary = register({
|
|
10337
10337
|
name: "addToLibrary",
|
|
10338
10338
|
trackEvent: { category: "element" },
|
|
@@ -10385,13 +10385,13 @@ var actionAddToLibrary = register({
|
|
|
10385
10385
|
});
|
|
10386
10386
|
|
|
10387
10387
|
// actions/actionAlign.tsx
|
|
10388
|
-
import { getNonDeletedElements as getNonDeletedElements10 } from "haoxin-excalidraw-
|
|
10389
|
-
import { isFrameLikeElement as isFrameLikeElement5 } from "haoxin-excalidraw-
|
|
10390
|
-
import { updateFrameMembershipOfSelectedElements } from "haoxin-excalidraw-
|
|
10391
|
-
import { KEYS as KEYS19, arrayToMap as arrayToMap7, getShortcutKey as getShortcutKey7 } from "haoxin-excalidraw-
|
|
10392
|
-
import { alignElements } from "haoxin-excalidraw-
|
|
10393
|
-
import { CaptureUpdateAction as CaptureUpdateAction15 } from "haoxin-excalidraw-
|
|
10394
|
-
import { getSelectedElementsByGroup } from "haoxin-excalidraw-
|
|
10388
|
+
import { getNonDeletedElements as getNonDeletedElements10 } from "@haoxin-web/excalidraw-element";
|
|
10389
|
+
import { isFrameLikeElement as isFrameLikeElement5 } from "@haoxin-web/excalidraw-element";
|
|
10390
|
+
import { updateFrameMembershipOfSelectedElements } from "@haoxin-web/excalidraw-element";
|
|
10391
|
+
import { KEYS as KEYS19, arrayToMap as arrayToMap7, getShortcutKey as getShortcutKey7 } from "@haoxin-web/excalidraw-common";
|
|
10392
|
+
import { alignElements } from "@haoxin-web/excalidraw-element";
|
|
10393
|
+
import { CaptureUpdateAction as CaptureUpdateAction15 } from "@haoxin-web/excalidraw-element";
|
|
10394
|
+
import { getSelectedElementsByGroup } from "@haoxin-web/excalidraw-element";
|
|
10395
10395
|
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
10396
10396
|
var alignActionsPredicate = (appState, app) => {
|
|
10397
10397
|
const selectedElements = app.scene.getSelectedElements(appState);
|
|
@@ -10605,13 +10605,13 @@ var actionAlignHorizontallyCentered = register({
|
|
|
10605
10605
|
});
|
|
10606
10606
|
|
|
10607
10607
|
// actions/actionDistribute.tsx
|
|
10608
|
-
import { getNonDeletedElements as getNonDeletedElements11 } from "haoxin-excalidraw-
|
|
10609
|
-
import { isFrameLikeElement as isFrameLikeElement6 } from "haoxin-excalidraw-
|
|
10610
|
-
import { CODES as CODES4, KEYS as KEYS20, arrayToMap as arrayToMap8, getShortcutKey as getShortcutKey8 } from "haoxin-excalidraw-
|
|
10611
|
-
import { updateFrameMembershipOfSelectedElements as updateFrameMembershipOfSelectedElements2 } from "haoxin-excalidraw-
|
|
10612
|
-
import { distributeElements } from "haoxin-excalidraw-
|
|
10613
|
-
import { CaptureUpdateAction as CaptureUpdateAction16 } from "haoxin-excalidraw-
|
|
10614
|
-
import { getSelectedElementsByGroup as getSelectedElementsByGroup2 } from "haoxin-excalidraw-
|
|
10608
|
+
import { getNonDeletedElements as getNonDeletedElements11 } from "@haoxin-web/excalidraw-element";
|
|
10609
|
+
import { isFrameLikeElement as isFrameLikeElement6 } from "@haoxin-web/excalidraw-element";
|
|
10610
|
+
import { CODES as CODES4, KEYS as KEYS20, arrayToMap as arrayToMap8, getShortcutKey as getShortcutKey8 } from "@haoxin-web/excalidraw-common";
|
|
10611
|
+
import { updateFrameMembershipOfSelectedElements as updateFrameMembershipOfSelectedElements2 } from "@haoxin-web/excalidraw-element";
|
|
10612
|
+
import { distributeElements } from "@haoxin-web/excalidraw-element";
|
|
10613
|
+
import { CaptureUpdateAction as CaptureUpdateAction16 } from "@haoxin-web/excalidraw-element";
|
|
10614
|
+
import { getSelectedElementsByGroup as getSelectedElementsByGroup2 } from "@haoxin-web/excalidraw-element";
|
|
10615
10615
|
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
10616
10616
|
var enableActionGroup2 = (appState, app) => {
|
|
10617
10617
|
const selectedElements = app.scene.getSelectedElements(appState);
|
|
@@ -10697,23 +10697,23 @@ var distributeVertically = register({
|
|
|
10697
10697
|
});
|
|
10698
10698
|
|
|
10699
10699
|
// actions/actionFlip.ts
|
|
10700
|
-
import { getNonDeletedElements as getNonDeletedElements12 } from "haoxin-excalidraw-
|
|
10700
|
+
import { getNonDeletedElements as getNonDeletedElements12 } from "@haoxin-web/excalidraw-element";
|
|
10701
10701
|
import {
|
|
10702
10702
|
bindOrUnbindLinearElements,
|
|
10703
10703
|
isBindingEnabled as isBindingEnabled2
|
|
10704
|
-
} from "haoxin-excalidraw-
|
|
10705
|
-
import { getCommonBoundingBox } from "haoxin-excalidraw-
|
|
10706
|
-
import { newElementWith as newElementWith7 } from "haoxin-excalidraw-
|
|
10707
|
-
import { deepCopyElement as deepCopyElement3 } from "haoxin-excalidraw-
|
|
10708
|
-
import { resizeMultipleElements } from "haoxin-excalidraw-
|
|
10704
|
+
} from "@haoxin-web/excalidraw-element";
|
|
10705
|
+
import { getCommonBoundingBox } from "@haoxin-web/excalidraw-element";
|
|
10706
|
+
import { newElementWith as newElementWith7 } from "@haoxin-web/excalidraw-element";
|
|
10707
|
+
import { deepCopyElement as deepCopyElement3 } from "@haoxin-web/excalidraw-element";
|
|
10708
|
+
import { resizeMultipleElements } from "@haoxin-web/excalidraw-element";
|
|
10709
10709
|
import {
|
|
10710
10710
|
isArrowElement as isArrowElement3,
|
|
10711
10711
|
isElbowArrow as isElbowArrow3,
|
|
10712
10712
|
isLinearElement as isLinearElement4
|
|
10713
|
-
} from "haoxin-excalidraw-
|
|
10714
|
-
import { updateFrameMembershipOfSelectedElements as updateFrameMembershipOfSelectedElements3 } from "haoxin-excalidraw-
|
|
10715
|
-
import { CODES as CODES5, KEYS as KEYS21, arrayToMap as arrayToMap9 } from "haoxin-excalidraw-
|
|
10716
|
-
import { CaptureUpdateAction as CaptureUpdateAction17 } from "haoxin-excalidraw-
|
|
10713
|
+
} from "@haoxin-web/excalidraw-element";
|
|
10714
|
+
import { updateFrameMembershipOfSelectedElements as updateFrameMembershipOfSelectedElements3 } from "@haoxin-web/excalidraw-element";
|
|
10715
|
+
import { CODES as CODES5, KEYS as KEYS21, arrayToMap as arrayToMap9 } from "@haoxin-web/excalidraw-common";
|
|
10716
|
+
import { CaptureUpdateAction as CaptureUpdateAction17 } from "@haoxin-web/excalidraw-element";
|
|
10717
10717
|
var actionFlipHorizontal = register({
|
|
10718
10718
|
name: "flipHorizontal",
|
|
10719
10719
|
label: "labels.flipHorizontal",
|
|
@@ -10843,10 +10843,10 @@ var flipElements = (selectedElements, elementsMap, appState, flipDirection, app)
|
|
|
10843
10843
|
};
|
|
10844
10844
|
|
|
10845
10845
|
// actions/actionClipboard.tsx
|
|
10846
|
-
import { isTextElement as isTextElement4 } from "haoxin-excalidraw-
|
|
10847
|
-
import { getTextFromElements } from "haoxin-excalidraw-
|
|
10848
|
-
import { CODES as CODES6, KEYS as KEYS22, isFirefox as isFirefox2 } from "haoxin-excalidraw-
|
|
10849
|
-
import { CaptureUpdateAction as CaptureUpdateAction18 } from "haoxin-excalidraw-
|
|
10846
|
+
import { isTextElement as isTextElement4 } from "@haoxin-web/excalidraw-element";
|
|
10847
|
+
import { getTextFromElements } from "@haoxin-web/excalidraw-element";
|
|
10848
|
+
import { CODES as CODES6, KEYS as KEYS22, isFirefox as isFirefox2 } from "@haoxin-web/excalidraw-common";
|
|
10849
|
+
import { CaptureUpdateAction as CaptureUpdateAction18 } from "@haoxin-web/excalidraw-element";
|
|
10850
10850
|
var actionCopy = register({
|
|
10851
10851
|
name: "copy",
|
|
10852
10852
|
label: "labels.copy",
|
|
@@ -11079,8 +11079,8 @@ var copyText = register({
|
|
|
11079
11079
|
});
|
|
11080
11080
|
|
|
11081
11081
|
// actions/actionToggleGridMode.tsx
|
|
11082
|
-
import { CODES as CODES7, KEYS as KEYS23 } from "haoxin-excalidraw-
|
|
11083
|
-
import { CaptureUpdateAction as CaptureUpdateAction19 } from "haoxin-excalidraw-
|
|
11082
|
+
import { CODES as CODES7, KEYS as KEYS23 } from "@haoxin-web/excalidraw-common";
|
|
11083
|
+
import { CaptureUpdateAction as CaptureUpdateAction19 } from "@haoxin-web/excalidraw-element";
|
|
11084
11084
|
var actionToggleGridMode = register({
|
|
11085
11085
|
name: "gridMode",
|
|
11086
11086
|
icon: gridIcon,
|
|
@@ -11109,8 +11109,8 @@ var actionToggleGridMode = register({
|
|
|
11109
11109
|
});
|
|
11110
11110
|
|
|
11111
11111
|
// actions/actionToggleZenMode.tsx
|
|
11112
|
-
import { CODES as CODES8, KEYS as KEYS24 } from "haoxin-excalidraw-
|
|
11113
|
-
import { CaptureUpdateAction as CaptureUpdateAction20 } from "haoxin-excalidraw-
|
|
11112
|
+
import { CODES as CODES8, KEYS as KEYS24 } from "@haoxin-web/excalidraw-common";
|
|
11113
|
+
import { CaptureUpdateAction as CaptureUpdateAction20 } from "@haoxin-web/excalidraw-element";
|
|
11114
11114
|
var actionToggleZenMode = register({
|
|
11115
11115
|
name: "zenMode",
|
|
11116
11116
|
label: "buttons.zenMode",
|
|
@@ -11137,8 +11137,8 @@ var actionToggleZenMode = register({
|
|
|
11137
11137
|
});
|
|
11138
11138
|
|
|
11139
11139
|
// actions/actionToggleObjectsSnapMode.tsx
|
|
11140
|
-
import { CODES as CODES9, KEYS as KEYS25 } from "haoxin-excalidraw-
|
|
11141
|
-
import { CaptureUpdateAction as CaptureUpdateAction21 } from "haoxin-excalidraw-
|
|
11140
|
+
import { CODES as CODES9, KEYS as KEYS25 } from "@haoxin-web/excalidraw-common";
|
|
11141
|
+
import { CaptureUpdateAction as CaptureUpdateAction21 } from "@haoxin-web/excalidraw-element";
|
|
11142
11142
|
var actionToggleObjectsSnapMode = register({
|
|
11143
11143
|
name: "objectsSnapMode",
|
|
11144
11144
|
label: "buttons.objectsSnapMode",
|
|
@@ -11166,8 +11166,8 @@ var actionToggleObjectsSnapMode = register({
|
|
|
11166
11166
|
});
|
|
11167
11167
|
|
|
11168
11168
|
// actions/actionToggleStats.tsx
|
|
11169
|
-
import { CODES as CODES10, KEYS as KEYS26 } from "haoxin-excalidraw-
|
|
11170
|
-
import { CaptureUpdateAction as CaptureUpdateAction22 } from "haoxin-excalidraw-
|
|
11169
|
+
import { CODES as CODES10, KEYS as KEYS26 } from "@haoxin-web/excalidraw-common";
|
|
11170
|
+
import { CaptureUpdateAction as CaptureUpdateAction22 } from "@haoxin-web/excalidraw-element";
|
|
11171
11171
|
var actionToggleStats = register({
|
|
11172
11172
|
name: "stats",
|
|
11173
11173
|
label: "stats.fullTitle",
|
|
@@ -11196,29 +11196,29 @@ import {
|
|
|
11196
11196
|
VERTICAL_ALIGN as VERTICAL_ALIGN3,
|
|
11197
11197
|
arrayToMap as arrayToMap10,
|
|
11198
11198
|
getFontString
|
|
11199
|
-
} from "haoxin-excalidraw-
|
|
11199
|
+
} from "@haoxin-web/excalidraw-common";
|
|
11200
11200
|
import {
|
|
11201
11201
|
getOriginalContainerHeightFromCache,
|
|
11202
11202
|
resetOriginalContainerCache,
|
|
11203
11203
|
updateOriginalContainerCache
|
|
11204
|
-
} from "haoxin-excalidraw-
|
|
11204
|
+
} from "@haoxin-web/excalidraw-element";
|
|
11205
11205
|
import {
|
|
11206
11206
|
computeBoundTextPosition,
|
|
11207
11207
|
computeContainerDimensionForBoundText,
|
|
11208
11208
|
getBoundTextElement as getBoundTextElement3,
|
|
11209
11209
|
redrawTextBoundingBox as redrawTextBoundingBox3
|
|
11210
|
-
} from "haoxin-excalidraw-
|
|
11210
|
+
} from "@haoxin-web/excalidraw-element";
|
|
11211
11211
|
import {
|
|
11212
11212
|
hasBoundTextElement as hasBoundTextElement2,
|
|
11213
11213
|
isArrowElement as isArrowElement4,
|
|
11214
11214
|
isTextBindableContainer,
|
|
11215
11215
|
isTextElement as isTextElement5,
|
|
11216
11216
|
isUsingAdaptiveRadius as isUsingAdaptiveRadius2
|
|
11217
|
-
} from "haoxin-excalidraw-
|
|
11218
|
-
import { measureText } from "haoxin-excalidraw-
|
|
11219
|
-
import { syncMovedIndices as syncMovedIndices3 } from "haoxin-excalidraw-
|
|
11220
|
-
import { newElement as newElement2 } from "haoxin-excalidraw-
|
|
11221
|
-
import { CaptureUpdateAction as CaptureUpdateAction23 } from "haoxin-excalidraw-
|
|
11217
|
+
} from "@haoxin-web/excalidraw-element";
|
|
11218
|
+
import { measureText } from "@haoxin-web/excalidraw-element";
|
|
11219
|
+
import { syncMovedIndices as syncMovedIndices3 } from "@haoxin-web/excalidraw-element";
|
|
11220
|
+
import { newElement as newElement2 } from "@haoxin-web/excalidraw-element";
|
|
11221
|
+
import { CaptureUpdateAction as CaptureUpdateAction23 } from "@haoxin-web/excalidraw-element";
|
|
11222
11222
|
var actionUnbindText = register({
|
|
11223
11223
|
name: "unbindText",
|
|
11224
11224
|
label: "labels.unbindText",
|
|
@@ -11452,12 +11452,12 @@ var actionWrapTextInContainer = register({
|
|
|
11452
11452
|
});
|
|
11453
11453
|
|
|
11454
11454
|
// actions/actionLink.tsx
|
|
11455
|
-
import { isEmbeddableElement as isEmbeddableElement2 } from "haoxin-excalidraw-
|
|
11456
|
-
import { KEYS as KEYS28, getShortcutKey as getShortcutKey9 } from "haoxin-excalidraw-
|
|
11457
|
-
import { CaptureUpdateAction as CaptureUpdateAction24 } from "haoxin-excalidraw-
|
|
11455
|
+
import { isEmbeddableElement as isEmbeddableElement2 } from "@haoxin-web/excalidraw-element";
|
|
11456
|
+
import { KEYS as KEYS28, getShortcutKey as getShortcutKey9 } from "@haoxin-web/excalidraw-common";
|
|
11457
|
+
import { CaptureUpdateAction as CaptureUpdateAction24 } from "@haoxin-web/excalidraw-element";
|
|
11458
11458
|
|
|
11459
11459
|
// components/hyperlink/Hyperlink.tsx
|
|
11460
|
-
import { pointFrom as pointFrom4 } from "haoxin-excalidraw-
|
|
11460
|
+
import { pointFrom as pointFrom4 } from "@haoxin-web/excalidraw-math";
|
|
11461
11461
|
import clsx19 from "clsx";
|
|
11462
11462
|
import {
|
|
11463
11463
|
useCallback as useCallback4,
|
|
@@ -11466,19 +11466,19 @@ import {
|
|
|
11466
11466
|
useRef as useRef12,
|
|
11467
11467
|
useState as useState9
|
|
11468
11468
|
} from "react";
|
|
11469
|
-
import { EVENT as EVENT6, HYPERLINK_TOOLTIP_DELAY, KEYS as KEYS27 } from "haoxin-excalidraw-
|
|
11470
|
-
import { getElementAbsoluteCoords } from "haoxin-excalidraw-
|
|
11471
|
-
import { hitElementBoundingBox } from "haoxin-excalidraw-
|
|
11472
|
-
import { isElementLink } from "haoxin-excalidraw-
|
|
11473
|
-
import { getEmbedLink, embeddableURLValidator } from "haoxin-excalidraw-
|
|
11469
|
+
import { EVENT as EVENT6, HYPERLINK_TOOLTIP_DELAY, KEYS as KEYS27 } from "@haoxin-web/excalidraw-common";
|
|
11470
|
+
import { getElementAbsoluteCoords } from "@haoxin-web/excalidraw-element";
|
|
11471
|
+
import { hitElementBoundingBox } from "@haoxin-web/excalidraw-element";
|
|
11472
|
+
import { isElementLink } from "@haoxin-web/excalidraw-element";
|
|
11473
|
+
import { getEmbedLink, embeddableURLValidator } from "@haoxin-web/excalidraw-element";
|
|
11474
11474
|
import {
|
|
11475
11475
|
sceneCoordsToViewportCoords,
|
|
11476
11476
|
viewportCoordsToSceneCoords,
|
|
11477
11477
|
wrapEvent,
|
|
11478
11478
|
isLocalLink,
|
|
11479
11479
|
normalizeLink
|
|
11480
|
-
} from "haoxin-excalidraw-
|
|
11481
|
-
import { isEmbeddableElement } from "haoxin-excalidraw-
|
|
11480
|
+
} from "@haoxin-web/excalidraw-common";
|
|
11481
|
+
import { isEmbeddableElement } from "@haoxin-web/excalidraw-element";
|
|
11482
11482
|
import { jsx as jsx48, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
11483
11483
|
var POPUP_WIDTH = 380;
|
|
11484
11484
|
var POPUP_HEIGHT = 42;
|
|
@@ -11857,13 +11857,13 @@ var actionLink = register({
|
|
|
11857
11857
|
});
|
|
11858
11858
|
|
|
11859
11859
|
// actions/actionElementLock.ts
|
|
11860
|
-
import { KEYS as KEYS29, arrayToMap as arrayToMap11, randomId as randomId4 } from "haoxin-excalidraw-
|
|
11860
|
+
import { KEYS as KEYS29, arrayToMap as arrayToMap11, randomId as randomId4 } from "@haoxin-web/excalidraw-common";
|
|
11861
11861
|
import {
|
|
11862
11862
|
elementsAreInSameGroup,
|
|
11863
11863
|
newElementWith as newElementWith8,
|
|
11864
11864
|
selectGroupsFromGivenElements
|
|
11865
|
-
} from "haoxin-excalidraw-
|
|
11866
|
-
import { CaptureUpdateAction as CaptureUpdateAction25 } from "haoxin-excalidraw-
|
|
11865
|
+
} from "@haoxin-web/excalidraw-element";
|
|
11866
|
+
import { CaptureUpdateAction as CaptureUpdateAction25 } from "@haoxin-web/excalidraw-element";
|
|
11867
11867
|
var shouldLock = (elements) => elements.every((el) => !el.locked);
|
|
11868
11868
|
var actionToggleElementLock = register({
|
|
11869
11869
|
name: "toggleElementLock",
|
|
@@ -12009,12 +12009,12 @@ import {
|
|
|
12009
12009
|
isElbowArrow as isElbowArrow7,
|
|
12010
12010
|
isLinearElement as isLinearElement9,
|
|
12011
12011
|
isLineElement as isLineElement4
|
|
12012
|
-
} from "haoxin-excalidraw-
|
|
12013
|
-
import { arrayToMap as arrayToMap20, invariant as invariant8 } from "haoxin-excalidraw-
|
|
12012
|
+
} from "@haoxin-web/excalidraw-element";
|
|
12013
|
+
import { arrayToMap as arrayToMap20, invariant as invariant8 } from "@haoxin-web/excalidraw-common";
|
|
12014
12014
|
import {
|
|
12015
12015
|
toggleLinePolygonState as toggleLinePolygonState3,
|
|
12016
12016
|
CaptureUpdateAction as CaptureUpdateAction28
|
|
12017
|
-
} from "haoxin-excalidraw-
|
|
12017
|
+
} from "@haoxin-web/excalidraw-element";
|
|
12018
12018
|
|
|
12019
12019
|
// components/CommandPalette/CommandPalette.tsx
|
|
12020
12020
|
import clsx32 from "clsx";
|
|
@@ -12027,18 +12027,18 @@ import {
|
|
|
12027
12027
|
capitalizeString as capitalizeString2,
|
|
12028
12028
|
getShortcutKey as getShortcutKey11,
|
|
12029
12029
|
isWritableElement
|
|
12030
|
-
} from "haoxin-excalidraw-
|
|
12030
|
+
} from "@haoxin-web/excalidraw-common";
|
|
12031
12031
|
|
|
12032
12032
|
// actions/actionToggleShapeSwitch.tsx
|
|
12033
|
-
import { CaptureUpdateAction as CaptureUpdateAction26 } from "haoxin-excalidraw-
|
|
12033
|
+
import { CaptureUpdateAction as CaptureUpdateAction26 } from "@haoxin-web/excalidraw-element";
|
|
12034
12034
|
|
|
12035
12035
|
// components/ConvertElementTypePopup.tsx
|
|
12036
12036
|
import { useEffect as useEffect16, useMemo as useMemo5, useRef as useRef13, useState as useState10 } from "react";
|
|
12037
12037
|
import {
|
|
12038
12038
|
getLinearElementSubType,
|
|
12039
12039
|
updateElbowArrowPoints as updateElbowArrowPoints2
|
|
12040
|
-
} from "haoxin-excalidraw-
|
|
12041
|
-
import { pointFrom as pointFrom5, pointRotateRads } from "haoxin-excalidraw-
|
|
12040
|
+
} from "@haoxin-web/excalidraw-element";
|
|
12041
|
+
import { pointFrom as pointFrom5, pointRotateRads } from "@haoxin-web/excalidraw-math";
|
|
12042
12042
|
import {
|
|
12043
12043
|
hasBoundTextElement as hasBoundTextElement3,
|
|
12044
12044
|
isArrowBoundToElement,
|
|
@@ -12046,18 +12046,18 @@ import {
|
|
|
12046
12046
|
isElbowArrow as isElbowArrow4,
|
|
12047
12047
|
isLinearElement as isLinearElement5,
|
|
12048
12048
|
isUsingAdaptiveRadius as isUsingAdaptiveRadius3
|
|
12049
|
-
} from "haoxin-excalidraw-
|
|
12049
|
+
} from "@haoxin-web/excalidraw-element";
|
|
12050
12050
|
import {
|
|
12051
12051
|
getCommonBoundingBox as getCommonBoundingBox2,
|
|
12052
12052
|
getElementAbsoluteCoords as getElementAbsoluteCoords2
|
|
12053
|
-
} from "haoxin-excalidraw-
|
|
12053
|
+
} from "@haoxin-web/excalidraw-element";
|
|
12054
12054
|
import {
|
|
12055
12055
|
getBoundTextElement as getBoundTextElement4,
|
|
12056
12056
|
getBoundTextMaxHeight,
|
|
12057
12057
|
getBoundTextMaxWidth,
|
|
12058
12058
|
redrawTextBoundingBox as redrawTextBoundingBox4
|
|
12059
|
-
} from "haoxin-excalidraw-
|
|
12060
|
-
import { wrapText } from "haoxin-excalidraw-
|
|
12059
|
+
} from "@haoxin-web/excalidraw-element";
|
|
12060
|
+
import { wrapText } from "@haoxin-web/excalidraw-element";
|
|
12061
12061
|
import {
|
|
12062
12062
|
assertNever,
|
|
12063
12063
|
CLASSES,
|
|
@@ -12066,16 +12066,16 @@ import {
|
|
|
12066
12066
|
mapFind,
|
|
12067
12067
|
reduceToCommonValue as reduceToCommonValue2,
|
|
12068
12068
|
updateActiveTool as updateActiveTool5
|
|
12069
|
-
} from "haoxin-excalidraw-
|
|
12070
|
-
import { measureText as measureText2 } from "haoxin-excalidraw-
|
|
12071
|
-
import { LinearElementEditor as LinearElementEditor6 } from "haoxin-excalidraw-
|
|
12069
|
+
} from "@haoxin-web/excalidraw-common";
|
|
12070
|
+
import { measureText as measureText2 } from "@haoxin-web/excalidraw-element";
|
|
12071
|
+
import { LinearElementEditor as LinearElementEditor6 } from "@haoxin-web/excalidraw-element";
|
|
12072
12072
|
import {
|
|
12073
12073
|
newArrowElement,
|
|
12074
12074
|
newElement as newElement3,
|
|
12075
12075
|
newLinearElement as newLinearElement2
|
|
12076
|
-
} from "haoxin-excalidraw-
|
|
12077
|
-
import { ShapeCache } from "haoxin-excalidraw-
|
|
12078
|
-
import { updateBindings } from "haoxin-excalidraw-
|
|
12076
|
+
} from "@haoxin-web/excalidraw-element";
|
|
12077
|
+
import { ShapeCache } from "@haoxin-web/excalidraw-element";
|
|
12078
|
+
import { updateBindings } from "@haoxin-web/excalidraw-element";
|
|
12079
12079
|
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
12080
12080
|
var GAP_HORIZONTAL = 8;
|
|
12081
12081
|
var GAP_VERTICAL = 10;
|
|
@@ -12666,8 +12666,8 @@ import {
|
|
|
12666
12666
|
canCreateLinkFromElements,
|
|
12667
12667
|
defaultGetElementLinkFromSelection,
|
|
12668
12668
|
getLinkIdAndTypeFromSelection
|
|
12669
|
-
} from "haoxin-excalidraw-
|
|
12670
|
-
import { CaptureUpdateAction as CaptureUpdateAction27 } from "haoxin-excalidraw-
|
|
12669
|
+
} from "@haoxin-web/excalidraw-element";
|
|
12670
|
+
import { CaptureUpdateAction as CaptureUpdateAction27 } from "@haoxin-web/excalidraw-element";
|
|
12671
12671
|
var actionCopyElementLink = register({
|
|
12672
12672
|
name: "copyElementLink",
|
|
12673
12673
|
label: "labels.copyElementLink",
|
|
@@ -12750,7 +12750,7 @@ var actionLinkToElement = register({
|
|
|
12750
12750
|
});
|
|
12751
12751
|
|
|
12752
12752
|
// actions/shortcuts.ts
|
|
12753
|
-
import { isDarwin as isDarwin2, getShortcutKey as getShortcutKey10 } from "haoxin-excalidraw-
|
|
12753
|
+
import { isDarwin as isDarwin2, getShortcutKey as getShortcutKey10 } from "@haoxin-web/excalidraw-common";
|
|
12754
12754
|
var shortcutMap = {
|
|
12755
12755
|
toggleTheme: [getShortcutKey10("Shift+Alt+D")],
|
|
12756
12756
|
saveScene: [getShortcutKey10("CtrlOrCmd+S")],
|
|
@@ -13028,7 +13028,7 @@ var deburr = (str) => {
|
|
|
13028
13028
|
// components/Dialog.tsx
|
|
13029
13029
|
import clsx28 from "clsx";
|
|
13030
13030
|
import { useEffect as useEffect26, useState as useState19 } from "react";
|
|
13031
|
-
import { KEYS as KEYS32, queryFocusableElements } from "haoxin-excalidraw-
|
|
13031
|
+
import { KEYS as KEYS32, queryFocusableElements } from "@haoxin-web/excalidraw-common";
|
|
13032
13032
|
|
|
13033
13033
|
// hooks/useCallbackRefState.ts
|
|
13034
13034
|
import { useCallback as useCallback5, useState as useState11 } from "react";
|
|
@@ -13051,7 +13051,7 @@ import {
|
|
|
13051
13051
|
LIBRARY_DISABLED_TYPES as LIBRARY_DISABLED_TYPES2,
|
|
13052
13052
|
randomId as randomId5,
|
|
13053
13053
|
isShallowEqual
|
|
13054
|
-
} from "haoxin-excalidraw-
|
|
13054
|
+
} from "@haoxin-web/excalidraw-common";
|
|
13055
13055
|
|
|
13056
13056
|
// data/library.ts
|
|
13057
13057
|
import { useEffect as useEffect18, useRef as useRef14 } from "react";
|
|
@@ -13070,12 +13070,12 @@ import {
|
|
|
13070
13070
|
toValidURL,
|
|
13071
13071
|
Queue,
|
|
13072
13072
|
Emitter
|
|
13073
|
-
} from "haoxin-excalidraw-
|
|
13074
|
-
import { hashElementsVersion, hashString } from "haoxin-excalidraw-
|
|
13075
|
-
import { getCommonBoundingBox as getCommonBoundingBox3 } from "haoxin-excalidraw-
|
|
13073
|
+
} from "@haoxin-web/excalidraw-common";
|
|
13074
|
+
import { hashElementsVersion, hashString } from "@haoxin-web/excalidraw-element";
|
|
13075
|
+
import { getCommonBoundingBox as getCommonBoundingBox3 } from "@haoxin-web/excalidraw-element";
|
|
13076
13076
|
|
|
13077
13077
|
// ../utils/src/export.ts
|
|
13078
|
-
import { MIME_TYPES as MIME_TYPES4 } from "haoxin-excalidraw-
|
|
13078
|
+
import { MIME_TYPES as MIME_TYPES4 } from "@haoxin-web/excalidraw-common";
|
|
13079
13079
|
var exportToCanvas2 = ({
|
|
13080
13080
|
elements,
|
|
13081
13081
|
appState,
|
|
@@ -13212,7 +13212,7 @@ var exportToClipboard = async (opts) => {
|
|
|
13212
13212
|
|
|
13213
13213
|
// hooks/useLibraryItemSvg.ts
|
|
13214
13214
|
import { useEffect as useEffect17, useState as useState12 } from "react";
|
|
13215
|
-
import { COLOR_PALETTE as COLOR_PALETTE4 } from "haoxin-excalidraw-
|
|
13215
|
+
import { COLOR_PALETTE as COLOR_PALETTE4 } from "@haoxin-web/excalidraw-common";
|
|
13216
13216
|
var libraryItemSvgsCache = atom(/* @__PURE__ */ new Map());
|
|
13217
13217
|
var exportLibraryItemToSvg = async (elements) => {
|
|
13218
13218
|
return await exportToSvg2({
|
|
@@ -13832,7 +13832,7 @@ var useHandleLibrary = (opts) => {
|
|
|
13832
13832
|
import clsx20 from "clsx";
|
|
13833
13833
|
|
|
13834
13834
|
// components/LibraryMenuBrowseButton.tsx
|
|
13835
|
-
import { VERSIONS } from "haoxin-excalidraw-
|
|
13835
|
+
import { VERSIONS } from "@haoxin-web/excalidraw-common";
|
|
13836
13836
|
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
13837
13837
|
var LibraryMenuBrowseButton = ({
|
|
13838
13838
|
theme,
|
|
@@ -13890,8 +13890,8 @@ import {
|
|
|
13890
13890
|
useRef as useRef18,
|
|
13891
13891
|
useState as useState17
|
|
13892
13892
|
} from "react";
|
|
13893
|
-
import { MIME_TYPES as MIME_TYPES6, arrayToMap as arrayToMap13 } from "haoxin-excalidraw-
|
|
13894
|
-
import { duplicateElements as duplicateElements2 } from "haoxin-excalidraw-
|
|
13893
|
+
import { MIME_TYPES as MIME_TYPES6, arrayToMap as arrayToMap13 } from "@haoxin-web/excalidraw-common";
|
|
13894
|
+
import { duplicateElements as duplicateElements2 } from "@haoxin-web/excalidraw-element";
|
|
13895
13895
|
|
|
13896
13896
|
// hooks/useScrollPosition.ts
|
|
13897
13897
|
import throttle from "lodash.throttle";
|
|
@@ -13920,7 +13920,7 @@ var useScrollPosition = (elementRef) => {
|
|
|
13920
13920
|
// components/LibraryMenuHeaderContent.tsx
|
|
13921
13921
|
import clsx25 from "clsx";
|
|
13922
13922
|
import { useCallback as useCallback7, useState as useState14 } from "react";
|
|
13923
|
-
import { muteFSAbortError } from "haoxin-excalidraw-
|
|
13923
|
+
import { muteFSAbortError } from "@haoxin-web/excalidraw-common";
|
|
13924
13924
|
|
|
13925
13925
|
// components/ConfirmDialog.tsx
|
|
13926
13926
|
import { flushSync } from "react-dom";
|
|
@@ -14028,7 +14028,7 @@ import {
|
|
|
14028
14028
|
VERSIONS as VERSIONS2,
|
|
14029
14029
|
chunk,
|
|
14030
14030
|
getExportSource
|
|
14031
|
-
} from "haoxin-excalidraw-
|
|
14031
|
+
} from "@haoxin-web/excalidraw-common";
|
|
14032
14032
|
|
|
14033
14033
|
// data/EditorLocalStorage.ts
|
|
14034
14034
|
var EditorLocalStorage = class {
|
|
@@ -14601,7 +14601,7 @@ var PublishLibrary_default = PublishLibrary;
|
|
|
14601
14601
|
// components/dropdownMenu/DropdownMenuContent.tsx
|
|
14602
14602
|
import clsx23 from "clsx";
|
|
14603
14603
|
import { useEffect as useEffect21, useRef as useRef16 } from "react";
|
|
14604
|
-
import { EVENT as EVENT8, KEYS as KEYS30 } from "haoxin-excalidraw-
|
|
14604
|
+
import { EVENT as EVENT8, KEYS as KEYS30 } from "@haoxin-web/excalidraw-common";
|
|
14605
14605
|
|
|
14606
14606
|
// components/Stack.tsx
|
|
14607
14607
|
import { forwardRef as forwardRef2 } from "react";
|
|
@@ -15684,7 +15684,7 @@ var LibraryMenu = memo3(() => {
|
|
|
15684
15684
|
import clsx27 from "clsx";
|
|
15685
15685
|
import { useRef as useRef20 } from "react";
|
|
15686
15686
|
import { createPortal as createPortal2 } from "react-dom";
|
|
15687
|
-
import { KEYS as KEYS31 } from "haoxin-excalidraw-
|
|
15687
|
+
import { KEYS as KEYS31 } from "@haoxin-web/excalidraw-common";
|
|
15688
15688
|
import { jsx as jsx67, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
15689
15689
|
var Modal = (props) => {
|
|
15690
15690
|
const { closeOnClickOutside = true } = props;
|
|
@@ -15839,7 +15839,7 @@ import {
|
|
|
15839
15839
|
|
|
15840
15840
|
// components/Button.tsx
|
|
15841
15841
|
import clsx29 from "clsx";
|
|
15842
|
-
import { composeEventHandlers as composeEventHandlers2 } from "haoxin-excalidraw-
|
|
15842
|
+
import { composeEventHandlers as composeEventHandlers2 } from "@haoxin-web/excalidraw-common";
|
|
15843
15843
|
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
15844
15844
|
var Button = ({
|
|
15845
15845
|
type = "button",
|
|
@@ -15941,7 +15941,7 @@ var TextField = forwardRef3(
|
|
|
15941
15941
|
);
|
|
15942
15942
|
|
|
15943
15943
|
// components/shapes.tsx
|
|
15944
|
-
import { KEYS as KEYS33 } from "haoxin-excalidraw-
|
|
15944
|
+
import { KEYS as KEYS33 } from "@haoxin-web/excalidraw-common";
|
|
15945
15945
|
var SHAPES = [
|
|
15946
15946
|
{
|
|
15947
15947
|
icon: SelectionIcon,
|
|
@@ -16106,19 +16106,19 @@ import {
|
|
|
16106
16106
|
KEYS as KEYS34,
|
|
16107
16107
|
capitalizeString,
|
|
16108
16108
|
isTransparent as isTransparent3
|
|
16109
|
-
} from "haoxin-excalidraw-
|
|
16109
|
+
} from "@haoxin-web/excalidraw-common";
|
|
16110
16110
|
import {
|
|
16111
16111
|
shouldAllowVerticalAlign,
|
|
16112
16112
|
suppportsHorizontalAlign
|
|
16113
|
-
} from "haoxin-excalidraw-
|
|
16113
|
+
} from "@haoxin-web/excalidraw-element";
|
|
16114
16114
|
import {
|
|
16115
16115
|
hasBoundTextElement as hasBoundTextElement4,
|
|
16116
16116
|
isElbowArrow as isElbowArrow5,
|
|
16117
16117
|
isImageElement,
|
|
16118
16118
|
isLinearElement as isLinearElement6,
|
|
16119
16119
|
isTextElement as isTextElement6
|
|
16120
|
-
} from "haoxin-excalidraw-
|
|
16121
|
-
import { hasStrokeColor as hasStrokeColor2, toolIsArrow } from "haoxin-excalidraw-
|
|
16120
|
+
} from "@haoxin-web/excalidraw-element";
|
|
16121
|
+
import { hasStrokeColor as hasStrokeColor2, toolIsArrow } from "@haoxin-web/excalidraw-element";
|
|
16122
16122
|
|
|
16123
16123
|
// context/tunnels.ts
|
|
16124
16124
|
import { createIsolation as createIsolation2 } from "jotai-scope";
|
|
@@ -17207,14 +17207,14 @@ import {
|
|
|
17207
17207
|
getSizeFromPoints as getSizeFromPoints2,
|
|
17208
17208
|
randomInteger as randomInteger2,
|
|
17209
17209
|
getUpdatedTimestamp
|
|
17210
|
-
} from "haoxin-excalidraw-
|
|
17210
|
+
} from "@haoxin-web/excalidraw-common";
|
|
17211
17211
|
|
|
17212
17212
|
// ../element/src/shape.ts
|
|
17213
17213
|
import { simplify } from "points-on-curve";
|
|
17214
17214
|
|
|
17215
17215
|
// ../utils/src/shape.ts
|
|
17216
17216
|
import { pointsOnBezierCurves } from "points-on-curve";
|
|
17217
|
-
import { invariant } from "haoxin-excalidraw-
|
|
17217
|
+
import { invariant } from "@haoxin-web/excalidraw-common";
|
|
17218
17218
|
import {
|
|
17219
17219
|
curve,
|
|
17220
17220
|
lineSegment,
|
|
@@ -17231,8 +17231,8 @@ import {
|
|
|
17231
17231
|
vectorAdd,
|
|
17232
17232
|
vectorFromPoint,
|
|
17233
17233
|
vectorScale
|
|
17234
|
-
} from "haoxin-excalidraw-
|
|
17235
|
-
import { getElementAbsoluteCoords as getElementAbsoluteCoords3 } from "haoxin-excalidraw-
|
|
17234
|
+
} from "@haoxin-web/excalidraw-math";
|
|
17235
|
+
import { getElementAbsoluteCoords as getElementAbsoluteCoords3 } from "@haoxin-web/excalidraw-element";
|
|
17236
17236
|
var getCurvePathOps = (shape) => {
|
|
17237
17237
|
if (!shape) {
|
|
17238
17238
|
return [];
|
|
@@ -17250,20 +17250,20 @@ import {
|
|
|
17250
17250
|
pointFrom as pointFrom18,
|
|
17251
17251
|
pointDistance as pointDistance7,
|
|
17252
17252
|
pointRotateRads as pointRotateRads12
|
|
17253
|
-
} from "haoxin-excalidraw-
|
|
17253
|
+
} from "@haoxin-web/excalidraw-math";
|
|
17254
17254
|
import {
|
|
17255
17255
|
ROUGHNESS,
|
|
17256
17256
|
isTransparent as isTransparent5,
|
|
17257
17257
|
assertNever as assertNever3,
|
|
17258
17258
|
COLOR_PALETTE as COLOR_PALETTE5,
|
|
17259
17259
|
LINE_POLYGON_POINT_MERGE_DISTANCE
|
|
17260
|
-
} from "haoxin-excalidraw-
|
|
17260
|
+
} from "@haoxin-web/excalidraw-common";
|
|
17261
17261
|
import { RoughGenerator } from "roughjs/bin/generator";
|
|
17262
17262
|
|
|
17263
17263
|
// ../element/src/renderElement.ts
|
|
17264
17264
|
import rough2 from "roughjs/bin/rough";
|
|
17265
17265
|
import { getStroke } from "perfect-freehand";
|
|
17266
|
-
import { isRightAngleRads } from "haoxin-excalidraw-
|
|
17266
|
+
import { isRightAngleRads } from "@haoxin-web/excalidraw-math";
|
|
17267
17267
|
import {
|
|
17268
17268
|
BOUND_TEXT_PADDING as BOUND_TEXT_PADDING4,
|
|
17269
17269
|
DEFAULT_REDUCED_GLOBAL_ALPHA,
|
|
@@ -17275,7 +17275,7 @@ import {
|
|
|
17275
17275
|
getFontString as getFontString5,
|
|
17276
17276
|
isRTL,
|
|
17277
17277
|
getVerticalOffset
|
|
17278
|
-
} from "haoxin-excalidraw-
|
|
17278
|
+
} from "@haoxin-web/excalidraw-common";
|
|
17279
17279
|
|
|
17280
17280
|
// ../element/src/bounds.ts
|
|
17281
17281
|
import rough from "roughjs/bin/rough";
|
|
@@ -17284,7 +17284,7 @@ import {
|
|
|
17284
17284
|
invariant as invariant7,
|
|
17285
17285
|
rescalePoints,
|
|
17286
17286
|
sizeOf
|
|
17287
|
-
} from "haoxin-excalidraw-
|
|
17287
|
+
} from "@haoxin-web/excalidraw-common";
|
|
17288
17288
|
import {
|
|
17289
17289
|
degreesToRadians,
|
|
17290
17290
|
lineSegment as lineSegment5,
|
|
@@ -17292,7 +17292,7 @@ import {
|
|
|
17292
17292
|
pointFrom as pointFrom14,
|
|
17293
17293
|
pointFromArray as pointFromArray3,
|
|
17294
17294
|
pointRotateRads as pointRotateRads9
|
|
17295
|
-
} from "haoxin-excalidraw-
|
|
17295
|
+
} from "@haoxin-web/excalidraw-math";
|
|
17296
17296
|
import { pointsOnBezierCurves as pointsOnBezierCurves2 } from "points-on-curve";
|
|
17297
17297
|
|
|
17298
17298
|
// ../element/src/linearElementEditor.ts
|
|
@@ -17305,7 +17305,7 @@ import {
|
|
|
17305
17305
|
vectorFromPoint as vectorFromPoint6,
|
|
17306
17306
|
curveLength,
|
|
17307
17307
|
curvePointAtLength
|
|
17308
|
-
} from "haoxin-excalidraw-
|
|
17308
|
+
} from "@haoxin-web/excalidraw-math";
|
|
17309
17309
|
import {
|
|
17310
17310
|
DRAGGING_THRESHOLD,
|
|
17311
17311
|
KEYS as KEYS37,
|
|
@@ -17314,11 +17314,11 @@ import {
|
|
|
17314
17314
|
invariant as invariant6,
|
|
17315
17315
|
tupleToCoors as tupleToCoors4,
|
|
17316
17316
|
viewportCoordsToSceneCoords as viewportCoordsToSceneCoords3
|
|
17317
|
-
} from "haoxin-excalidraw-
|
|
17317
|
+
} from "@haoxin-web/excalidraw-common";
|
|
17318
17318
|
import {
|
|
17319
17319
|
deconstructLinearOrFreeDrawElement as deconstructLinearOrFreeDrawElement2,
|
|
17320
17320
|
isPathALoop as isPathALoop3
|
|
17321
|
-
} from "haoxin-excalidraw-
|
|
17321
|
+
} from "@haoxin-web/excalidraw-element";
|
|
17322
17322
|
|
|
17323
17323
|
// ../element/src/binding.ts
|
|
17324
17324
|
import {
|
|
@@ -17329,7 +17329,7 @@ import {
|
|
|
17329
17329
|
invariant as invariant5,
|
|
17330
17330
|
isDevEnv as isDevEnv7,
|
|
17331
17331
|
isTestEnv as isTestEnv4
|
|
17332
|
-
} from "haoxin-excalidraw-
|
|
17332
|
+
} from "@haoxin-web/excalidraw-common";
|
|
17333
17333
|
import {
|
|
17334
17334
|
lineSegment as lineSegment4,
|
|
17335
17335
|
pointFrom as pointFrom12,
|
|
@@ -17345,10 +17345,10 @@ import {
|
|
|
17345
17345
|
pointsEqual as pointsEqual5,
|
|
17346
17346
|
lineSegmentIntersectionPoints as lineSegmentIntersectionPoints2,
|
|
17347
17347
|
PRECISION as PRECISION2
|
|
17348
|
-
} from "haoxin-excalidraw-
|
|
17348
|
+
} from "@haoxin-web/excalidraw-math";
|
|
17349
17349
|
|
|
17350
17350
|
// ../element/src/collision.ts
|
|
17351
|
-
import { isTransparent as isTransparent4 } from "haoxin-excalidraw-
|
|
17351
|
+
import { isTransparent as isTransparent4 } from "@haoxin-web/excalidraw-common";
|
|
17352
17352
|
import {
|
|
17353
17353
|
curveIntersectLineSegment,
|
|
17354
17354
|
isPointWithinBounds,
|
|
@@ -17361,11 +17361,11 @@ import {
|
|
|
17361
17361
|
vectorFromPoint as vectorFromPoint2,
|
|
17362
17362
|
vectorNormalize,
|
|
17363
17363
|
vectorScale as vectorScale2
|
|
17364
|
-
} from "haoxin-excalidraw-
|
|
17364
|
+
} from "@haoxin-web/excalidraw-math";
|
|
17365
17365
|
import {
|
|
17366
17366
|
ellipse as ellipse2,
|
|
17367
17367
|
ellipseSegmentInterceptPoints
|
|
17368
|
-
} from "haoxin-excalidraw-
|
|
17368
|
+
} from "@haoxin-web/excalidraw-math/ellipse";
|
|
17369
17369
|
|
|
17370
17370
|
// ../element/src/utils.ts
|
|
17371
17371
|
import {
|
|
@@ -17373,7 +17373,7 @@ import {
|
|
|
17373
17373
|
DEFAULT_PROPORTIONAL_RADIUS,
|
|
17374
17374
|
LINE_CONFIRM_THRESHOLD,
|
|
17375
17375
|
ROUNDNESS as ROUNDNESS4
|
|
17376
|
-
} from "haoxin-excalidraw-
|
|
17376
|
+
} from "@haoxin-web/excalidraw-common";
|
|
17377
17377
|
import {
|
|
17378
17378
|
curve as curve2,
|
|
17379
17379
|
curveCatmullRomCubicApproxPoints,
|
|
@@ -17383,7 +17383,7 @@ import {
|
|
|
17383
17383
|
pointFrom as pointFrom7,
|
|
17384
17384
|
pointFromArray as pointFromArray2,
|
|
17385
17385
|
rectangle
|
|
17386
|
-
} from "haoxin-excalidraw-
|
|
17386
|
+
} from "@haoxin-web/excalidraw-math";
|
|
17387
17387
|
var isPathALoop2 = (points, zoomValue = 1) => {
|
|
17388
17388
|
if (points.length >= 3) {
|
|
17389
17389
|
const [first, last] = [points[0], points[points.length - 1]];
|
|
@@ -17408,8 +17408,8 @@ var getCornerRadius = (x, element) => {
|
|
|
17408
17408
|
};
|
|
17409
17409
|
|
|
17410
17410
|
// ../element/src/typeChecks.ts
|
|
17411
|
-
import { ROUNDNESS as ROUNDNESS5 } from "haoxin-excalidraw-
|
|
17412
|
-
import { pointsEqual } from "haoxin-excalidraw-
|
|
17411
|
+
import { ROUNDNESS as ROUNDNESS5 } from "@haoxin-web/excalidraw-common";
|
|
17412
|
+
import { pointsEqual } from "@haoxin-web/excalidraw-math";
|
|
17413
17413
|
var isEmbeddableElement3 = (element) => {
|
|
17414
17414
|
return !!element && element.type === "embeddable";
|
|
17415
17415
|
};
|
|
@@ -17452,8 +17452,8 @@ import {
|
|
|
17452
17452
|
getFontString as getFontString4,
|
|
17453
17453
|
isProdEnv as isProdEnv2,
|
|
17454
17454
|
invariant as invariant2
|
|
17455
|
-
} from "haoxin-excalidraw-
|
|
17456
|
-
import { pointFrom as pointFrom8, pointRotateRads as pointRotateRads3 } from "haoxin-excalidraw-
|
|
17455
|
+
} from "@haoxin-web/excalidraw-common";
|
|
17456
|
+
import { pointFrom as pointFrom8, pointRotateRads as pointRotateRads3 } from "@haoxin-web/excalidraw-math";
|
|
17457
17457
|
|
|
17458
17458
|
// ../element/src/textMeasurements.ts
|
|
17459
17459
|
import {
|
|
@@ -17463,22 +17463,22 @@ import {
|
|
|
17463
17463
|
getFontString as getFontString3,
|
|
17464
17464
|
isTestEnv,
|
|
17465
17465
|
normalizeEOL
|
|
17466
|
-
} from "haoxin-excalidraw-
|
|
17466
|
+
} from "@haoxin-web/excalidraw-common";
|
|
17467
17467
|
var DUMMY_TEXT = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase();
|
|
17468
17468
|
|
|
17469
17469
|
// ../element/src/textWrapping.ts
|
|
17470
|
-
import { isDevEnv as isDevEnv4, isTestEnv as isTestEnv2 } from "haoxin-excalidraw-
|
|
17470
|
+
import { isDevEnv as isDevEnv4, isTestEnv as isTestEnv2 } from "@haoxin-web/excalidraw-common";
|
|
17471
17471
|
|
|
17472
17472
|
// ../element/src/distance.ts
|
|
17473
17473
|
import {
|
|
17474
17474
|
curvePointDistance,
|
|
17475
17475
|
distanceToLineSegment,
|
|
17476
17476
|
pointRotateRads as pointRotateRads4
|
|
17477
|
-
} from "haoxin-excalidraw-
|
|
17478
|
-
import { ellipse, ellipseDistanceFromPoint } from "haoxin-excalidraw-
|
|
17477
|
+
} from "@haoxin-web/excalidraw-math";
|
|
17478
|
+
import { ellipse, ellipseDistanceFromPoint } from "@haoxin-web/excalidraw-math/ellipse";
|
|
17479
17479
|
|
|
17480
17480
|
// ../element/src/heading.ts
|
|
17481
|
-
import { invariant as invariant3, isDevEnv as isDevEnv5, isTestEnv as isTestEnv3 } from "haoxin-excalidraw-
|
|
17481
|
+
import { invariant as invariant3, isDevEnv as isDevEnv5, isTestEnv as isTestEnv3 } from "@haoxin-web/excalidraw-common";
|
|
17482
17482
|
import {
|
|
17483
17483
|
pointFrom as pointFrom10,
|
|
17484
17484
|
pointFromVector as pointFromVector3,
|
|
@@ -17489,7 +17489,7 @@ import {
|
|
|
17489
17489
|
vectorCross,
|
|
17490
17490
|
vectorFromPoint as vectorFromPoint3,
|
|
17491
17491
|
vectorScale as vectorScale3
|
|
17492
|
-
} from "haoxin-excalidraw-
|
|
17492
|
+
} from "@haoxin-web/excalidraw-math";
|
|
17493
17493
|
var HEADING_RIGHT = [1, 0];
|
|
17494
17494
|
var HEADING_DOWN = [0, 1];
|
|
17495
17495
|
var HEADING_LEFT = [-1, 0];
|
|
@@ -17524,7 +17524,7 @@ import {
|
|
|
17524
17524
|
vectorCross as vectorCross2,
|
|
17525
17525
|
vectorFromPoint as vectorFromPoint4,
|
|
17526
17526
|
vectorScale as vectorScale4
|
|
17527
|
-
} from "haoxin-excalidraw-
|
|
17527
|
+
} from "@haoxin-web/excalidraw-math";
|
|
17528
17528
|
import {
|
|
17529
17529
|
BinaryHeap,
|
|
17530
17530
|
invariant as invariant4,
|
|
@@ -17533,19 +17533,19 @@ import {
|
|
|
17533
17533
|
getSizeFromPoints,
|
|
17534
17534
|
isDevEnv as isDevEnv6,
|
|
17535
17535
|
arrayToMap as arrayToMap14
|
|
17536
|
-
} from "haoxin-excalidraw-
|
|
17536
|
+
} from "@haoxin-web/excalidraw-common";
|
|
17537
17537
|
|
|
17538
17538
|
// ../element/src/sizeHelpers.ts
|
|
17539
17539
|
import {
|
|
17540
17540
|
SHIFT_LOCKING_ANGLE,
|
|
17541
17541
|
viewportCoordsToSceneCoords as viewportCoordsToSceneCoords2
|
|
17542
|
-
} from "haoxin-excalidraw-
|
|
17542
|
+
} from "@haoxin-web/excalidraw-common";
|
|
17543
17543
|
import {
|
|
17544
17544
|
normalizeRadians,
|
|
17545
17545
|
radiansBetweenAngles,
|
|
17546
17546
|
radiansDifference
|
|
17547
|
-
} from "haoxin-excalidraw-
|
|
17548
|
-
import { pointsEqual as pointsEqual6 } from "haoxin-excalidraw-
|
|
17547
|
+
} from "@haoxin-web/excalidraw-math";
|
|
17548
|
+
import { pointsEqual as pointsEqual6 } from "@haoxin-web/excalidraw-math";
|
|
17549
17549
|
|
|
17550
17550
|
// ../element/src/bounds.ts
|
|
17551
17551
|
var getDiamondPoints = (element) => {
|
|
@@ -17713,34 +17713,34 @@ import {
|
|
|
17713
17713
|
pointFromVector as pointFromVector5,
|
|
17714
17714
|
clamp as clamp4,
|
|
17715
17715
|
isCloseTo
|
|
17716
|
-
} from "haoxin-excalidraw-
|
|
17716
|
+
} from "@haoxin-web/excalidraw-math";
|
|
17717
17717
|
|
|
17718
17718
|
// ../element/src/frame.ts
|
|
17719
|
-
import { arrayToMap as arrayToMap19 } from "haoxin-excalidraw-
|
|
17720
|
-
import { isPointWithinBounds as isPointWithinBounds2, pointFrom as pointFrom17 } from "haoxin-excalidraw-
|
|
17719
|
+
import { arrayToMap as arrayToMap19 } from "@haoxin-web/excalidraw-common";
|
|
17720
|
+
import { isPointWithinBounds as isPointWithinBounds2, pointFrom as pointFrom17 } from "@haoxin-web/excalidraw-math";
|
|
17721
17721
|
|
|
17722
17722
|
// ../utils/src/bbox.ts
|
|
17723
17723
|
import {
|
|
17724
17724
|
vectorCross as vectorCross4,
|
|
17725
17725
|
vectorFromPoint as vectorFromPoint8
|
|
17726
|
-
} from "haoxin-excalidraw-
|
|
17726
|
+
} from "@haoxin-web/excalidraw-math";
|
|
17727
17727
|
|
|
17728
17728
|
// ../utils/src/withinBounds.ts
|
|
17729
|
-
import { arrayToMap as arrayToMap17 } from "haoxin-excalidraw-
|
|
17730
|
-
import { getElementBounds as getElementBounds2 } from "haoxin-excalidraw-
|
|
17729
|
+
import { arrayToMap as arrayToMap17 } from "@haoxin-web/excalidraw-common";
|
|
17730
|
+
import { getElementBounds as getElementBounds2 } from "@haoxin-web/excalidraw-element";
|
|
17731
17731
|
import {
|
|
17732
17732
|
isArrowElement as isArrowElement7,
|
|
17733
17733
|
isExcalidrawElement as isExcalidrawElement2,
|
|
17734
17734
|
isFreeDrawElement as isFreeDrawElement3,
|
|
17735
17735
|
isLinearElement as isLinearElement8,
|
|
17736
17736
|
isTextElement as isTextElement8
|
|
17737
|
-
} from "haoxin-excalidraw-
|
|
17737
|
+
} from "@haoxin-web/excalidraw-element";
|
|
17738
17738
|
import {
|
|
17739
17739
|
rangeIncludesValue,
|
|
17740
17740
|
pointFrom as pointFrom16,
|
|
17741
17741
|
pointRotateRads as pointRotateRads11,
|
|
17742
17742
|
rangeInclusive
|
|
17743
|
-
} from "haoxin-excalidraw-
|
|
17743
|
+
} from "@haoxin-web/excalidraw-math";
|
|
17744
17744
|
var getNonLinearElementRelativePoints = (element) => {
|
|
17745
17745
|
if (element.type === "diamond") {
|
|
17746
17746
|
return [
|
|
@@ -17866,7 +17866,7 @@ var elementsOverlappingBBox = ({
|
|
|
17866
17866
|
};
|
|
17867
17867
|
|
|
17868
17868
|
// ../element/src/selection.ts
|
|
17869
|
-
import { arrayToMap as arrayToMap18, isShallowEqual as isShallowEqual2 } from "haoxin-excalidraw-
|
|
17869
|
+
import { arrayToMap as arrayToMap18, isShallowEqual as isShallowEqual2 } from "@haoxin-web/excalidraw-common";
|
|
17870
17870
|
|
|
17871
17871
|
// ../element/src/groups.ts
|
|
17872
17872
|
var selectGroupsForSelectedElements4 = function() {
|
|
@@ -18856,8 +18856,8 @@ import {
|
|
|
18856
18856
|
CANVAS_SEARCH_TAB,
|
|
18857
18857
|
CLASSES as CLASSES3,
|
|
18858
18858
|
DEFAULT_SIDEBAR as DEFAULT_SIDEBAR3
|
|
18859
|
-
} from "haoxin-excalidraw-
|
|
18860
|
-
import { CaptureUpdateAction as CaptureUpdateAction29 } from "haoxin-excalidraw-
|
|
18859
|
+
} from "@haoxin-web/excalidraw-common";
|
|
18860
|
+
import { CaptureUpdateAction as CaptureUpdateAction29 } from "@haoxin-web/excalidraw-element";
|
|
18861
18861
|
var actionToggleSearchMenu = register({
|
|
18862
18862
|
name: "searchMenu",
|
|
18863
18863
|
icon: searchIcon,
|
|
@@ -18898,8 +18898,8 @@ var actionToggleSearchMenu = register({
|
|
|
18898
18898
|
});
|
|
18899
18899
|
|
|
18900
18900
|
// actions/actionCropEditor.tsx
|
|
18901
|
-
import { isImageElement as isImageElement3 } from "haoxin-excalidraw-
|
|
18902
|
-
import { CaptureUpdateAction as CaptureUpdateAction30 } from "haoxin-excalidraw-
|
|
18901
|
+
import { isImageElement as isImageElement3 } from "@haoxin-web/excalidraw-element";
|
|
18902
|
+
import { CaptureUpdateAction as CaptureUpdateAction30 } from "@haoxin-web/excalidraw-element";
|
|
18903
18903
|
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
18904
18904
|
var actionToggleCropEditor = register({
|
|
18905
18905
|
name: "cropEditor",
|
|
@@ -18945,19 +18945,19 @@ var actionToggleCropEditor = register({
|
|
|
18945
18945
|
});
|
|
18946
18946
|
|
|
18947
18947
|
// actions/actionFrame.ts
|
|
18948
|
-
import { getNonDeletedElements as getNonDeletedElements13 } from "haoxin-excalidraw-
|
|
18949
|
-
import { mutateElement as mutateElement4 } from "haoxin-excalidraw-
|
|
18950
|
-
import { newFrameElement } from "haoxin-excalidraw-
|
|
18951
|
-
import { isFrameLikeElement as isFrameLikeElement8 } from "haoxin-excalidraw-
|
|
18948
|
+
import { getNonDeletedElements as getNonDeletedElements13 } from "@haoxin-web/excalidraw-element";
|
|
18949
|
+
import { mutateElement as mutateElement4 } from "@haoxin-web/excalidraw-element";
|
|
18950
|
+
import { newFrameElement } from "@haoxin-web/excalidraw-element";
|
|
18951
|
+
import { isFrameLikeElement as isFrameLikeElement8 } from "@haoxin-web/excalidraw-element";
|
|
18952
18952
|
import {
|
|
18953
18953
|
addElementsToFrame,
|
|
18954
18954
|
removeAllElementsFromFrame
|
|
18955
|
-
} from "haoxin-excalidraw-
|
|
18956
|
-
import { getFrameChildren as getFrameChildren3 } from "haoxin-excalidraw-
|
|
18957
|
-
import { KEYS as KEYS39, updateActiveTool as updateActiveTool6 } from "haoxin-excalidraw-
|
|
18958
|
-
import { getElementsInGroup as getElementsInGroup4 } from "haoxin-excalidraw-
|
|
18959
|
-
import { getCommonBounds as getCommonBounds3 } from "haoxin-excalidraw-
|
|
18960
|
-
import { CaptureUpdateAction as CaptureUpdateAction31 } from "haoxin-excalidraw-
|
|
18955
|
+
} from "@haoxin-web/excalidraw-element";
|
|
18956
|
+
import { getFrameChildren as getFrameChildren3 } from "@haoxin-web/excalidraw-element";
|
|
18957
|
+
import { KEYS as KEYS39, updateActiveTool as updateActiveTool6 } from "@haoxin-web/excalidraw-common";
|
|
18958
|
+
import { getElementsInGroup as getElementsInGroup4 } from "@haoxin-web/excalidraw-element";
|
|
18959
|
+
import { getCommonBounds as getCommonBounds3 } from "@haoxin-web/excalidraw-element";
|
|
18960
|
+
import { CaptureUpdateAction as CaptureUpdateAction31 } from "@haoxin-web/excalidraw-element";
|
|
18961
18961
|
var isSingleFrameSelected = (appState, app) => {
|
|
18962
18962
|
const selectedElements = app.scene.getSelectedElements(appState);
|
|
18963
18963
|
return selectedElements.length === 1 && isFrameLikeElement8(selectedElements[0]);
|
|
@@ -19114,17 +19114,17 @@ var actionWrapSelectionInFrame = register({
|
|
|
19114
19114
|
});
|
|
19115
19115
|
|
|
19116
19116
|
// actions/actionHistory.tsx
|
|
19117
|
-
import { isWindows, KEYS as KEYS40, matchKey, arrayToMap as arrayToMap21 } from "haoxin-excalidraw-
|
|
19118
|
-
import { CaptureUpdateAction as CaptureUpdateAction33 } from "haoxin-excalidraw-
|
|
19119
|
-
import { orderByFractionalIndex } from "haoxin-excalidraw-
|
|
19117
|
+
import { isWindows, KEYS as KEYS40, matchKey, arrayToMap as arrayToMap21 } from "@haoxin-web/excalidraw-common";
|
|
19118
|
+
import { CaptureUpdateAction as CaptureUpdateAction33 } from "@haoxin-web/excalidraw-element";
|
|
19119
|
+
import { orderByFractionalIndex } from "@haoxin-web/excalidraw-element";
|
|
19120
19120
|
|
|
19121
19121
|
// history.ts
|
|
19122
|
-
import { Emitter as Emitter2 } from "haoxin-excalidraw-
|
|
19122
|
+
import { Emitter as Emitter2 } from "@haoxin-web/excalidraw-common";
|
|
19123
19123
|
import {
|
|
19124
19124
|
CaptureUpdateAction as CaptureUpdateAction32,
|
|
19125
19125
|
StoreChange,
|
|
19126
19126
|
StoreDelta
|
|
19127
|
-
} from "haoxin-excalidraw-
|
|
19127
|
+
} from "@haoxin-web/excalidraw-element";
|
|
19128
19128
|
var HistoryDelta = class extends StoreDelta {
|
|
19129
19129
|
/**
|
|
19130
19130
|
* Apply the delta to the passed elements and appState, does not modify the snapshot.
|
|
@@ -19400,11 +19400,11 @@ var createRedoAction = (history) => ({
|
|
|
19400
19400
|
});
|
|
19401
19401
|
|
|
19402
19402
|
// actions/actionTextAutoResize.ts
|
|
19403
|
-
import { getFontString as getFontString6 } from "haoxin-excalidraw-
|
|
19404
|
-
import { newElementWith as newElementWith10 } from "haoxin-excalidraw-
|
|
19405
|
-
import { measureText as measureText4 } from "haoxin-excalidraw-
|
|
19406
|
-
import { isTextElement as isTextElement9 } from "haoxin-excalidraw-
|
|
19407
|
-
import { CaptureUpdateAction as CaptureUpdateAction34 } from "haoxin-excalidraw-
|
|
19403
|
+
import { getFontString as getFontString6 } from "@haoxin-web/excalidraw-common";
|
|
19404
|
+
import { newElementWith as newElementWith10 } from "@haoxin-web/excalidraw-element";
|
|
19405
|
+
import { measureText as measureText4 } from "@haoxin-web/excalidraw-element";
|
|
19406
|
+
import { isTextElement as isTextElement9 } from "@haoxin-web/excalidraw-element";
|
|
19407
|
+
import { CaptureUpdateAction as CaptureUpdateAction34 } from "@haoxin-web/excalidraw-element";
|
|
19408
19408
|
var actionTextAutoResize = register({
|
|
19409
19409
|
name: "autoResize",
|
|
19410
19410
|
label: "labels.autoResize",
|
|
@@ -19440,8 +19440,8 @@ var actionTextAutoResize = register({
|
|
|
19440
19440
|
});
|
|
19441
19441
|
|
|
19442
19442
|
// actions/actionToggleViewMode.tsx
|
|
19443
|
-
import { CODES as CODES11, KEYS as KEYS41 } from "haoxin-excalidraw-
|
|
19444
|
-
import { CaptureUpdateAction as CaptureUpdateAction35 } from "haoxin-excalidraw-
|
|
19443
|
+
import { CODES as CODES11, KEYS as KEYS41 } from "@haoxin-web/excalidraw-common";
|
|
19444
|
+
import { CaptureUpdateAction as CaptureUpdateAction35 } from "@haoxin-web/excalidraw-element";
|
|
19445
19445
|
var actionToggleViewMode = register({
|
|
19446
19446
|
name: "viewMode",
|
|
19447
19447
|
label: "labels.viewMode",
|
|
@@ -19468,7 +19468,7 @@ var actionToggleViewMode = register({
|
|
|
19468
19468
|
});
|
|
19469
19469
|
|
|
19470
19470
|
// actions/manager.tsx
|
|
19471
|
-
import { isPromiseLike as isPromiseLike3 } from "haoxin-excalidraw-
|
|
19471
|
+
import { isPromiseLike as isPromiseLike3 } from "@haoxin-web/excalidraw-common";
|
|
19472
19472
|
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
19473
19473
|
var trackAction = (action, source, appState, elements, app, value) => {
|
|
19474
19474
|
if (action.trackEvent) {
|
|
@@ -19665,19 +19665,19 @@ import {
|
|
|
19665
19665
|
rangeInclusive as rangeInclusive2,
|
|
19666
19666
|
rangeIntersection,
|
|
19667
19667
|
rangesOverlap
|
|
19668
|
-
} from "haoxin-excalidraw-
|
|
19669
|
-
import { TOOL_TYPE, KEYS as KEYS42 } from "haoxin-excalidraw-
|
|
19668
|
+
} from "@haoxin-web/excalidraw-math";
|
|
19669
|
+
import { TOOL_TYPE, KEYS as KEYS42 } from "@haoxin-web/excalidraw-common";
|
|
19670
19670
|
import {
|
|
19671
19671
|
getCommonBounds as getCommonBounds4,
|
|
19672
19672
|
getDraggedElementsBounds,
|
|
19673
19673
|
getElementAbsoluteCoords as getElementAbsoluteCoords5
|
|
19674
|
-
} from "haoxin-excalidraw-
|
|
19675
|
-
import { isBoundToContainer as isBoundToContainer5 } from "haoxin-excalidraw-
|
|
19676
|
-
import { getMaximumGroups } from "haoxin-excalidraw-
|
|
19674
|
+
} from "@haoxin-web/excalidraw-element";
|
|
19675
|
+
import { isBoundToContainer as isBoundToContainer5 } from "@haoxin-web/excalidraw-element";
|
|
19676
|
+
import { getMaximumGroups } from "@haoxin-web/excalidraw-element";
|
|
19677
19677
|
import {
|
|
19678
19678
|
getSelectedElements as getSelectedElements4,
|
|
19679
19679
|
getVisibleAndNonSelectedElements
|
|
19680
|
-
} from "haoxin-excalidraw-
|
|
19680
|
+
} from "@haoxin-web/excalidraw-element";
|
|
19681
19681
|
var SNAP_DISTANCE = 8;
|
|
19682
19682
|
var VISIBLE_GAPS_LIMIT_PER_AXIS = 99999;
|
|
19683
19683
|
var getSnapDistance = (zoomValue) => {
|
|
@@ -20635,7 +20635,7 @@ var isActiveToolNonLinearSnappable = (activeToolType) => {
|
|
|
20635
20635
|
};
|
|
20636
20636
|
|
|
20637
20637
|
// data/transform.ts
|
|
20638
|
-
import { pointFrom as pointFrom20 } from "haoxin-excalidraw-
|
|
20638
|
+
import { pointFrom as pointFrom20 } from "@haoxin-web/excalidraw-math";
|
|
20639
20639
|
import {
|
|
20640
20640
|
DEFAULT_FONT_FAMILY as DEFAULT_FONT_FAMILY5,
|
|
20641
20641
|
DEFAULT_FONT_SIZE as DEFAULT_FONT_SIZE6,
|
|
@@ -20650,8 +20650,8 @@ import {
|
|
|
20650
20650
|
isDevEnv as isDevEnv8,
|
|
20651
20651
|
toBrandedType,
|
|
20652
20652
|
getLineHeight as getLineHeight3
|
|
20653
|
-
} from "haoxin-excalidraw-
|
|
20654
|
-
import { bindLinearElement as bindLinearElement2 } from "haoxin-excalidraw-
|
|
20653
|
+
} from "@haoxin-web/excalidraw-common";
|
|
20654
|
+
import { bindLinearElement as bindLinearElement2 } from "@haoxin-web/excalidraw-element";
|
|
20655
20655
|
import {
|
|
20656
20656
|
newArrowElement as newArrowElement2,
|
|
20657
20657
|
newElement as newElement4,
|
|
@@ -20660,14 +20660,14 @@ import {
|
|
|
20660
20660
|
newLinearElement as newLinearElement3,
|
|
20661
20661
|
newMagicFrameElement,
|
|
20662
20662
|
newTextElement as newTextElement2
|
|
20663
|
-
} from "haoxin-excalidraw-
|
|
20664
|
-
import { measureText as measureText5, normalizeText } from "haoxin-excalidraw-
|
|
20665
|
-
import { isArrowElement as isArrowElement8 } from "haoxin-excalidraw-
|
|
20666
|
-
import { syncInvalidIndices } from "haoxin-excalidraw-
|
|
20667
|
-
import { redrawTextBoundingBox as redrawTextBoundingBox5 } from "haoxin-excalidraw-
|
|
20668
|
-
import { LinearElementEditor as LinearElementEditor8 } from "haoxin-excalidraw-
|
|
20669
|
-
import { getCommonBounds as getCommonBounds5 } from "haoxin-excalidraw-
|
|
20670
|
-
import { Scene } from "haoxin-excalidraw-
|
|
20663
|
+
} from "@haoxin-web/excalidraw-element";
|
|
20664
|
+
import { measureText as measureText5, normalizeText } from "@haoxin-web/excalidraw-element";
|
|
20665
|
+
import { isArrowElement as isArrowElement8 } from "@haoxin-web/excalidraw-element";
|
|
20666
|
+
import { syncInvalidIndices } from "@haoxin-web/excalidraw-element";
|
|
20667
|
+
import { redrawTextBoundingBox as redrawTextBoundingBox5 } from "@haoxin-web/excalidraw-element";
|
|
20668
|
+
import { LinearElementEditor as LinearElementEditor8 } from "@haoxin-web/excalidraw-element";
|
|
20669
|
+
import { getCommonBounds as getCommonBounds5 } from "@haoxin-web/excalidraw-element";
|
|
20670
|
+
import { Scene } from "@haoxin-web/excalidraw-element";
|
|
20671
20671
|
var DEFAULT_LINEAR_ELEMENT_PROPS = {
|
|
20672
20672
|
width: 100,
|
|
20673
20673
|
height: 0
|
|
@@ -21170,14 +21170,14 @@ var convertToExcalidrawElements = (elementsSkeleton, opts) => {
|
|
|
21170
21170
|
};
|
|
21171
21171
|
|
|
21172
21172
|
// scene/Renderer.ts
|
|
21173
|
-
import { isElementInViewport as isElementInViewport2 } from "haoxin-excalidraw-
|
|
21174
|
-
import { memoize, toBrandedType as toBrandedType2 } from "haoxin-excalidraw-
|
|
21173
|
+
import { isElementInViewport as isElementInViewport2 } from "@haoxin-web/excalidraw-element";
|
|
21174
|
+
import { memoize, toBrandedType as toBrandedType2 } from "@haoxin-web/excalidraw-common";
|
|
21175
21175
|
|
|
21176
21176
|
// renderer/interactiveScene.ts
|
|
21177
21177
|
import {
|
|
21178
21178
|
pointFrom as pointFrom22,
|
|
21179
21179
|
pointsEqual as pointsEqual8
|
|
21180
|
-
} from "haoxin-excalidraw-
|
|
21180
|
+
} from "@haoxin-web/excalidraw-math";
|
|
21181
21181
|
import oc2 from "open-color";
|
|
21182
21182
|
import {
|
|
21183
21183
|
arrayToMap as arrayToMap23,
|
|
@@ -21186,15 +21186,15 @@ import {
|
|
|
21186
21186
|
invariant as invariant9,
|
|
21187
21187
|
THEME as THEME11,
|
|
21188
21188
|
throttleRAF
|
|
21189
|
-
} from "haoxin-excalidraw-
|
|
21190
|
-
import { FIXED_BINDING_DISTANCE as FIXED_BINDING_DISTANCE2, maxBindingGap } from "haoxin-excalidraw-
|
|
21191
|
-
import { LinearElementEditor as LinearElementEditor9 } from "haoxin-excalidraw-
|
|
21189
|
+
} from "@haoxin-web/excalidraw-common";
|
|
21190
|
+
import { FIXED_BINDING_DISTANCE as FIXED_BINDING_DISTANCE2, maxBindingGap } from "@haoxin-web/excalidraw-element";
|
|
21191
|
+
import { LinearElementEditor as LinearElementEditor9 } from "@haoxin-web/excalidraw-element";
|
|
21192
21192
|
import {
|
|
21193
21193
|
getOmitSidesForDevice,
|
|
21194
21194
|
getTransformHandles,
|
|
21195
21195
|
getTransformHandlesFromCoords,
|
|
21196
21196
|
shouldShowBoundingBox
|
|
21197
|
-
} from "haoxin-excalidraw-
|
|
21197
|
+
} from "@haoxin-web/excalidraw-element";
|
|
21198
21198
|
import {
|
|
21199
21199
|
isElbowArrow as isElbowArrow8,
|
|
21200
21200
|
isFrameLikeElement as isFrameLikeElement9,
|
|
@@ -21202,19 +21202,19 @@ import {
|
|
|
21202
21202
|
isLinearElement as isLinearElement10,
|
|
21203
21203
|
isLineElement as isLineElement5,
|
|
21204
21204
|
isTextElement as isTextElement10
|
|
21205
|
-
} from "haoxin-excalidraw-
|
|
21206
|
-
import { renderSelectionElement } from "haoxin-excalidraw-
|
|
21205
|
+
} from "@haoxin-web/excalidraw-element";
|
|
21206
|
+
import { renderSelectionElement } from "@haoxin-web/excalidraw-element";
|
|
21207
21207
|
import {
|
|
21208
21208
|
getElementsInGroup as getElementsInGroup5,
|
|
21209
21209
|
getSelectedGroupIds as getSelectedGroupIds2,
|
|
21210
21210
|
isSelectedViaGroup,
|
|
21211
21211
|
selectGroupsFromGivenElements as selectGroupsFromGivenElements3
|
|
21212
|
-
} from "haoxin-excalidraw-
|
|
21213
|
-
import { getCommonBounds as getCommonBounds7, getElementAbsoluteCoords as getElementAbsoluteCoords6 } from "haoxin-excalidraw-
|
|
21212
|
+
} from "@haoxin-web/excalidraw-element";
|
|
21213
|
+
import { getCommonBounds as getCommonBounds7, getElementAbsoluteCoords as getElementAbsoluteCoords6 } from "@haoxin-web/excalidraw-element";
|
|
21214
21214
|
|
|
21215
21215
|
// renderer/renderSnaps.ts
|
|
21216
|
-
import { pointFrom as pointFrom21 } from "haoxin-excalidraw-
|
|
21217
|
-
import { THEME as THEME10 } from "haoxin-excalidraw-
|
|
21216
|
+
import { pointFrom as pointFrom21 } from "@haoxin-web/excalidraw-math";
|
|
21217
|
+
import { THEME as THEME10 } from "@haoxin-web/excalidraw-common";
|
|
21218
21218
|
var SNAP_COLOR_LIGHT = "#ff6b6b";
|
|
21219
21219
|
var SNAP_COLOR_DARK = "#ff0000";
|
|
21220
21220
|
var SNAP_WIDTH = 1;
|
|
@@ -21345,8 +21345,8 @@ var drawGapLine = (from, to, direction, appState, context) => {
|
|
|
21345
21345
|
};
|
|
21346
21346
|
|
|
21347
21347
|
// scene/scrollbars.ts
|
|
21348
|
-
import { getGlobalCSSVariable } from "haoxin-excalidraw-
|
|
21349
|
-
import { getCommonBounds as getCommonBounds6 } from "haoxin-excalidraw-
|
|
21348
|
+
import { getGlobalCSSVariable } from "@haoxin-web/excalidraw-common";
|
|
21349
|
+
import { getCommonBounds as getCommonBounds6 } from "@haoxin-web/excalidraw-element";
|
|
21350
21350
|
var SCROLLBAR_MARGIN = 4;
|
|
21351
21351
|
var SCROLLBAR_WIDTH = 6;
|
|
21352
21352
|
var SCROLLBAR_COLOR = "rgba(0,0,0,0.3)";
|
|
@@ -22319,8 +22319,8 @@ var Renderer = class {
|
|
|
22319
22319
|
};
|
|
22320
22320
|
|
|
22321
22321
|
// components/ElementCanvasButtons.tsx
|
|
22322
|
-
import { sceneCoordsToViewportCoords as sceneCoordsToViewportCoords3 } from "haoxin-excalidraw-
|
|
22323
|
-
import { getElementAbsoluteCoords as getElementAbsoluteCoords7 } from "haoxin-excalidraw-
|
|
22322
|
+
import { sceneCoordsToViewportCoords as sceneCoordsToViewportCoords3 } from "@haoxin-web/excalidraw-common";
|
|
22323
|
+
import { getElementAbsoluteCoords as getElementAbsoluteCoords7 } from "@haoxin-web/excalidraw-element";
|
|
22324
22324
|
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
22325
22325
|
var CONTAINER_PADDING = 5;
|
|
22326
22326
|
var getContainerCoords2 = (element, appState, elementsMap) => {
|
|
@@ -22359,7 +22359,7 @@ var ElementCanvasButtons = ({
|
|
|
22359
22359
|
};
|
|
22360
22360
|
|
|
22361
22361
|
// laser-trails.ts
|
|
22362
|
-
import { DEFAULT_LASER_COLOR, easeOut } from "haoxin-excalidraw-
|
|
22362
|
+
import { DEFAULT_LASER_COLOR, easeOut } from "@haoxin-web/excalidraw-common";
|
|
22363
22363
|
|
|
22364
22364
|
// animated-trail.ts
|
|
22365
22365
|
import { LaserPointer } from "@excalidraw/laser-pointer";
|
|
@@ -22367,7 +22367,7 @@ import {
|
|
|
22367
22367
|
SVG_NS,
|
|
22368
22368
|
getSvgPathFromStroke as getSvgPathFromStroke2,
|
|
22369
22369
|
sceneCoordsToViewportCoords as sceneCoordsToViewportCoords4
|
|
22370
|
-
} from "haoxin-excalidraw-
|
|
22370
|
+
} from "@haoxin-web/excalidraw-common";
|
|
22371
22371
|
var AnimatedTrail = class {
|
|
22372
22372
|
constructor(animationFrameHandler, app, options) {
|
|
22373
22373
|
this.animationFrameHandler = animationFrameHandler;
|
|
@@ -22594,7 +22594,7 @@ var LaserTrails = class {
|
|
|
22594
22594
|
// reactUtils.ts
|
|
22595
22595
|
import { version as ReactVersion } from "react";
|
|
22596
22596
|
import { unstable_batchedUpdates } from "react-dom";
|
|
22597
|
-
import { throttleRAF as throttleRAF2 } from "haoxin-excalidraw-
|
|
22597
|
+
import { throttleRAF as throttleRAF2 } from "@haoxin-web/excalidraw-common";
|
|
22598
22598
|
var withBatchedUpdates = (func) => (event) => {
|
|
22599
22599
|
unstable_batchedUpdates(func, event);
|
|
22600
22600
|
};
|
|
@@ -22640,13 +22640,13 @@ import {
|
|
|
22640
22640
|
getFontFamilyString as getFontFamilyString3,
|
|
22641
22641
|
isTestEnv as isTestEnv5,
|
|
22642
22642
|
MIME_TYPES as MIME_TYPES8
|
|
22643
|
-
} from "haoxin-excalidraw-
|
|
22643
|
+
} from "@haoxin-web/excalidraw-common";
|
|
22644
22644
|
import {
|
|
22645
22645
|
originalContainerCache,
|
|
22646
22646
|
updateOriginalContainerCache as updateOriginalContainerCache3
|
|
22647
|
-
} from "haoxin-excalidraw-
|
|
22648
|
-
import { LinearElementEditor as LinearElementEditor10 } from "haoxin-excalidraw-
|
|
22649
|
-
import { bumpVersion as bumpVersion2 } from "haoxin-excalidraw-
|
|
22647
|
+
} from "@haoxin-web/excalidraw-element";
|
|
22648
|
+
import { LinearElementEditor as LinearElementEditor10 } from "@haoxin-web/excalidraw-element";
|
|
22649
|
+
import { bumpVersion as bumpVersion2 } from "@haoxin-web/excalidraw-element";
|
|
22650
22650
|
import {
|
|
22651
22651
|
getBoundTextElementId,
|
|
22652
22652
|
getContainerElement as getContainerElement3,
|
|
@@ -22657,15 +22657,15 @@ import {
|
|
|
22657
22657
|
computeContainerDimensionForBoundText as computeContainerDimensionForBoundText2,
|
|
22658
22658
|
computeBoundTextPosition as computeBoundTextPosition2,
|
|
22659
22659
|
getBoundTextElement as getBoundTextElement6
|
|
22660
|
-
} from "haoxin-excalidraw-
|
|
22661
|
-
import { getTextWidth } from "haoxin-excalidraw-
|
|
22662
|
-
import { normalizeText as normalizeText2 } from "haoxin-excalidraw-
|
|
22663
|
-
import { wrapText as wrapText3 } from "haoxin-excalidraw-
|
|
22660
|
+
} from "@haoxin-web/excalidraw-element";
|
|
22661
|
+
import { getTextWidth } from "@haoxin-web/excalidraw-element";
|
|
22662
|
+
import { normalizeText as normalizeText2 } from "@haoxin-web/excalidraw-element";
|
|
22663
|
+
import { wrapText as wrapText3 } from "@haoxin-web/excalidraw-element";
|
|
22664
22664
|
import {
|
|
22665
22665
|
isArrowElement as isArrowElement9,
|
|
22666
22666
|
isBoundToContainer as isBoundToContainer6,
|
|
22667
22667
|
isTextElement as isTextElement11
|
|
22668
|
-
} from "haoxin-excalidraw-
|
|
22668
|
+
} from "@haoxin-web/excalidraw-element";
|
|
22669
22669
|
var getTransform = (width, height, angle, appState, maxWidth, maxHeight) => {
|
|
22670
22670
|
const { zoom } = appState;
|
|
22671
22671
|
const degree = 180 * angle / Math.PI;
|
|
@@ -23217,18 +23217,18 @@ var isMaybeMermaidDefinition = (text) => {
|
|
|
23217
23217
|
// lasso/index.ts
|
|
23218
23218
|
import {
|
|
23219
23219
|
pointFrom as pointFrom23
|
|
23220
|
-
} from "haoxin-excalidraw-
|
|
23221
|
-
import { getElementLineSegments as getElementLineSegments2 } from "haoxin-excalidraw-
|
|
23222
|
-
import { LinearElementEditor as LinearElementEditor11 } from "haoxin-excalidraw-
|
|
23220
|
+
} from "@haoxin-web/excalidraw-math";
|
|
23221
|
+
import { getElementLineSegments as getElementLineSegments2 } from "@haoxin-web/excalidraw-element";
|
|
23222
|
+
import { LinearElementEditor as LinearElementEditor11 } from "@haoxin-web/excalidraw-element";
|
|
23223
23223
|
import {
|
|
23224
23224
|
isFrameLikeElement as isFrameLikeElement10,
|
|
23225
23225
|
isLinearElement as isLinearElement11,
|
|
23226
23226
|
isTextElement as isTextElement12
|
|
23227
|
-
} from "haoxin-excalidraw-
|
|
23228
|
-
import { getFrameChildren as getFrameChildren4 } from "haoxin-excalidraw-
|
|
23229
|
-
import { selectGroupsForSelectedElements as selectGroupsForSelectedElements5 } from "haoxin-excalidraw-
|
|
23230
|
-
import { getContainerElement as getContainerElement4 } from "haoxin-excalidraw-
|
|
23231
|
-
import { arrayToMap as arrayToMap24, easeOut as easeOut2, isShallowEqual as isShallowEqual3 } from "haoxin-excalidraw-
|
|
23227
|
+
} from "@haoxin-web/excalidraw-element";
|
|
23228
|
+
import { getFrameChildren as getFrameChildren4 } from "@haoxin-web/excalidraw-element";
|
|
23229
|
+
import { selectGroupsForSelectedElements as selectGroupsForSelectedElements5 } from "@haoxin-web/excalidraw-element";
|
|
23230
|
+
import { getContainerElement as getContainerElement4 } from "@haoxin-web/excalidraw-element";
|
|
23231
|
+
import { arrayToMap as arrayToMap24, easeOut as easeOut2, isShallowEqual as isShallowEqual3 } from "@haoxin-web/excalidraw-common";
|
|
23232
23232
|
|
|
23233
23233
|
// lasso/utils.ts
|
|
23234
23234
|
import { simplify as simplify2 } from "points-on-curve";
|
|
@@ -23236,14 +23236,14 @@ import {
|
|
|
23236
23236
|
polygonFromPoints as polygonFromPoints2,
|
|
23237
23237
|
lineSegment as lineSegment6,
|
|
23238
23238
|
polygonIncludesPointNonZero
|
|
23239
|
-
} from "haoxin-excalidraw-
|
|
23239
|
+
} from "@haoxin-web/excalidraw-math";
|
|
23240
23240
|
import {
|
|
23241
23241
|
computeBoundTextPosition as computeBoundTextPosition3,
|
|
23242
23242
|
doBoundsIntersect as doBoundsIntersect2,
|
|
23243
23243
|
getBoundTextElement as getBoundTextElement7,
|
|
23244
23244
|
getElementBounds as getElementBounds3,
|
|
23245
23245
|
intersectElementWithLineSegment as intersectElementWithLineSegment2
|
|
23246
|
-
} from "haoxin-excalidraw-
|
|
23246
|
+
} from "@haoxin-web/excalidraw-element";
|
|
23247
23247
|
var getLassoSelectedElementIds = (input) => {
|
|
23248
23248
|
const {
|
|
23249
23249
|
lassoPath,
|
|
@@ -23468,18 +23468,18 @@ var LassoTrail = class extends AnimatedTrail {
|
|
|
23468
23468
|
};
|
|
23469
23469
|
|
|
23470
23470
|
// eraser/index.ts
|
|
23471
|
-
import { arrayToMap as arrayToMap25, easeOut as easeOut3, THEME as THEME12 } from "haoxin-excalidraw-
|
|
23471
|
+
import { arrayToMap as arrayToMap25, easeOut as easeOut3, THEME as THEME12 } from "@haoxin-web/excalidraw-common";
|
|
23472
23472
|
import {
|
|
23473
23473
|
computeBoundTextPosition as computeBoundTextPosition4,
|
|
23474
23474
|
getBoundTextElement as getBoundTextElement8,
|
|
23475
23475
|
intersectElementWithLineSegment as intersectElementWithLineSegment3,
|
|
23476
23476
|
isPointInElement
|
|
23477
|
-
} from "haoxin-excalidraw-
|
|
23478
|
-
import { lineSegment as lineSegment7, pointFrom as pointFrom24 } from "haoxin-excalidraw-
|
|
23479
|
-
import { getElementsInGroup as getElementsInGroup6 } from "haoxin-excalidraw-
|
|
23480
|
-
import { shouldTestInside as shouldTestInside2 } from "haoxin-excalidraw-
|
|
23481
|
-
import { hasBoundTextElement as hasBoundTextElement6, isBoundToContainer as isBoundToContainer7 } from "haoxin-excalidraw-
|
|
23482
|
-
import { getBoundTextElementId as getBoundTextElementId2 } from "haoxin-excalidraw-
|
|
23477
|
+
} from "@haoxin-web/excalidraw-element";
|
|
23478
|
+
import { lineSegment as lineSegment7, pointFrom as pointFrom24 } from "@haoxin-web/excalidraw-math";
|
|
23479
|
+
import { getElementsInGroup as getElementsInGroup6 } from "@haoxin-web/excalidraw-element";
|
|
23480
|
+
import { shouldTestInside as shouldTestInside2 } from "@haoxin-web/excalidraw-element";
|
|
23481
|
+
import { hasBoundTextElement as hasBoundTextElement6, isBoundToContainer as isBoundToContainer7 } from "@haoxin-web/excalidraw-element";
|
|
23482
|
+
import { getBoundTextElementId as getBoundTextElementId2 } from "@haoxin-web/excalidraw-element";
|
|
23483
23483
|
var EraserTrail = class extends AnimatedTrail {
|
|
23484
23484
|
constructor(animationFrameHandler, app) {
|
|
23485
23485
|
super(animationFrameHandler, app, {
|
|
@@ -23659,7 +23659,7 @@ import React29 from "react";
|
|
|
23659
23659
|
// components/Popover.tsx
|
|
23660
23660
|
import { useLayoutEffect as useLayoutEffect4, useRef as useRef24, useEffect as useEffect29 } from "react";
|
|
23661
23661
|
import { unstable_batchedUpdates as unstable_batchedUpdates2 } from "react-dom";
|
|
23662
|
-
import { KEYS as KEYS44, queryFocusableElements as queryFocusableElements2 } from "haoxin-excalidraw-
|
|
23662
|
+
import { KEYS as KEYS44, queryFocusableElements as queryFocusableElements2 } from "@haoxin-web/excalidraw-common";
|
|
23663
23663
|
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
23664
23664
|
var Popover6 = ({
|
|
23665
23665
|
children,
|
|
@@ -23912,12 +23912,12 @@ import {
|
|
|
23912
23912
|
arrayToMap as arrayToMap26,
|
|
23913
23913
|
capitalizeString as capitalizeString3,
|
|
23914
23914
|
isShallowEqual as isShallowEqual5
|
|
23915
|
-
} from "haoxin-excalidraw-
|
|
23916
|
-
import { mutateElement as mutateElement5 } from "haoxin-excalidraw-
|
|
23917
|
-
import { ShapeCache as ShapeCache3 } from "haoxin-excalidraw-
|
|
23915
|
+
} from "@haoxin-web/excalidraw-common";
|
|
23916
|
+
import { mutateElement as mutateElement5 } from "@haoxin-web/excalidraw-element";
|
|
23917
|
+
import { ShapeCache as ShapeCache3 } from "@haoxin-web/excalidraw-element";
|
|
23918
23918
|
|
|
23919
23919
|
// components/LeftMainToolbar.tsx
|
|
23920
|
-
import { TOOL_TYPE as TOOL_TYPE2 } from "haoxin-excalidraw-
|
|
23920
|
+
import { TOOL_TYPE as TOOL_TYPE2 } from "@haoxin-web/excalidraw-common";
|
|
23921
23921
|
import { jsx as jsx83, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
23922
23922
|
var LeftMainToolbar = ({
|
|
23923
23923
|
appState,
|
|
@@ -24074,7 +24074,7 @@ var LeftMainToolbar_default = LeftMainToolbar;
|
|
|
24074
24074
|
// components/LoadingMessage.tsx
|
|
24075
24075
|
import clsx34 from "clsx";
|
|
24076
24076
|
import { useState as useState24, useEffect as useEffect30 } from "react";
|
|
24077
|
-
import { THEME as THEME13 } from "haoxin-excalidraw-
|
|
24077
|
+
import { THEME as THEME13 } from "@haoxin-web/excalidraw-common";
|
|
24078
24078
|
import { jsx as jsx84, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
24079
24079
|
var LoadingMessage = ({
|
|
24080
24080
|
delay,
|
|
@@ -24109,7 +24109,7 @@ var LoadingMessage = ({
|
|
|
24109
24109
|
|
|
24110
24110
|
// components/MobileMenu.tsx
|
|
24111
24111
|
import { useEffect as useEffect31 } from "react";
|
|
24112
|
-
import { showSelectedShapeActions as showSelectedShapeActions2 } from "haoxin-excalidraw-
|
|
24112
|
+
import { showSelectedShapeActions as showSelectedShapeActions2 } from "@haoxin-web/excalidraw-element";
|
|
24113
24113
|
|
|
24114
24114
|
// components/FixedSideContainer.tsx
|
|
24115
24115
|
import clsx35 from "clsx";
|
|
@@ -24132,7 +24132,7 @@ var FixedSideContainer = ({
|
|
|
24132
24132
|
|
|
24133
24133
|
// components/HandButton.tsx
|
|
24134
24134
|
import clsx36 from "clsx";
|
|
24135
|
-
import { KEYS as KEYS45 } from "haoxin-excalidraw-
|
|
24135
|
+
import { KEYS as KEYS45 } from "@haoxin-web/excalidraw-common";
|
|
24136
24136
|
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
24137
24137
|
var HandButton = (props) => {
|
|
24138
24138
|
if (props.visible === false) {
|
|
@@ -24157,7 +24157,7 @@ var HandButton = (props) => {
|
|
|
24157
24157
|
};
|
|
24158
24158
|
|
|
24159
24159
|
// components/HintViewer.tsx
|
|
24160
|
-
import { CANVAS_SEARCH_TAB as CANVAS_SEARCH_TAB2, DEFAULT_SIDEBAR as DEFAULT_SIDEBAR4 } from "haoxin-excalidraw-
|
|
24160
|
+
import { CANVAS_SEARCH_TAB as CANVAS_SEARCH_TAB2, DEFAULT_SIDEBAR as DEFAULT_SIDEBAR4 } from "@haoxin-web/excalidraw-common";
|
|
24161
24161
|
import {
|
|
24162
24162
|
isFlowchartNodeElement,
|
|
24163
24163
|
isImageElement as isImageElement5,
|
|
@@ -24165,9 +24165,9 @@ import {
|
|
|
24165
24165
|
isLineElement as isLineElement6,
|
|
24166
24166
|
isTextBindableContainer as isTextBindableContainer2,
|
|
24167
24167
|
isTextElement as isTextElement13
|
|
24168
|
-
} from "haoxin-excalidraw-
|
|
24169
|
-
import { getShortcutKey as getShortcutKey12 } from "haoxin-excalidraw-
|
|
24170
|
-
import { isNodeInFlowchart } from "haoxin-excalidraw-
|
|
24168
|
+
} from "@haoxin-web/excalidraw-element";
|
|
24169
|
+
import { getShortcutKey as getShortcutKey12 } from "@haoxin-web/excalidraw-common";
|
|
24170
|
+
import { isNodeInFlowchart } from "@haoxin-web/excalidraw-element";
|
|
24171
24171
|
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
24172
24172
|
var getHints = ({
|
|
24173
24173
|
appState,
|
|
@@ -24645,7 +24645,7 @@ var PasteChartDialog = ({
|
|
|
24645
24645
|
import * as Popover7 from "@radix-ui/react-popover";
|
|
24646
24646
|
import clsx39 from "clsx";
|
|
24647
24647
|
import React32, { useLayoutEffect as useLayoutEffect6 } from "react";
|
|
24648
|
-
import { supportsResizeObserver, isShallowEqual as isShallowEqual4 } from "haoxin-excalidraw-
|
|
24648
|
+
import { supportsResizeObserver, isShallowEqual as isShallowEqual4 } from "@haoxin-web/excalidraw-common";
|
|
24649
24649
|
import { Fragment as Fragment14, jsx as jsx93, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
24650
24650
|
var DEFAULT_MAX_AVATARS = 4;
|
|
24651
24651
|
var SHOW_COLLABORATORS_FILTER_AT = 8;
|
|
@@ -24938,7 +24938,7 @@ import {
|
|
|
24938
24938
|
useImperativeHandle as useImperativeHandle3,
|
|
24939
24939
|
useCallback as useCallback11
|
|
24940
24940
|
} from "react";
|
|
24941
|
-
import { EVENT as EVENT10, isDevEnv as isDevEnv9, KEYS as KEYS46, updateObject } from "haoxin-excalidraw-
|
|
24941
|
+
import { EVENT as EVENT10, isDevEnv as isDevEnv9, KEYS as KEYS46, updateObject } from "@haoxin-web/excalidraw-common";
|
|
24942
24942
|
|
|
24943
24943
|
// components/Sidebar/SidebarHeader.tsx
|
|
24944
24944
|
import clsx41 from "clsx";
|
|
@@ -25234,7 +25234,7 @@ var Sidebar = Object.assign(
|
|
|
25234
25234
|
Sidebar.displayName = "Sidebar";
|
|
25235
25235
|
|
|
25236
25236
|
// components/main-menu/MainMenu.tsx
|
|
25237
|
-
import { composeEventHandlers as composeEventHandlers3 } from "haoxin-excalidraw-
|
|
25237
|
+
import { composeEventHandlers as composeEventHandlers3 } from "@haoxin-web/excalidraw-common";
|
|
25238
25238
|
|
|
25239
25239
|
// components/hoc/withInternalFallback.tsx
|
|
25240
25240
|
import { useLayoutEffect as useLayoutEffect8, useRef as useRef27 } from "react";
|
|
@@ -25306,7 +25306,7 @@ __export(DefaultItems_exports, {
|
|
|
25306
25306
|
ToggleTheme: () => ToggleTheme
|
|
25307
25307
|
});
|
|
25308
25308
|
import clsx45 from "clsx";
|
|
25309
|
-
import { THEME as THEME14 } from "haoxin-excalidraw-
|
|
25309
|
+
import { THEME as THEME14 } from "@haoxin-web/excalidraw-common";
|
|
25310
25310
|
|
|
25311
25311
|
// components/OverwriteConfirm/OverwriteConfirmState.ts
|
|
25312
25312
|
var overwriteConfirmStateAtom = atom({
|
|
@@ -25762,9 +25762,9 @@ var MainMenu_default = MainMenu;
|
|
|
25762
25762
|
// components/LeftToolFlyouts.tsx
|
|
25763
25763
|
import { useEffect as useEffect33, useRef as useRef28, useState as useState27 } from "react";
|
|
25764
25764
|
import clsx46 from "clsx";
|
|
25765
|
-
import { isTextElement as isTextElement14 } from "haoxin-excalidraw-
|
|
25766
|
-
import { getBoundTextElement as getBoundTextElement9, getContainerElement as getContainerElement5, redrawTextBoundingBox as redrawTextBoundingBox7, newElementWith as newElementWith11 } from "haoxin-excalidraw-
|
|
25767
|
-
import { DEFAULT_ELEMENT_STROKE_COLOR_PALETTE as DEFAULT_ELEMENT_STROKE_COLOR_PALETTE2, STROKE_WIDTH as STROKE_WIDTH2 } from "haoxin-excalidraw-
|
|
25765
|
+
import { isTextElement as isTextElement14 } from "@haoxin-web/excalidraw-element";
|
|
25766
|
+
import { getBoundTextElement as getBoundTextElement9, getContainerElement as getContainerElement5, redrawTextBoundingBox as redrawTextBoundingBox7, newElementWith as newElementWith11 } from "@haoxin-web/excalidraw-element";
|
|
25767
|
+
import { DEFAULT_ELEMENT_STROKE_COLOR_PALETTE as DEFAULT_ELEMENT_STROKE_COLOR_PALETTE2, STROKE_WIDTH as STROKE_WIDTH2 } from "@haoxin-web/excalidraw-common";
|
|
25768
25768
|
import { jsx as jsx108, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
25769
25769
|
var LeftToolFlyouts = ({
|
|
25770
25770
|
appState,
|
|
@@ -26516,7 +26516,7 @@ var LeftToolFlyouts_default = LeftToolFlyouts;
|
|
|
26516
26516
|
// components/FilledButton.tsx
|
|
26517
26517
|
import clsx47 from "clsx";
|
|
26518
26518
|
import { forwardRef as forwardRef5, useState as useState28 } from "react";
|
|
26519
|
-
import { isPromiseLike as isPromiseLike4 } from "haoxin-excalidraw-
|
|
26519
|
+
import { isPromiseLike as isPromiseLike4 } from "@haoxin-web/excalidraw-common";
|
|
26520
26520
|
import { jsx as jsx109, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
26521
26521
|
var FilledButton = forwardRef5(
|
|
26522
26522
|
({
|
|
@@ -26707,10 +26707,10 @@ import {
|
|
|
26707
26707
|
DEFAULT_SIDEBAR as DEFAULT_SIDEBAR5,
|
|
26708
26708
|
LIBRARY_SIDEBAR_TAB as LIBRARY_SIDEBAR_TAB2,
|
|
26709
26709
|
composeEventHandlers as composeEventHandlers4
|
|
26710
|
-
} from "haoxin-excalidraw-
|
|
26710
|
+
} from "@haoxin-web/excalidraw-common";
|
|
26711
26711
|
|
|
26712
26712
|
// components/SearchMenu.tsx
|
|
26713
|
-
import { round as round2 } from "haoxin-excalidraw-
|
|
26713
|
+
import { round as round2 } from "@haoxin-web/excalidraw-math";
|
|
26714
26714
|
import clsx48 from "clsx";
|
|
26715
26715
|
import debounce2 from "lodash.debounce";
|
|
26716
26716
|
import { Fragment as Fragment17, memo as memo4, useEffect as useEffect34, useMemo as useMemo8, useRef as useRef29, useState as useState29 } from "react";
|
|
@@ -26720,18 +26720,18 @@ import {
|
|
|
26720
26720
|
FONT_FAMILY as FONT_FAMILY4,
|
|
26721
26721
|
FRAME_STYLE as FRAME_STYLE3,
|
|
26722
26722
|
getLineHeight as getLineHeight4
|
|
26723
|
-
} from "haoxin-excalidraw-
|
|
26724
|
-
import { isElementCompletelyInViewport } from "haoxin-excalidraw-
|
|
26725
|
-
import { measureText as measureText6 } from "haoxin-excalidraw-
|
|
26723
|
+
} from "@haoxin-web/excalidraw-common";
|
|
26724
|
+
import { isElementCompletelyInViewport } from "@haoxin-web/excalidraw-element";
|
|
26725
|
+
import { measureText as measureText6 } from "@haoxin-web/excalidraw-element";
|
|
26726
26726
|
import {
|
|
26727
26727
|
KEYS as KEYS47,
|
|
26728
26728
|
randomInteger as randomInteger3,
|
|
26729
26729
|
addEventListener,
|
|
26730
26730
|
getFontString as getFontString9
|
|
26731
|
-
} from "haoxin-excalidraw-
|
|
26732
|
-
import { newTextElement as newTextElement3 } from "haoxin-excalidraw-
|
|
26733
|
-
import { isTextElement as isTextElement15, isFrameLikeElement as isFrameLikeElement11 } from "haoxin-excalidraw-
|
|
26734
|
-
import { getDefaultFrameName } from "haoxin-excalidraw-
|
|
26731
|
+
} from "@haoxin-web/excalidraw-common";
|
|
26732
|
+
import { newTextElement as newTextElement3 } from "@haoxin-web/excalidraw-element";
|
|
26733
|
+
import { isTextElement as isTextElement15, isFrameLikeElement as isFrameLikeElement11 } from "@haoxin-web/excalidraw-element";
|
|
26734
|
+
import { getDefaultFrameName } from "@haoxin-web/excalidraw-element/frame";
|
|
26735
26735
|
import { Fragment as Fragment18, jsx as jsx112, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
26736
26736
|
var searchQueryAtom = atom("");
|
|
26737
26737
|
var searchItemInFocusAtom = atom(null);
|
|
@@ -27400,15 +27400,15 @@ var DefaultSidebar = Object.assign(
|
|
|
27400
27400
|
|
|
27401
27401
|
// components/TTDDialog/TTDDialog.tsx
|
|
27402
27402
|
import { useEffect as useEffect37, useRef as useRef33, useState as useState31 } from "react";
|
|
27403
|
-
import { isFiniteNumber } from "haoxin-excalidraw-
|
|
27403
|
+
import { isFiniteNumber } from "@haoxin-web/excalidraw-math";
|
|
27404
27404
|
|
|
27405
27405
|
// components/TTDDialog/MermaidToExcalidraw.tsx
|
|
27406
27406
|
import { useState as useState30, useRef as useRef31, useEffect as useEffect36, useDeferredValue } from "react";
|
|
27407
|
-
import { EDITOR_LS_KEYS as EDITOR_LS_KEYS3, debounce as debounce3, isDevEnv as isDevEnv10 } from "haoxin-excalidraw-
|
|
27407
|
+
import { EDITOR_LS_KEYS as EDITOR_LS_KEYS3, debounce as debounce3, isDevEnv as isDevEnv10 } from "@haoxin-web/excalidraw-common";
|
|
27408
27408
|
|
|
27409
27409
|
// components/TTDDialog/TTDDialogInput.tsx
|
|
27410
27410
|
import { useEffect as useEffect35, useRef as useRef30 } from "react";
|
|
27411
|
-
import { EVENT as EVENT12, KEYS as KEYS48 } from "haoxin-excalidraw-
|
|
27411
|
+
import { EVENT as EVENT12, KEYS as KEYS48 } from "@haoxin-web/excalidraw-common";
|
|
27412
27412
|
import { jsx as jsx114 } from "react/jsx-runtime";
|
|
27413
27413
|
var TTDDialogInput = ({
|
|
27414
27414
|
input,
|
|
@@ -27541,7 +27541,7 @@ var TTDDialogPanels = ({ children }) => {
|
|
|
27541
27541
|
};
|
|
27542
27542
|
|
|
27543
27543
|
// components/TTDDialog/TTDDialogSubmitShortcut.tsx
|
|
27544
|
-
import { getShortcutKey as getShortcutKey13 } from "haoxin-excalidraw-
|
|
27544
|
+
import { getShortcutKey as getShortcutKey13 } from "@haoxin-web/excalidraw-common";
|
|
27545
27545
|
import { jsx as jsx118, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
27546
27546
|
var TTDDialogSubmitShortcut = () => {
|
|
27547
27547
|
return /* @__PURE__ */ jsxs68("div", { className: "ttd-dialog-submit-shortcut", children: [
|
|
@@ -27551,7 +27551,7 @@ var TTDDialogSubmitShortcut = () => {
|
|
|
27551
27551
|
};
|
|
27552
27552
|
|
|
27553
27553
|
// components/TTDDialog/common.ts
|
|
27554
|
-
import { DEFAULT_EXPORT_PADDING as DEFAULT_EXPORT_PADDING3, EDITOR_LS_KEYS as EDITOR_LS_KEYS2 } from "haoxin-excalidraw-
|
|
27554
|
+
import { DEFAULT_EXPORT_PADDING as DEFAULT_EXPORT_PADDING3, EDITOR_LS_KEYS as EDITOR_LS_KEYS2 } from "@haoxin-web/excalidraw-common";
|
|
27555
27555
|
var resetPreview = ({
|
|
27556
27556
|
canvasRef,
|
|
27557
27557
|
setError
|
|
@@ -27749,7 +27749,7 @@ var MermaidToExcalidraw_default = MermaidToExcalidraw;
|
|
|
27749
27749
|
// components/TTDDialog/TTDDialogTabs.tsx
|
|
27750
27750
|
import * as RadixTabs5 from "@radix-ui/react-tabs";
|
|
27751
27751
|
import { useRef as useRef32 } from "react";
|
|
27752
|
-
import { isMemberOf as isMemberOf2 } from "haoxin-excalidraw-
|
|
27752
|
+
import { isMemberOf as isMemberOf2 } from "@haoxin-web/excalidraw-common";
|
|
27753
27753
|
import { jsx as jsx120 } from "react/jsx-runtime";
|
|
27754
27754
|
var TTDDialogTabs = (props) => {
|
|
27755
27755
|
const setAppState = useExcalidrawSetAppState();
|
|
@@ -28113,41 +28113,41 @@ TTD mermaid definition render errror: ${error3.message}`,
|
|
|
28113
28113
|
);
|
|
28114
28114
|
|
|
28115
28115
|
// components/Stats/index.tsx
|
|
28116
|
-
import { round as round5 } from "haoxin-excalidraw-
|
|
28116
|
+
import { round as round5 } from "@haoxin-web/excalidraw-math";
|
|
28117
28117
|
import clsx52 from "clsx";
|
|
28118
28118
|
import throttle2 from "lodash.throttle";
|
|
28119
28119
|
import { useEffect as useEffect39, useMemo as useMemo11, useState as useState33, memo as memo5 } from "react";
|
|
28120
|
-
import { STATS_PANELS } from "haoxin-excalidraw-
|
|
28121
|
-
import { getCommonBounds as getCommonBounds10 } from "haoxin-excalidraw-
|
|
28122
|
-
import { getUncroppedWidthAndHeight as getUncroppedWidthAndHeight3 } from "haoxin-excalidraw-
|
|
28123
|
-
import { isElbowArrow as isElbowArrow10, isImageElement as isImageElement8 } from "haoxin-excalidraw-
|
|
28124
|
-
import { frameAndChildrenSelectedTogether as frameAndChildrenSelectedTogether2 } from "haoxin-excalidraw-
|
|
28125
|
-
import { elementsAreInSameGroup as elementsAreInSameGroup2 } from "haoxin-excalidraw-
|
|
28120
|
+
import { STATS_PANELS } from "@haoxin-web/excalidraw-common";
|
|
28121
|
+
import { getCommonBounds as getCommonBounds10 } from "@haoxin-web/excalidraw-element";
|
|
28122
|
+
import { getUncroppedWidthAndHeight as getUncroppedWidthAndHeight3 } from "@haoxin-web/excalidraw-element";
|
|
28123
|
+
import { isElbowArrow as isElbowArrow10, isImageElement as isImageElement8 } from "@haoxin-web/excalidraw-element";
|
|
28124
|
+
import { frameAndChildrenSelectedTogether as frameAndChildrenSelectedTogether2 } from "@haoxin-web/excalidraw-element";
|
|
28125
|
+
import { elementsAreInSameGroup as elementsAreInSameGroup2 } from "@haoxin-web/excalidraw-element";
|
|
28126
28126
|
|
|
28127
28127
|
// components/Stats/Angle.tsx
|
|
28128
|
-
import { degreesToRadians as degreesToRadians2, radiansToDegrees } from "haoxin-excalidraw-
|
|
28129
|
-
import { getBoundTextElement as getBoundTextElement11 } from "haoxin-excalidraw-
|
|
28130
|
-
import { isArrowElement as isArrowElement10, isElbowArrow as isElbowArrow9 } from "haoxin-excalidraw-
|
|
28131
|
-
import { updateBindings as updateBindings3 } from "haoxin-excalidraw-
|
|
28128
|
+
import { degreesToRadians as degreesToRadians2, radiansToDegrees } from "@haoxin-web/excalidraw-math";
|
|
28129
|
+
import { getBoundTextElement as getBoundTextElement11 } from "@haoxin-web/excalidraw-element";
|
|
28130
|
+
import { isArrowElement as isArrowElement10, isElbowArrow as isElbowArrow9 } from "@haoxin-web/excalidraw-element";
|
|
28131
|
+
import { updateBindings as updateBindings3 } from "@haoxin-web/excalidraw-element";
|
|
28132
28132
|
|
|
28133
28133
|
// components/Stats/DragInput.tsx
|
|
28134
28134
|
import clsx51 from "clsx";
|
|
28135
28135
|
import { useEffect as useEffect38, useRef as useRef34, useState as useState32 } from "react";
|
|
28136
|
-
import { EVENT as EVENT13, KEYS as KEYS49, cloneJSON as cloneJSON4 } from "haoxin-excalidraw-
|
|
28137
|
-
import { deepCopyElement as deepCopyElement4 } from "haoxin-excalidraw-
|
|
28138
|
-
import { CaptureUpdateAction as CaptureUpdateAction36 } from "haoxin-excalidraw-
|
|
28136
|
+
import { EVENT as EVENT13, KEYS as KEYS49, cloneJSON as cloneJSON4 } from "@haoxin-web/excalidraw-common";
|
|
28137
|
+
import { deepCopyElement as deepCopyElement4 } from "@haoxin-web/excalidraw-element";
|
|
28138
|
+
import { CaptureUpdateAction as CaptureUpdateAction36 } from "@haoxin-web/excalidraw-element";
|
|
28139
28139
|
|
|
28140
28140
|
// components/Stats/utils.ts
|
|
28141
|
-
import { pointFrom as pointFrom25, pointRotateRads as pointRotateRads14 } from "haoxin-excalidraw-
|
|
28142
|
-
import { getBoundTextElement as getBoundTextElement10 } from "haoxin-excalidraw-
|
|
28143
|
-
import { isFrameLikeElement as isFrameLikeElement12 } from "haoxin-excalidraw-
|
|
28141
|
+
import { pointFrom as pointFrom25, pointRotateRads as pointRotateRads14 } from "@haoxin-web/excalidraw-math";
|
|
28142
|
+
import { getBoundTextElement as getBoundTextElement10 } from "@haoxin-web/excalidraw-element";
|
|
28143
|
+
import { isFrameLikeElement as isFrameLikeElement12 } from "@haoxin-web/excalidraw-element";
|
|
28144
28144
|
import {
|
|
28145
28145
|
getSelectedGroupIds as getSelectedGroupIds3,
|
|
28146
28146
|
getElementsInGroup as getElementsInGroup7,
|
|
28147
28147
|
isInGroup
|
|
28148
|
-
} from "haoxin-excalidraw-
|
|
28149
|
-
import { getFrameChildren as getFrameChildren5 } from "haoxin-excalidraw-
|
|
28150
|
-
import { updateBindings as updateBindings2 } from "haoxin-excalidraw-
|
|
28148
|
+
} from "@haoxin-web/excalidraw-element";
|
|
28149
|
+
import { getFrameChildren as getFrameChildren5 } from "@haoxin-web/excalidraw-element";
|
|
28150
|
+
import { updateBindings as updateBindings2 } from "@haoxin-web/excalidraw-element";
|
|
28151
28151
|
var SMALLEST_DELTA = 0.01;
|
|
28152
28152
|
var STEP_SIZE = 10;
|
|
28153
28153
|
var isPropertyEditable = (element, property) => {
|
|
@@ -28634,17 +28634,17 @@ var CanvasGrid = ({
|
|
|
28634
28634
|
var CanvasGrid_default = CanvasGrid;
|
|
28635
28635
|
|
|
28636
28636
|
// components/Stats/Dimension.tsx
|
|
28637
|
-
import { clamp as clamp5, round as round3 } from "haoxin-excalidraw-
|
|
28638
|
-
import { MIN_WIDTH_OR_HEIGHT } from "haoxin-excalidraw-
|
|
28637
|
+
import { clamp as clamp5, round as round3 } from "@haoxin-web/excalidraw-math";
|
|
28638
|
+
import { MIN_WIDTH_OR_HEIGHT } from "@haoxin-web/excalidraw-common";
|
|
28639
28639
|
import {
|
|
28640
28640
|
MINIMAL_CROP_SIZE,
|
|
28641
28641
|
getUncroppedWidthAndHeight
|
|
28642
|
-
} from "haoxin-excalidraw-
|
|
28643
|
-
import { resizeSingleElement } from "haoxin-excalidraw-
|
|
28644
|
-
import { isImageElement as isImageElement6 } from "haoxin-excalidraw-
|
|
28645
|
-
import { isFrameLikeElement as isFrameLikeElement13 } from "haoxin-excalidraw-
|
|
28646
|
-
import { getElementsInResizingFrame as getElementsInResizingFrame2 } from "haoxin-excalidraw-
|
|
28647
|
-
import { replaceAllElementsInFrame as replaceAllElementsInFrame2 } from "haoxin-excalidraw-
|
|
28642
|
+
} from "@haoxin-web/excalidraw-element";
|
|
28643
|
+
import { resizeSingleElement } from "@haoxin-web/excalidraw-element";
|
|
28644
|
+
import { isImageElement as isImageElement6 } from "@haoxin-web/excalidraw-element";
|
|
28645
|
+
import { isFrameLikeElement as isFrameLikeElement13 } from "@haoxin-web/excalidraw-element";
|
|
28646
|
+
import { getElementsInResizingFrame as getElementsInResizingFrame2 } from "@haoxin-web/excalidraw-element";
|
|
28647
|
+
import { replaceAllElementsInFrame as replaceAllElementsInFrame2 } from "@haoxin-web/excalidraw-element";
|
|
28648
28648
|
import { jsx as jsx128 } from "react/jsx-runtime";
|
|
28649
28649
|
var STEP_SIZE4 = 10;
|
|
28650
28650
|
var _shouldKeepAspectRatio = (element) => {
|
|
@@ -28904,8 +28904,8 @@ var Dimension_default = DimensionDragInput;
|
|
|
28904
28904
|
import {
|
|
28905
28905
|
getBoundTextElement as getBoundTextElement12,
|
|
28906
28906
|
redrawTextBoundingBox as redrawTextBoundingBox8
|
|
28907
|
-
} from "haoxin-excalidraw-
|
|
28908
|
-
import { hasBoundTextElement as hasBoundTextElement7, isTextElement as isTextElement16 } from "haoxin-excalidraw-
|
|
28907
|
+
} from "@haoxin-web/excalidraw-element";
|
|
28908
|
+
import { hasBoundTextElement as hasBoundTextElement7, isTextElement as isTextElement16 } from "@haoxin-web/excalidraw-element";
|
|
28909
28909
|
import { jsx as jsx129 } from "react/jsx-runtime";
|
|
28910
28910
|
var MIN_FONT_SIZE = 4;
|
|
28911
28911
|
var STEP_SIZE5 = 4;
|
|
@@ -28971,10 +28971,10 @@ var FontSize = ({ element, scene, appState, property }) => {
|
|
|
28971
28971
|
var FontSize_default = FontSize;
|
|
28972
28972
|
|
|
28973
28973
|
// components/Stats/MultiAngle.tsx
|
|
28974
|
-
import { degreesToRadians as degreesToRadians3, radiansToDegrees as radiansToDegrees2 } from "haoxin-excalidraw-
|
|
28975
|
-
import { getBoundTextElement as getBoundTextElement13 } from "haoxin-excalidraw-
|
|
28976
|
-
import { isArrowElement as isArrowElement11 } from "haoxin-excalidraw-
|
|
28977
|
-
import { isInGroup as isInGroup2 } from "haoxin-excalidraw-
|
|
28974
|
+
import { degreesToRadians as degreesToRadians3, radiansToDegrees as radiansToDegrees2 } from "@haoxin-web/excalidraw-math";
|
|
28975
|
+
import { getBoundTextElement as getBoundTextElement13 } from "@haoxin-web/excalidraw-element";
|
|
28976
|
+
import { isArrowElement as isArrowElement11 } from "@haoxin-web/excalidraw-element";
|
|
28977
|
+
import { isInGroup as isInGroup2 } from "@haoxin-web/excalidraw-element";
|
|
28978
28978
|
import { jsx as jsx130 } from "react/jsx-runtime";
|
|
28979
28979
|
var STEP_SIZE6 = 15;
|
|
28980
28980
|
var handleDegreeChange2 = ({
|
|
@@ -29065,24 +29065,24 @@ var MultiAngle = ({
|
|
|
29065
29065
|
var MultiAngle_default = MultiAngle;
|
|
29066
29066
|
|
|
29067
29067
|
// components/Stats/MultiDimension.tsx
|
|
29068
|
-
import { pointFrom as pointFrom26 } from "haoxin-excalidraw-
|
|
29068
|
+
import { pointFrom as pointFrom26 } from "@haoxin-web/excalidraw-math";
|
|
29069
29069
|
import { useMemo as useMemo9 } from "react";
|
|
29070
|
-
import { MIN_WIDTH_OR_HEIGHT as MIN_WIDTH_OR_HEIGHT2 } from "haoxin-excalidraw-
|
|
29070
|
+
import { MIN_WIDTH_OR_HEIGHT as MIN_WIDTH_OR_HEIGHT2 } from "@haoxin-web/excalidraw-common";
|
|
29071
29071
|
import {
|
|
29072
29072
|
getElementsInResizingFrame as getElementsInResizingFrame3,
|
|
29073
29073
|
isFrameLikeElement as isFrameLikeElement14,
|
|
29074
29074
|
replaceAllElementsInFrame as replaceAllElementsInFrame3,
|
|
29075
29075
|
updateBoundElements as updateBoundElements2
|
|
29076
|
-
} from "haoxin-excalidraw-
|
|
29076
|
+
} from "@haoxin-web/excalidraw-element";
|
|
29077
29077
|
import {
|
|
29078
29078
|
rescalePointsInElement,
|
|
29079
29079
|
resizeSingleElement as resizeSingleElement2
|
|
29080
|
-
} from "haoxin-excalidraw-
|
|
29081
|
-
import { getBoundTextElement as getBoundTextElement14, handleBindTextResize as handleBindTextResize2 } from "haoxin-excalidraw-
|
|
29082
|
-
import { isTextElement as isTextElement17 } from "haoxin-excalidraw-
|
|
29080
|
+
} from "@haoxin-web/excalidraw-element";
|
|
29081
|
+
import { getBoundTextElement as getBoundTextElement14, handleBindTextResize as handleBindTextResize2 } from "@haoxin-web/excalidraw-element";
|
|
29082
|
+
import { isTextElement as isTextElement17 } from "@haoxin-web/excalidraw-element";
|
|
29083
29083
|
|
|
29084
29084
|
// ../utils/src/index.ts
|
|
29085
|
-
import { getCommonBounds as getCommonBounds8 } from "haoxin-excalidraw-
|
|
29085
|
+
import { getCommonBounds as getCommonBounds8 } from "@haoxin-web/excalidraw-element";
|
|
29086
29086
|
|
|
29087
29087
|
// components/Stats/MultiDimension.tsx
|
|
29088
29088
|
import { jsx as jsx131 } from "react/jsx-runtime";
|
|
@@ -29429,9 +29429,9 @@ var MultiDimension_default = MultiDimension;
|
|
|
29429
29429
|
import {
|
|
29430
29430
|
getBoundTextElement as getBoundTextElement15,
|
|
29431
29431
|
redrawTextBoundingBox as redrawTextBoundingBox9
|
|
29432
|
-
} from "haoxin-excalidraw-
|
|
29433
|
-
import { hasBoundTextElement as hasBoundTextElement8, isTextElement as isTextElement18 } from "haoxin-excalidraw-
|
|
29434
|
-
import { isInGroup as isInGroup3 } from "haoxin-excalidraw-
|
|
29432
|
+
} from "@haoxin-web/excalidraw-element";
|
|
29433
|
+
import { hasBoundTextElement as hasBoundTextElement8, isTextElement as isTextElement18 } from "@haoxin-web/excalidraw-element";
|
|
29434
|
+
import { isInGroup as isInGroup3 } from "@haoxin-web/excalidraw-element";
|
|
29435
29435
|
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
29436
29436
|
var MIN_FONT_SIZE2 = 4;
|
|
29437
29437
|
var STEP_SIZE8 = 4;
|
|
@@ -29540,10 +29540,10 @@ var MultiFontSize = ({
|
|
|
29540
29540
|
var MultiFontSize_default = MultiFontSize;
|
|
29541
29541
|
|
|
29542
29542
|
// components/Stats/MultiPosition.tsx
|
|
29543
|
-
import { pointFrom as pointFrom27, pointRotateRads as pointRotateRads15 } from "haoxin-excalidraw-
|
|
29543
|
+
import { pointFrom as pointFrom27, pointRotateRads as pointRotateRads15 } from "@haoxin-web/excalidraw-math";
|
|
29544
29544
|
import { useMemo as useMemo10 } from "react";
|
|
29545
|
-
import { isTextElement as isTextElement19 } from "haoxin-excalidraw-
|
|
29546
|
-
import { getCommonBounds as getCommonBounds9 } from "haoxin-excalidraw-
|
|
29545
|
+
import { isTextElement as isTextElement19 } from "@haoxin-web/excalidraw-element";
|
|
29546
|
+
import { getCommonBounds as getCommonBounds9 } from "@haoxin-web/excalidraw-element";
|
|
29547
29547
|
import { jsx as jsx133 } from "react/jsx-runtime";
|
|
29548
29548
|
var moveElements = (property, changeInTopX, changeInTopY, originalElements, originalElementsMap, scene) => {
|
|
29549
29549
|
for (let i = 0; i < originalElements.length; i++) {
|
|
@@ -29720,12 +29720,12 @@ var MultiPosition = ({
|
|
|
29720
29720
|
var MultiPosition_default = MultiPosition;
|
|
29721
29721
|
|
|
29722
29722
|
// components/Stats/Position.tsx
|
|
29723
|
-
import { clamp as clamp6, pointFrom as pointFrom28, pointRotateRads as pointRotateRads16, round as round4 } from "haoxin-excalidraw-
|
|
29723
|
+
import { clamp as clamp6, pointFrom as pointFrom28, pointRotateRads as pointRotateRads16, round as round4 } from "@haoxin-web/excalidraw-math";
|
|
29724
29724
|
import {
|
|
29725
29725
|
getFlipAdjustedCropPosition,
|
|
29726
29726
|
getUncroppedWidthAndHeight as getUncroppedWidthAndHeight2
|
|
29727
|
-
} from "haoxin-excalidraw-
|
|
29728
|
-
import { isImageElement as isImageElement7 } from "haoxin-excalidraw-
|
|
29727
|
+
} from "@haoxin-web/excalidraw-element";
|
|
29728
|
+
import { isImageElement as isImageElement7 } from "@haoxin-web/excalidraw-element";
|
|
29729
29729
|
import { jsx as jsx134 } from "react/jsx-runtime";
|
|
29730
29730
|
var handlePositionChange2 = ({
|
|
29731
29731
|
accumulatedChange,
|
|
@@ -30200,11 +30200,11 @@ var StatsInner = memo5(
|
|
|
30200
30200
|
|
|
30201
30201
|
// components/ElementLinkDialog.tsx
|
|
30202
30202
|
import { useCallback as useCallback12, useEffect as useEffect40, useState as useState34 } from "react";
|
|
30203
|
-
import { normalizeLink as normalizeLink2, KEYS as KEYS50 } from "haoxin-excalidraw-
|
|
30203
|
+
import { normalizeLink as normalizeLink2, KEYS as KEYS50 } from "@haoxin-web/excalidraw-common";
|
|
30204
30204
|
import {
|
|
30205
30205
|
defaultGetElementLinkFromSelection as defaultGetElementLinkFromSelection2,
|
|
30206
30206
|
getLinkIdAndTypeFromSelection as getLinkIdAndTypeFromSelection2
|
|
30207
|
-
} from "haoxin-excalidraw-
|
|
30207
|
+
} from "@haoxin-web/excalidraw-element";
|
|
30208
30208
|
import { jsx as jsx136, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
30209
30209
|
var ElementLinkDialog = ({
|
|
30210
30210
|
sourceElementId,
|
|
@@ -30364,8 +30364,8 @@ var ErrorDialog = ({
|
|
|
30364
30364
|
|
|
30365
30365
|
// components/HelpDialog.tsx
|
|
30366
30366
|
import React39 from "react";
|
|
30367
|
-
import { isDarwin as isDarwin3, isFirefox as isFirefox3, isWindows as isWindows2 } from "haoxin-excalidraw-
|
|
30368
|
-
import { KEYS as KEYS51, getShortcutKey as getShortcutKey14 } from "haoxin-excalidraw-
|
|
30367
|
+
import { isDarwin as isDarwin3, isFirefox as isFirefox3, isWindows as isWindows2 } from "@haoxin-web/excalidraw-common";
|
|
30368
|
+
import { KEYS as KEYS51, getShortcutKey as getShortcutKey14 } from "@haoxin-web/excalidraw-common";
|
|
30369
30369
|
import { Fragment as Fragment22, jsx as jsx138, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
30370
30370
|
var Header = () => /* @__PURE__ */ jsxs74("div", { className: "HelpDialog__header", children: [
|
|
30371
30371
|
/* @__PURE__ */ jsxs74(
|
|
@@ -31069,7 +31069,7 @@ import {
|
|
|
31069
31069
|
isFirefox as isFirefox4,
|
|
31070
31070
|
EXPORT_SCALES as EXPORT_SCALES2,
|
|
31071
31071
|
cloneJSON as cloneJSON5
|
|
31072
|
-
} from "haoxin-excalidraw-
|
|
31072
|
+
} from "@haoxin-web/excalidraw-common";
|
|
31073
31073
|
|
|
31074
31074
|
// hooks/useCopiedIndicator.ts
|
|
31075
31075
|
import { useCallback as useCallback13, useRef as useRef35, useState as useState36 } from "react";
|
|
@@ -31458,7 +31458,7 @@ var ImageExportDialog = ({
|
|
|
31458
31458
|
|
|
31459
31459
|
// components/JSONExportDialog.tsx
|
|
31460
31460
|
import React41 from "react";
|
|
31461
|
-
import { getFrame } from "haoxin-excalidraw-
|
|
31461
|
+
import { getFrame } from "@haoxin-web/excalidraw-common";
|
|
31462
31462
|
|
|
31463
31463
|
// components/Card.tsx
|
|
31464
31464
|
import OpenColor3 from "open-color";
|
|
@@ -32340,7 +32340,7 @@ import {
|
|
|
32340
32340
|
CURSOR_TYPE as CURSOR_TYPE3,
|
|
32341
32341
|
isShallowEqual as isShallowEqual6,
|
|
32342
32342
|
sceneCoordsToViewportCoords as sceneCoordsToViewportCoords5
|
|
32343
|
-
} from "haoxin-excalidraw-
|
|
32343
|
+
} from "@haoxin-web/excalidraw-common";
|
|
32344
32344
|
import { jsx as jsx148 } from "react/jsx-runtime";
|
|
32345
32345
|
var InteractiveCanvas = (props) => {
|
|
32346
32346
|
const isComponentMounted = useRef39(false);
|
|
@@ -32485,7 +32485,7 @@ var InteractiveCanvas_default = React44.memo(InteractiveCanvas, areEqual3);
|
|
|
32485
32485
|
|
|
32486
32486
|
// components/canvases/StaticCanvas.tsx
|
|
32487
32487
|
import React45, { useEffect as useEffect45, useRef as useRef40 } from "react";
|
|
32488
|
-
import { isShallowEqual as isShallowEqual7 } from "haoxin-excalidraw-
|
|
32488
|
+
import { isShallowEqual as isShallowEqual7 } from "@haoxin-web/excalidraw-common";
|
|
32489
32489
|
import { jsx as jsx149 } from "react/jsx-runtime";
|
|
32490
32490
|
var StaticCanvas = (props) => {
|
|
32491
32491
|
const wrapperRef = useRef40(null);
|
|
@@ -32571,13 +32571,13 @@ var StaticCanvas_default = React45.memo(StaticCanvas, areEqual4);
|
|
|
32571
32571
|
import { useEffect as useEffect46, useRef as useRef41 } from "react";
|
|
32572
32572
|
|
|
32573
32573
|
// renderer/renderNewElementScene.ts
|
|
32574
|
-
import { throttleRAF as throttleRAF3 } from "haoxin-excalidraw-
|
|
32574
|
+
import { throttleRAF as throttleRAF3 } from "@haoxin-web/excalidraw-common";
|
|
32575
32575
|
import {
|
|
32576
32576
|
getTargetFrame,
|
|
32577
32577
|
isInvisiblySmallElement as isInvisiblySmallElement2,
|
|
32578
32578
|
renderElement,
|
|
32579
32579
|
shouldApplyFrameClip
|
|
32580
|
-
} from "haoxin-excalidraw-
|
|
32580
|
+
} from "@haoxin-web/excalidraw-element";
|
|
32581
32581
|
var _renderNewElementScene = ({
|
|
32582
32582
|
canvas,
|
|
32583
32583
|
rc,
|
|
@@ -32737,8 +32737,8 @@ import {
|
|
|
32737
32737
|
getCommonBounds as getCommonBounds11,
|
|
32738
32738
|
getElementsInGroup as getElementsInGroup8,
|
|
32739
32739
|
selectGroupsFromGivenElements as selectGroupsFromGivenElements4
|
|
32740
|
-
} from "haoxin-excalidraw-
|
|
32741
|
-
import { sceneCoordsToViewportCoords as sceneCoordsToViewportCoords6 } from "haoxin-excalidraw-
|
|
32740
|
+
} from "@haoxin-web/excalidraw-element";
|
|
32741
|
+
import { sceneCoordsToViewportCoords as sceneCoordsToViewportCoords6 } from "@haoxin-web/excalidraw-common";
|
|
32742
32742
|
import { flushSync as flushSync2 } from "react-dom";
|
|
32743
32743
|
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
32744
32744
|
var UnlockPopup = ({
|
|
@@ -41193,18 +41193,18 @@ import {
|
|
|
41193
41193
|
hashElementsVersion as hashElementsVersion2,
|
|
41194
41194
|
hashString as hashString2,
|
|
41195
41195
|
getNonDeletedElements as getNonDeletedElements14
|
|
41196
|
-
} from "haoxin-excalidraw-
|
|
41197
|
-
import { getTextFromElements as getTextFromElements2 } from "haoxin-excalidraw-
|
|
41198
|
-
import { isInvisiblySmallElement as isInvisiblySmallElement4 } from "haoxin-excalidraw-
|
|
41196
|
+
} from "@haoxin-web/excalidraw-element";
|
|
41197
|
+
import { getTextFromElements as getTextFromElements2 } from "@haoxin-web/excalidraw-element";
|
|
41198
|
+
import { isInvisiblySmallElement as isInvisiblySmallElement4 } from "@haoxin-web/excalidraw-element";
|
|
41199
41199
|
|
|
41200
41200
|
// data/reconcile.ts
|
|
41201
41201
|
import throttle4 from "lodash.throttle";
|
|
41202
|
-
import { arrayToMap as arrayToMap28, isDevEnv as isDevEnv12, isTestEnv as isTestEnv7 } from "haoxin-excalidraw-
|
|
41202
|
+
import { arrayToMap as arrayToMap28, isDevEnv as isDevEnv12, isTestEnv as isTestEnv7 } from "@haoxin-web/excalidraw-common";
|
|
41203
41203
|
import {
|
|
41204
41204
|
orderByFractionalIndex as orderByFractionalIndex2,
|
|
41205
41205
|
syncInvalidIndices as syncInvalidIndices3,
|
|
41206
41206
|
validateFractionalIndices
|
|
41207
|
-
} from "haoxin-excalidraw-
|
|
41207
|
+
} from "@haoxin-web/excalidraw-element";
|
|
41208
41208
|
var shouldDiscardRemoteElement = (localAppState, local, remote) => {
|
|
41209
41209
|
if (local && // local element is being edited
|
|
41210
41210
|
(local.id === localAppState.editingTextElement?.id || local.id === localAppState.resizingElement?.id || local.id === localAppState.newElement?.id || // local element is newer
|
|
@@ -41269,8 +41269,8 @@ var reconcileElements = (localElements, remoteElements, localAppState) => {
|
|
|
41269
41269
|
};
|
|
41270
41270
|
|
|
41271
41271
|
// index.tsx
|
|
41272
|
-
import { getFreeDrawSvgPath as getFreeDrawSvgPath2 } from "haoxin-excalidraw-
|
|
41273
|
-
import { isLinearElement as isLinearElement14 } from "haoxin-excalidraw-
|
|
41272
|
+
import { getFreeDrawSvgPath as getFreeDrawSvgPath2 } from "@haoxin-web/excalidraw-element";
|
|
41273
|
+
import { isLinearElement as isLinearElement14 } from "@haoxin-web/excalidraw-element";
|
|
41274
41274
|
import {
|
|
41275
41275
|
FONT_FAMILY as FONT_FAMILY5,
|
|
41276
41276
|
THEME as THEME16,
|
|
@@ -41279,17 +41279,17 @@ import {
|
|
|
41279
41279
|
DEFAULT_LASER_COLOR as DEFAULT_LASER_COLOR2,
|
|
41280
41280
|
UserIdleState as UserIdleState2,
|
|
41281
41281
|
normalizeLink as normalizeLink4
|
|
41282
|
-
} from "haoxin-excalidraw-
|
|
41282
|
+
} from "@haoxin-web/excalidraw-common";
|
|
41283
41283
|
import {
|
|
41284
41284
|
mutateElement as mutateElement2,
|
|
41285
41285
|
newElementWith as newElementWith13,
|
|
41286
41286
|
bumpVersion
|
|
41287
|
-
} from "haoxin-excalidraw-
|
|
41288
|
-
import { CaptureUpdateAction as CaptureUpdateAction38 } from "haoxin-excalidraw-
|
|
41287
|
+
} from "@haoxin-web/excalidraw-element";
|
|
41288
|
+
import { CaptureUpdateAction as CaptureUpdateAction38 } from "@haoxin-web/excalidraw-element";
|
|
41289
41289
|
import {
|
|
41290
41290
|
sceneCoordsToViewportCoords as sceneCoordsToViewportCoords2,
|
|
41291
41291
|
viewportCoordsToSceneCoords as viewportCoordsToSceneCoords5
|
|
41292
|
-
} from "haoxin-excalidraw-
|
|
41292
|
+
} from "@haoxin-web/excalidraw-common";
|
|
41293
41293
|
|
|
41294
41294
|
// components/TTDDialog/TTDDialogTrigger.tsx
|
|
41295
41295
|
import { jsx as jsx161, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
@@ -41317,7 +41317,7 @@ var TTDDialogTrigger = ({
|
|
|
41317
41317
|
TTDDialogTrigger.displayName = "TTDDialogTrigger";
|
|
41318
41318
|
|
|
41319
41319
|
// index.tsx
|
|
41320
|
-
import { getCommonBounds as getCommonBounds13, getVisibleSceneBounds as getVisibleSceneBounds2 } from "haoxin-excalidraw-
|
|
41320
|
+
import { getCommonBounds as getCommonBounds13, getVisibleSceneBounds as getVisibleSceneBounds2 } from "@haoxin-web/excalidraw-element";
|
|
41321
41321
|
|
|
41322
41322
|
// components/DiagramToCodePlugin/DiagramToCodePlugin.tsx
|
|
41323
41323
|
import { useLayoutEffect as useLayoutEffect9 } from "react";
|
|
@@ -41332,8 +41332,8 @@ var DiagramToCodePlugin = (props) => {
|
|
|
41332
41332
|
};
|
|
41333
41333
|
|
|
41334
41334
|
// index.tsx
|
|
41335
|
-
import { isElementLink as isElementLink3 } from "haoxin-excalidraw-
|
|
41336
|
-
import { setCustomTextMetricsProvider } from "haoxin-excalidraw-
|
|
41335
|
+
import { isElementLink as isElementLink3 } from "@haoxin-web/excalidraw-element";
|
|
41336
|
+
import { setCustomTextMetricsProvider } from "@haoxin-web/excalidraw-element";
|
|
41337
41337
|
import { jsx as jsx162 } from "react/jsx-runtime";
|
|
41338
41338
|
polyfill_default();
|
|
41339
41339
|
var ExcalidrawBase = (props) => {
|