@misenkashari/excalidraw-element 1.0.3 → 1.0.6
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/index.js +73 -73
- package/dist/dev/index.js.map +1 -1
- package/dist/prod/index.js +8 -8
- package/dist/types/common/src/constants.d.ts +1 -1
- package/dist/types/common/src/font-metadata.d.ts +1 -1
- package/dist/types/common/src/points.d.ts +1 -1
- package/dist/types/common/src/utils.d.ts +1 -1
- package/dist/types/common/src/visualdebug.d.ts +3 -3
- package/dist/types/element/src/Scene.d.ts +4 -4
- package/dist/types/element/src/binding.d.ts +3 -3
- package/dist/types/element/src/bounds.d.ts +2 -2
- package/dist/types/element/src/collision.d.ts +1 -1
- package/dist/types/element/src/delta.d.ts +2 -2
- package/dist/types/element/src/distance.d.ts +1 -1
- package/dist/types/element/src/dragElements.d.ts +1 -1
- package/dist/types/element/src/duplicate.d.ts +1 -1
- package/dist/types/element/src/elbowArrow.d.ts +1 -1
- package/dist/types/element/src/embeddable.d.ts +1 -1
- package/dist/types/element/src/frame.d.ts +1 -1
- package/dist/types/element/src/groups.d.ts +1 -1
- package/dist/types/element/src/heading.d.ts +2 -2
- package/dist/types/element/src/image.d.ts +1 -1
- package/dist/types/element/src/linearElementEditor.d.ts +3 -3
- package/dist/types/element/src/mutateElement.d.ts +1 -1
- package/dist/types/element/src/newElement.d.ts +1 -1
- package/dist/types/element/src/renderElement.d.ts +2 -2
- package/dist/types/element/src/resizeElements.d.ts +1 -1
- package/dist/types/element/src/resizeTest.d.ts +3 -3
- package/dist/types/element/src/shape.d.ts +3 -3
- package/dist/types/element/src/store.d.ts +2 -2
- package/dist/types/element/src/textElement.d.ts +2 -2
- package/dist/types/element/src/transform.d.ts +1 -1
- package/dist/types/element/src/transformHandles.d.ts +3 -3
- package/dist/types/element/src/typeChecks.d.ts +1 -1
- package/dist/types/element/src/types.d.ts +3 -3
- package/dist/types/element/src/utils.d.ts +2 -2
- package/dist/types/element/src/zindex.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +82 -82
- package/dist/types/excalidraw/actions/actionAlign.d.ts +7 -7
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +50 -50
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +275 -275
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +63 -63
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +28 -28
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +69 -69
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +32 -32
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +49 -49
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +29 -29
- package/dist/types/excalidraw/actions/actionExport.d.ts +116 -116
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionFlip.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionFrame.d.ts +242 -242
- package/dist/types/excalidraw/actions/actionGroup.d.ts +43 -43
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +181 -181
- package/dist/types/excalidraw/actions/actionLink.d.ts +31 -31
- package/dist/types/excalidraw/actions/actionMenu.d.ts +27 -27
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionProperties.d.ts +39 -39
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +23 -23
- package/dist/types/excalidraw/actions/actionStyles.d.ts +31 -31
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +29 -29
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +29 -29
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +28 -28
- package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +28 -28
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +29 -29
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +29 -29
- package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -8
- package/dist/types/excalidraw/actions/manager.d.ts +1 -1
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +2 -2
- package/dist/types/excalidraw/appState.d.ts +10 -10
- package/dist/types/excalidraw/charts.d.ts +1 -1
- package/dist/types/excalidraw/clipboard.d.ts +4 -4
- package/dist/types/excalidraw/components/Actions.d.ts +1 -1
- package/dist/types/excalidraw/components/App.d.ts +9 -9
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +2 -2
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -2
- package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +1 -1
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +1 -1
- package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +2 -2
- package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
- package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
- package/dist/types/excalidraw/components/DefaultSidebar.d.ts +1 -1
- package/dist/types/excalidraw/components/ElementCanvasButtons.d.ts +1 -1
- package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +2 -2
- package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
- package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +1 -1
- package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +2 -2
- package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +1 -1
- package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +1 -1
- package/dist/types/excalidraw/components/HintViewer.d.ts +1 -1
- package/dist/types/excalidraw/components/ImageExportDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/InitializeApp.d.ts +1 -1
- package/dist/types/excalidraw/components/JSONExportDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/LayerUI.d.ts +1 -1
- package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
- package/dist/types/excalidraw/components/LoadingMessage.d.ts +1 -1
- package/dist/types/excalidraw/components/MobileMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/Angle.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/Dimension.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/DragInput.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/FontSize.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiFontSize.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/Position.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/index.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/utils.d.ts +2 -2
- package/dist/types/excalidraw/components/TTDDialog/common.d.ts +1 -1
- package/dist/types/excalidraw/components/ToolButton.d.ts +1 -1
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -2
- package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -1
- package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +1 -1
- package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +2 -2
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +3 -3
- package/dist/types/excalidraw/components/icons.d.ts +1 -1
- package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +1 -1
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -1
- package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +2 -4
- package/dist/types/excalidraw/data/EditorLocalStorage.d.ts +1 -1
- package/dist/types/excalidraw/data/blob.d.ts +49 -49
- package/dist/types/excalidraw/data/filesystem.d.ts +1 -1
- package/dist/types/excalidraw/data/index.d.ts +1 -1
- package/dist/types/excalidraw/data/json.d.ts +24 -24
- package/dist/types/excalidraw/data/library.d.ts +2 -2
- package/dist/types/excalidraw/data/reconcile.d.ts +2 -2
- package/dist/types/excalidraw/data/resave.d.ts +1 -1
- package/dist/types/excalidraw/data/restore.d.ts +2 -2
- package/dist/types/excalidraw/data/types.d.ts +2 -2
- package/dist/types/excalidraw/fonts/Fonts.d.ts +3 -3
- package/dist/types/excalidraw/history.d.ts +4 -4
- package/dist/types/excalidraw/hooks/useEmitter.d.ts +1 -1
- package/dist/types/excalidraw/i18n.d.ts +1 -1
- package/dist/types/excalidraw/index.d.ts +12 -12
- package/dist/types/excalidraw/lasso/utils.d.ts +2 -2
- package/dist/types/excalidraw/renderer/staticScene.d.ts +1 -1
- package/dist/types/excalidraw/renderer/staticSvgScene.d.ts +1 -1
- package/dist/types/excalidraw/scene/Renderer.d.ts +2 -2
- package/dist/types/excalidraw/scene/export.d.ts +1 -1
- package/dist/types/excalidraw/scene/index.d.ts +2 -2
- package/dist/types/excalidraw/scene/scroll.d.ts +1 -1
- package/dist/types/excalidraw/scene/types.d.ts +3 -3
- package/dist/types/excalidraw/snapping.d.ts +5 -5
- package/dist/types/excalidraw/types.d.ts +6 -6
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +1 -1
- package/dist/types/utils/src/bbox.d.ts +2 -2
- package/dist/types/utils/src/export.d.ts +2 -2
- package/dist/types/utils/src/index.d.ts +1 -1
- package/dist/types/utils/src/shape.d.ts +4 -4
- package/dist/types/utils/src/withinBounds.d.ts +2 -2
- package/package.json +1 -1
package/dist/dev/index.js
CHANGED
|
@@ -186,20 +186,20 @@ var require_lodash = __commonJS({
|
|
|
186
186
|
|
|
187
187
|
// src/index.ts
|
|
188
188
|
init_define_import_meta_env();
|
|
189
|
-
import { toIterable as toIterable2 } from "@excalidraw
|
|
189
|
+
import { toIterable as toIterable2 } from "@misenkashari/excalidraw-common";
|
|
190
190
|
|
|
191
191
|
// src/sizeHelpers.ts
|
|
192
192
|
init_define_import_meta_env();
|
|
193
193
|
import {
|
|
194
194
|
SHIFT_LOCKING_ANGLE,
|
|
195
195
|
viewportCoordsToSceneCoords
|
|
196
|
-
} from "@excalidraw
|
|
196
|
+
} from "@misenkashari/excalidraw-common";
|
|
197
197
|
import {
|
|
198
198
|
normalizeRadians,
|
|
199
199
|
radiansBetweenAngles,
|
|
200
200
|
radiansDifference
|
|
201
|
-
} from "@excalidraw
|
|
202
|
-
import { pointsEqual as pointsEqual6 } from "@excalidraw
|
|
201
|
+
} from "@misenkashari/excalidraw-math";
|
|
202
|
+
import { pointsEqual as pointsEqual6 } from "@misenkashari/excalidraw-math";
|
|
203
203
|
|
|
204
204
|
// src/bounds.ts
|
|
205
205
|
init_define_import_meta_env();
|
|
@@ -2264,7 +2264,7 @@ import {
|
|
|
2264
2264
|
invariant as invariant10,
|
|
2265
2265
|
rescalePoints,
|
|
2266
2266
|
sizeOf
|
|
2267
|
-
} from "@excalidraw
|
|
2267
|
+
} from "@misenkashari/excalidraw-common";
|
|
2268
2268
|
import {
|
|
2269
2269
|
degreesToRadians,
|
|
2270
2270
|
lineSegment as lineSegment7,
|
|
@@ -2272,11 +2272,11 @@ import {
|
|
|
2272
2272
|
pointFrom as pointFrom14,
|
|
2273
2273
|
pointFromArray as pointFromArray3,
|
|
2274
2274
|
pointRotateRads as pointRotateRads13
|
|
2275
|
-
} from "@excalidraw
|
|
2275
|
+
} from "@misenkashari/excalidraw-math";
|
|
2276
2276
|
|
|
2277
2277
|
// ../utils/src/shape.ts
|
|
2278
2278
|
init_define_import_meta_env();
|
|
2279
|
-
import { invariant } from "@excalidraw
|
|
2279
|
+
import { invariant } from "@misenkashari/excalidraw-common";
|
|
2280
2280
|
import {
|
|
2281
2281
|
curve as curve2,
|
|
2282
2282
|
lineSegment,
|
|
@@ -2293,8 +2293,8 @@ import {
|
|
|
2293
2293
|
vectorAdd,
|
|
2294
2294
|
vectorFromPoint,
|
|
2295
2295
|
vectorScale
|
|
2296
|
-
} from "@excalidraw
|
|
2297
|
-
import { getElementAbsoluteCoords } from "@excalidraw
|
|
2296
|
+
} from "@misenkashari/excalidraw-math";
|
|
2297
|
+
import { getElementAbsoluteCoords } from "@misenkashari/excalidraw-element";
|
|
2298
2298
|
var getPolygonShape = (element) => {
|
|
2299
2299
|
const { angle, width, height, x, y } = element;
|
|
2300
2300
|
const cx = x + width / 2;
|
|
@@ -2616,7 +2616,7 @@ import {
|
|
|
2616
2616
|
pointFrom as pointFrom13,
|
|
2617
2617
|
pointDistance as pointDistance6,
|
|
2618
2618
|
pointRotateRads as pointRotateRads12
|
|
2619
|
-
} from "@excalidraw
|
|
2619
|
+
} from "@misenkashari/excalidraw-math";
|
|
2620
2620
|
import {
|
|
2621
2621
|
ROUGHNESS,
|
|
2622
2622
|
THEME as THEME2,
|
|
@@ -2625,7 +2625,7 @@ import {
|
|
|
2625
2625
|
COLOR_PALETTE,
|
|
2626
2626
|
LINE_POLYGON_POINT_MERGE_DISTANCE,
|
|
2627
2627
|
applyDarkModeFilter as applyDarkModeFilter2
|
|
2628
|
-
} from "@excalidraw
|
|
2628
|
+
} from "@misenkashari/excalidraw-common";
|
|
2629
2629
|
|
|
2630
2630
|
// src/renderElement.ts
|
|
2631
2631
|
init_define_import_meta_env();
|
|
@@ -2634,7 +2634,7 @@ import {
|
|
|
2634
2634
|
lineSegment as lineSegment6,
|
|
2635
2635
|
pointFrom as pointFrom12,
|
|
2636
2636
|
pointRotateRads as pointRotateRads11
|
|
2637
|
-
} from "@excalidraw
|
|
2637
|
+
} from "@misenkashari/excalidraw-math";
|
|
2638
2638
|
import {
|
|
2639
2639
|
BOUND_TEXT_PADDING as BOUND_TEXT_PADDING3,
|
|
2640
2640
|
DEFAULT_REDUCED_GLOBAL_ALPHA,
|
|
@@ -2648,7 +2648,7 @@ import {
|
|
|
2648
2648
|
getVerticalOffset,
|
|
2649
2649
|
invariant as invariant9,
|
|
2650
2650
|
applyDarkModeFilter
|
|
2651
|
-
} from "@excalidraw
|
|
2651
|
+
} from "@misenkashari/excalidraw-common";
|
|
2652
2652
|
|
|
2653
2653
|
// src/cropElement.ts
|
|
2654
2654
|
init_define_import_meta_env();
|
|
@@ -2664,7 +2664,7 @@ import {
|
|
|
2664
2664
|
pointFromVector as pointFromVector2,
|
|
2665
2665
|
clamp,
|
|
2666
2666
|
isCloseTo
|
|
2667
|
-
} from "@excalidraw
|
|
2667
|
+
} from "@misenkashari/excalidraw-math";
|
|
2668
2668
|
var MINIMAL_CROP_SIZE = 10;
|
|
2669
2669
|
var cropElement = (element, elementsMap, transformHandle, naturalWidth, naturalHeight, pointerX, pointerY, widthAspectRatio) => {
|
|
2670
2670
|
const { width: uncroppedWidth, height: uncroppedHeight } = getUncroppedWidthAndHeight(element);
|
|
@@ -3120,7 +3120,7 @@ import {
|
|
|
3120
3120
|
curveLength,
|
|
3121
3121
|
curvePointAtLength,
|
|
3122
3122
|
lineSegment as lineSegment5
|
|
3123
|
-
} from "@excalidraw
|
|
3123
|
+
} from "@misenkashari/excalidraw-math";
|
|
3124
3124
|
import {
|
|
3125
3125
|
DRAGGING_THRESHOLD,
|
|
3126
3126
|
KEYS as KEYS2,
|
|
@@ -3129,13 +3129,13 @@ import {
|
|
|
3129
3129
|
invariant as invariant8,
|
|
3130
3130
|
isShallowEqual,
|
|
3131
3131
|
getFeatureFlag as getFeatureFlag2
|
|
3132
|
-
} from "@excalidraw
|
|
3132
|
+
} from "@misenkashari/excalidraw-common";
|
|
3133
3133
|
import {
|
|
3134
3134
|
deconstructLinearOrFreeDrawElement as deconstructLinearOrFreeDrawElement2,
|
|
3135
3135
|
isPathALoop as isPathALoop2,
|
|
3136
3136
|
moveArrowAboveBindable,
|
|
3137
3137
|
projectFixedPointOntoDiagonal as projectFixedPointOntoDiagonal2
|
|
3138
|
-
} from "@excalidraw
|
|
3138
|
+
} from "@misenkashari/excalidraw-element";
|
|
3139
3139
|
|
|
3140
3140
|
// src/binding.ts
|
|
3141
3141
|
init_define_import_meta_env();
|
|
@@ -3145,7 +3145,7 @@ import {
|
|
|
3145
3145
|
getFeatureFlag,
|
|
3146
3146
|
invariant as invariant7,
|
|
3147
3147
|
isTransparent as isTransparent2
|
|
3148
|
-
} from "@excalidraw
|
|
3148
|
+
} from "@misenkashari/excalidraw-common";
|
|
3149
3149
|
import {
|
|
3150
3150
|
PRECISION as PRECISION2,
|
|
3151
3151
|
clamp as clamp3,
|
|
@@ -3158,11 +3158,11 @@ import {
|
|
|
3158
3158
|
vectorFromPoint as vectorFromPoint7,
|
|
3159
3159
|
vectorNormalize as vectorNormalize4,
|
|
3160
3160
|
vectorScale as vectorScale7
|
|
3161
|
-
} from "@excalidraw
|
|
3161
|
+
} from "@misenkashari/excalidraw-math";
|
|
3162
3162
|
|
|
3163
3163
|
// src/collision.ts
|
|
3164
3164
|
init_define_import_meta_env();
|
|
3165
|
-
import { invariant as invariant4, isTransparent } from "@excalidraw
|
|
3165
|
+
import { invariant as invariant4, isTransparent } from "@misenkashari/excalidraw-common";
|
|
3166
3166
|
import {
|
|
3167
3167
|
curveIntersectLineSegment,
|
|
3168
3168
|
isPointWithinBounds,
|
|
@@ -3175,11 +3175,11 @@ import {
|
|
|
3175
3175
|
vectorFromPoint as vectorFromPoint4,
|
|
3176
3176
|
vectorNormalize as vectorNormalize3,
|
|
3177
3177
|
vectorScale as vectorScale4
|
|
3178
|
-
} from "@excalidraw
|
|
3178
|
+
} from "@misenkashari/excalidraw-math";
|
|
3179
3179
|
import {
|
|
3180
3180
|
ellipse as ellipse3,
|
|
3181
3181
|
ellipseSegmentInterceptPoints
|
|
3182
|
-
} from "@excalidraw
|
|
3182
|
+
} from "@misenkashari/excalidraw-math/ellipse";
|
|
3183
3183
|
|
|
3184
3184
|
// src/utils.ts
|
|
3185
3185
|
init_define_import_meta_env();
|
|
@@ -3189,7 +3189,7 @@ import {
|
|
|
3189
3189
|
invariant as invariant2,
|
|
3190
3190
|
LINE_CONFIRM_THRESHOLD,
|
|
3191
3191
|
ROUNDNESS as ROUNDNESS2
|
|
3192
|
-
} from "@excalidraw
|
|
3192
|
+
} from "@misenkashari/excalidraw-common";
|
|
3193
3193
|
import {
|
|
3194
3194
|
curve as curve3,
|
|
3195
3195
|
curveCatmullRomCubicApproxPoints,
|
|
@@ -3206,12 +3206,12 @@ import {
|
|
|
3206
3206
|
vectorFromPoint as vectorFromPoint3,
|
|
3207
3207
|
vectorNormalize as vectorNormalize2,
|
|
3208
3208
|
vectorScale as vectorScale3
|
|
3209
|
-
} from "@excalidraw
|
|
3209
|
+
} from "@misenkashari/excalidraw-math";
|
|
3210
3210
|
|
|
3211
3211
|
// src/typeChecks.ts
|
|
3212
3212
|
init_define_import_meta_env();
|
|
3213
|
-
import { ROUNDNESS, assertNever } from "@excalidraw
|
|
3214
|
-
import { pointsEqual } from "@excalidraw
|
|
3213
|
+
import { ROUNDNESS, assertNever } from "@misenkashari/excalidraw-common";
|
|
3214
|
+
import { pointsEqual } from "@misenkashari/excalidraw-math";
|
|
3215
3215
|
var isInitializedImageElement = (element) => {
|
|
3216
3216
|
return !!element && element.type === "image" && !!element.fileId;
|
|
3217
3217
|
};
|
|
@@ -3829,8 +3829,8 @@ import {
|
|
|
3829
3829
|
getFontString as getFontString2,
|
|
3830
3830
|
isProdEnv,
|
|
3831
3831
|
invariant as invariant3
|
|
3832
|
-
} from "@excalidraw
|
|
3833
|
-
import { pointFrom as pointFrom4, pointRotateRads as pointRotateRads4 } from "@excalidraw
|
|
3832
|
+
} from "@misenkashari/excalidraw-common";
|
|
3833
|
+
import { pointFrom as pointFrom4, pointRotateRads as pointRotateRads4 } from "@misenkashari/excalidraw-math";
|
|
3834
3834
|
|
|
3835
3835
|
// src/containerCache.ts
|
|
3836
3836
|
init_define_import_meta_env();
|
|
@@ -3858,7 +3858,7 @@ import {
|
|
|
3858
3858
|
getFontString,
|
|
3859
3859
|
isTestEnv,
|
|
3860
3860
|
normalizeEOL
|
|
3861
|
-
} from "@excalidraw
|
|
3861
|
+
} from "@misenkashari/excalidraw-common";
|
|
3862
3862
|
var measureText = (text, font, lineHeight) => {
|
|
3863
3863
|
const _text = text.split("\n").map((x) => x || " ").join("\n");
|
|
3864
3864
|
const fontSize = parseFloat(font);
|
|
@@ -3992,7 +3992,7 @@ var getMaxCharWidth = (font) => {
|
|
|
3992
3992
|
|
|
3993
3993
|
// src/textWrapping.ts
|
|
3994
3994
|
init_define_import_meta_env();
|
|
3995
|
-
import { isDevEnv, isTestEnv as isTestEnv2 } from "@excalidraw
|
|
3995
|
+
import { isDevEnv, isTestEnv as isTestEnv2 } from "@misenkashari/excalidraw-common";
|
|
3996
3996
|
var cachedCjkRegex;
|
|
3997
3997
|
var cachedLineBreakRegex;
|
|
3998
3998
|
var cachedEmojiRegex;
|
|
@@ -4710,8 +4710,8 @@ import {
|
|
|
4710
4710
|
curvePointDistance,
|
|
4711
4711
|
distanceToLineSegment,
|
|
4712
4712
|
pointRotateRads as pointRotateRads5
|
|
4713
|
-
} from "@excalidraw
|
|
4714
|
-
import { ellipse as ellipse2, ellipseDistanceFromPoint } from "@excalidraw
|
|
4713
|
+
} from "@misenkashari/excalidraw-math";
|
|
4714
|
+
import { ellipse as ellipse2, ellipseDistanceFromPoint } from "@misenkashari/excalidraw-math/ellipse";
|
|
4715
4715
|
var distanceToElement = (element, elementsMap, p) => {
|
|
4716
4716
|
switch (element.type) {
|
|
4717
4717
|
case "selection":
|
|
@@ -5202,7 +5202,7 @@ import {
|
|
|
5202
5202
|
invariant as invariant5,
|
|
5203
5203
|
isDevEnv as isDevEnv2,
|
|
5204
5204
|
isTestEnv as isTestEnv3
|
|
5205
|
-
} from "@excalidraw
|
|
5205
|
+
} from "@misenkashari/excalidraw-common";
|
|
5206
5206
|
import {
|
|
5207
5207
|
pointFrom as pointFrom6,
|
|
5208
5208
|
pointFromVector as pointFromVector5,
|
|
@@ -5213,7 +5213,7 @@ import {
|
|
|
5213
5213
|
vectorCross,
|
|
5214
5214
|
vectorFromPoint as vectorFromPoint5,
|
|
5215
5215
|
vectorScale as vectorScale5
|
|
5216
|
-
} from "@excalidraw
|
|
5216
|
+
} from "@misenkashari/excalidraw-math";
|
|
5217
5217
|
var HEADING_RIGHT = [1, 0];
|
|
5218
5218
|
var HEADING_DOWN = [0, 1];
|
|
5219
5219
|
var HEADING_LEFT = [-1, 0];
|
|
@@ -5408,7 +5408,7 @@ import {
|
|
|
5408
5408
|
getSizeFromPoints as getSizeFromPoints2,
|
|
5409
5409
|
randomInteger,
|
|
5410
5410
|
getUpdatedTimestamp
|
|
5411
|
-
} from "@excalidraw
|
|
5411
|
+
} from "@misenkashari/excalidraw-common";
|
|
5412
5412
|
|
|
5413
5413
|
// src/elbowArrow.ts
|
|
5414
5414
|
init_define_import_meta_env();
|
|
@@ -5423,7 +5423,7 @@ import {
|
|
|
5423
5423
|
vectorCross as vectorCross2,
|
|
5424
5424
|
vectorFromPoint as vectorFromPoint6,
|
|
5425
5425
|
vectorScale as vectorScale6
|
|
5426
|
-
} from "@excalidraw
|
|
5426
|
+
} from "@misenkashari/excalidraw-math";
|
|
5427
5427
|
import {
|
|
5428
5428
|
BinaryHeap,
|
|
5429
5429
|
invariant as invariant6,
|
|
@@ -5431,7 +5431,7 @@ import {
|
|
|
5431
5431
|
getSizeFromPoints,
|
|
5432
5432
|
isDevEnv as isDevEnv3,
|
|
5433
5433
|
arrayToMap
|
|
5434
|
-
} from "@excalidraw
|
|
5434
|
+
} from "@misenkashari/excalidraw-common";
|
|
5435
5435
|
var DEDUP_TRESHOLD = 1;
|
|
5436
5436
|
var BASE_PADDING = 40;
|
|
5437
5437
|
var handleSegmentRenormalization = (arrow, elementsMap) => {
|
|
@@ -10291,15 +10291,15 @@ var determineCustomLinearAngle = (pivotPoint, draggedPoint) => Math.atan2(dragge
|
|
|
10291
10291
|
|
|
10292
10292
|
// src/frame.ts
|
|
10293
10293
|
init_define_import_meta_env();
|
|
10294
|
-
import { arrayToMap as arrayToMap5 } from "@excalidraw
|
|
10295
|
-
import { isPointWithinBounds as isPointWithinBounds2, pointFrom as pointFrom11 } from "@excalidraw
|
|
10294
|
+
import { arrayToMap as arrayToMap5 } from "@misenkashari/excalidraw-common";
|
|
10295
|
+
import { isPointWithinBounds as isPointWithinBounds2, pointFrom as pointFrom11 } from "@misenkashari/excalidraw-math";
|
|
10296
10296
|
|
|
10297
10297
|
// ../utils/src/bbox.ts
|
|
10298
10298
|
init_define_import_meta_env();
|
|
10299
10299
|
import {
|
|
10300
10300
|
vectorCross as vectorCross3,
|
|
10301
10301
|
vectorFromPoint as vectorFromPoint9
|
|
10302
|
-
} from "@excalidraw
|
|
10302
|
+
} from "@misenkashari/excalidraw-math";
|
|
10303
10303
|
function getBBox(line2) {
|
|
10304
10304
|
return [
|
|
10305
10305
|
Math.min(line2[0][0], line2[1][0]),
|
|
@@ -10332,21 +10332,21 @@ function doLineSegmentsIntersect(a2, b2) {
|
|
|
10332
10332
|
|
|
10333
10333
|
// ../utils/src/withinBounds.ts
|
|
10334
10334
|
init_define_import_meta_env();
|
|
10335
|
-
import { arrayToMap as arrayToMap3 } from "@excalidraw
|
|
10336
|
-
import { getElementBounds as getElementBounds2 } from "@excalidraw
|
|
10335
|
+
import { arrayToMap as arrayToMap3 } from "@misenkashari/excalidraw-common";
|
|
10336
|
+
import { getElementBounds as getElementBounds2 } from "@misenkashari/excalidraw-element";
|
|
10337
10337
|
import {
|
|
10338
10338
|
isArrowElement as isArrowElement2,
|
|
10339
10339
|
isExcalidrawElement as isExcalidrawElement2,
|
|
10340
10340
|
isFreeDrawElement as isFreeDrawElement2,
|
|
10341
10341
|
isLinearElement as isLinearElement2,
|
|
10342
10342
|
isTextElement as isTextElement2
|
|
10343
|
-
} from "@excalidraw
|
|
10343
|
+
} from "@misenkashari/excalidraw-element";
|
|
10344
10344
|
import {
|
|
10345
10345
|
rangeIncludesValue,
|
|
10346
10346
|
pointFrom as pointFrom10,
|
|
10347
10347
|
pointRotateRads as pointRotateRads10,
|
|
10348
10348
|
rangeInclusive
|
|
10349
|
-
} from "@excalidraw
|
|
10349
|
+
} from "@misenkashari/excalidraw-math";
|
|
10350
10350
|
var getNonLinearElementRelativePoints = (element) => {
|
|
10351
10351
|
if (element.type === "diamond") {
|
|
10352
10352
|
return [
|
|
@@ -10473,7 +10473,7 @@ var elementsOverlappingBBox = ({
|
|
|
10473
10473
|
|
|
10474
10474
|
// src/selection.ts
|
|
10475
10475
|
init_define_import_meta_env();
|
|
10476
|
-
import { arrayToMap as arrayToMap4, isShallowEqual as isShallowEqual2 } from "@excalidraw
|
|
10476
|
+
import { arrayToMap as arrayToMap4, isShallowEqual as isShallowEqual2 } from "@misenkashari/excalidraw-common";
|
|
10477
10477
|
|
|
10478
10478
|
// src/groups.ts
|
|
10479
10479
|
init_define_import_meta_env();
|
|
@@ -13965,7 +13965,7 @@ import {
|
|
|
13965
13965
|
isShallowEqual as isShallowEqual3,
|
|
13966
13966
|
isTestEnv as isTestEnv7,
|
|
13967
13967
|
randomInteger as randomInteger4
|
|
13968
|
-
} from "@excalidraw
|
|
13968
|
+
} from "@misenkashari/excalidraw-common";
|
|
13969
13969
|
|
|
13970
13970
|
// src/store.ts
|
|
13971
13971
|
init_define_import_meta_env();
|
|
@@ -13977,7 +13977,7 @@ import {
|
|
|
13977
13977
|
randomId as randomId2,
|
|
13978
13978
|
Emitter,
|
|
13979
13979
|
toIterable
|
|
13980
|
-
} from "@excalidraw
|
|
13980
|
+
} from "@misenkashari/excalidraw-common";
|
|
13981
13981
|
|
|
13982
13982
|
// src/duplicate.ts
|
|
13983
13983
|
init_define_import_meta_env();
|
|
@@ -13990,11 +13990,11 @@ import {
|
|
|
13990
13990
|
findLastIndex,
|
|
13991
13991
|
getUpdatedTimestamp as getUpdatedTimestamp2,
|
|
13992
13992
|
isTestEnv as isTestEnv4
|
|
13993
|
-
} from "@excalidraw
|
|
13993
|
+
} from "@misenkashari/excalidraw-common";
|
|
13994
13994
|
|
|
13995
13995
|
// src/sortElements.ts
|
|
13996
13996
|
init_define_import_meta_env();
|
|
13997
|
-
import { arrayToMapWithIndex } from "@excalidraw
|
|
13997
|
+
import { arrayToMapWithIndex } from "@misenkashari/excalidraw-common";
|
|
13998
13998
|
var normalizeGroupElementOrder = (elements) => {
|
|
13999
13999
|
const origElements = elements.slice();
|
|
14000
14000
|
const sortedElements = /* @__PURE__ */ new Set();
|
|
@@ -15185,7 +15185,7 @@ function generateNKeysBetween(a2, b2, n, digits = BASE_62_DIGITS) {
|
|
|
15185
15185
|
}
|
|
15186
15186
|
|
|
15187
15187
|
// src/fractionalIndex.ts
|
|
15188
|
-
import { arrayToMap as arrayToMap8 } from "@excalidraw
|
|
15188
|
+
import { arrayToMap as arrayToMap8 } from "@misenkashari/excalidraw-common";
|
|
15189
15189
|
var InvalidFractionalIndexError = class extends Error {
|
|
15190
15190
|
code = "ELEMENT_HAS_INVALID_INDEX";
|
|
15191
15191
|
};
|
|
@@ -15434,17 +15434,17 @@ import {
|
|
|
15434
15434
|
isDevEnv as isDevEnv5,
|
|
15435
15435
|
isTestEnv as isTestEnv6,
|
|
15436
15436
|
toArray
|
|
15437
|
-
} from "@excalidraw
|
|
15438
|
-
import { isNonDeletedElement } from "@excalidraw
|
|
15439
|
-
import { isFrameLikeElement as isFrameLikeElement2 } from "@excalidraw
|
|
15440
|
-
import { getElementsInGroup as getElementsInGroup2 } from "@excalidraw
|
|
15437
|
+
} from "@misenkashari/excalidraw-common";
|
|
15438
|
+
import { isNonDeletedElement } from "@misenkashari/excalidraw-element";
|
|
15439
|
+
import { isFrameLikeElement as isFrameLikeElement2 } from "@misenkashari/excalidraw-element";
|
|
15440
|
+
import { getElementsInGroup as getElementsInGroup2 } from "@misenkashari/excalidraw-element";
|
|
15441
15441
|
import {
|
|
15442
15442
|
syncInvalidIndices as syncInvalidIndices2,
|
|
15443
15443
|
syncMovedIndices as syncMovedIndices2,
|
|
15444
15444
|
validateFractionalIndices as validateFractionalIndices2
|
|
15445
|
-
} from "@excalidraw
|
|
15446
|
-
import { getSelectedElements as getSelectedElements2 } from "@excalidraw
|
|
15447
|
-
import { mutateElement as mutateElement2 } from "@excalidraw
|
|
15445
|
+
} from "@misenkashari/excalidraw-element";
|
|
15446
|
+
import { getSelectedElements as getSelectedElements2 } from "@misenkashari/excalidraw-element";
|
|
15447
|
+
import { mutateElement as mutateElement2 } from "@misenkashari/excalidraw-element";
|
|
15448
15448
|
var getNonDeletedElements = (allElements) => {
|
|
15449
15449
|
const elementsMap = /* @__PURE__ */ new Map();
|
|
15450
15450
|
const elements = [];
|
|
@@ -17072,7 +17072,7 @@ import {
|
|
|
17072
17072
|
getGridPoint as getGridPoint2,
|
|
17073
17073
|
getFontString as getFontString4,
|
|
17074
17074
|
DRAGGING_THRESHOLD as DRAGGING_THRESHOLD2
|
|
17075
|
-
} from "@excalidraw
|
|
17075
|
+
} from "@misenkashari/excalidraw-common";
|
|
17076
17076
|
var dragSelectedElements = (pointerDownState, _selectedElements, offset, scene, snapOffset, gridSize) => {
|
|
17077
17077
|
if (_selectedElements.length === 1 && isElbowArrow(_selectedElements[0]) && (_selectedElements[0].startBinding || _selectedElements[0].endBinding)) {
|
|
17078
17078
|
return;
|
|
@@ -17286,7 +17286,7 @@ var dragNewElement = ({
|
|
|
17286
17286
|
|
|
17287
17287
|
// src/elementLink.ts
|
|
17288
17288
|
init_define_import_meta_env();
|
|
17289
|
-
import { ELEMENT_LINK_KEY, normalizeLink } from "@excalidraw
|
|
17289
|
+
import { ELEMENT_LINK_KEY, normalizeLink } from "@misenkashari/excalidraw-common";
|
|
17290
17290
|
var defaultGetElementLinkFromSelection = (id, type) => {
|
|
17291
17291
|
const url = window.location.href;
|
|
17292
17292
|
try {
|
|
@@ -17358,7 +17358,7 @@ import {
|
|
|
17358
17358
|
VERTICAL_ALIGN as VERTICAL_ALIGN3,
|
|
17359
17359
|
escapeDoubleQuotes,
|
|
17360
17360
|
getFontString as getFontString6
|
|
17361
|
-
} from "@excalidraw
|
|
17361
|
+
} from "@misenkashari/excalidraw-common";
|
|
17362
17362
|
|
|
17363
17363
|
// src/newElement.ts
|
|
17364
17364
|
init_define_import_meta_env();
|
|
@@ -17374,7 +17374,7 @@ import {
|
|
|
17374
17374
|
getFontString as getFontString5,
|
|
17375
17375
|
getUpdatedTimestamp as getUpdatedTimestamp3,
|
|
17376
17376
|
getLineHeight
|
|
17377
|
-
} from "@excalidraw
|
|
17377
|
+
} from "@misenkashari/excalidraw-common";
|
|
17378
17378
|
var _newElementBase = (type, {
|
|
17379
17379
|
x,
|
|
17380
17380
|
y,
|
|
@@ -18031,8 +18031,8 @@ var embeddableURLValidator = (url, validateEmbeddable) => {
|
|
|
18031
18031
|
|
|
18032
18032
|
// src/flowchart.ts
|
|
18033
18033
|
init_define_import_meta_env();
|
|
18034
|
-
import { KEYS as KEYS3, invariant as invariant11, toBrandedType as toBrandedType2 } from "@excalidraw
|
|
18035
|
-
import { pointFrom as pointFrom15 } from "@excalidraw
|
|
18034
|
+
import { KEYS as KEYS3, invariant as invariant11, toBrandedType as toBrandedType2 } from "@misenkashari/excalidraw-common";
|
|
18035
|
+
import { pointFrom as pointFrom15 } from "@misenkashari/excalidraw-math";
|
|
18036
18036
|
var VERTICAL_OFFSET = 100;
|
|
18037
18037
|
var HORIZONTAL_OFFSET = 100;
|
|
18038
18038
|
var getLinkDirectionFromKey = (key) => {
|
|
@@ -18500,7 +18500,7 @@ var isNodeInFlowchart = (element, elementsMap) => {
|
|
|
18500
18500
|
|
|
18501
18501
|
// src/image.ts
|
|
18502
18502
|
init_define_import_meta_env();
|
|
18503
|
-
import { MIME_TYPES as MIME_TYPES2, SVG_NS } from "@excalidraw
|
|
18503
|
+
import { MIME_TYPES as MIME_TYPES2, SVG_NS } from "@misenkashari/excalidraw-common";
|
|
18504
18504
|
var loadHTMLImageElement = (dataURL) => {
|
|
18505
18505
|
return new Promise((resolve, reject) => {
|
|
18506
18506
|
const image = new Image();
|
|
@@ -18676,13 +18676,13 @@ import {
|
|
|
18676
18676
|
normalizeRadians as normalizeRadians2,
|
|
18677
18677
|
pointFrom as pointFrom16,
|
|
18678
18678
|
pointRotateRads as pointRotateRads14
|
|
18679
|
-
} from "@excalidraw
|
|
18679
|
+
} from "@misenkashari/excalidraw-math";
|
|
18680
18680
|
import {
|
|
18681
18681
|
MIN_FONT_SIZE,
|
|
18682
18682
|
SHIFT_LOCKING_ANGLE as SHIFT_LOCKING_ANGLE2,
|
|
18683
18683
|
rescalePoints as rescalePoints2,
|
|
18684
18684
|
getFontString as getFontString7
|
|
18685
|
-
} from "@excalidraw
|
|
18685
|
+
} from "@misenkashari/excalidraw-common";
|
|
18686
18686
|
var transformElements = (originalElements, transformHandleType, selectedElements, scene, shouldRotateWithDiscreteAngle2, shouldResizeFromCenter, shouldMaintainAspectRatio, pointerX, pointerY, centerX, centerY) => {
|
|
18687
18687
|
const elementsMap = scene.getNonDeletedElementsMap();
|
|
18688
18688
|
if (selectedElements.length === 1) {
|
|
@@ -19671,17 +19671,17 @@ import {
|
|
|
19671
19671
|
pointFrom as pointFrom18,
|
|
19672
19672
|
pointOnLineSegment,
|
|
19673
19673
|
pointRotateRads as pointRotateRads16
|
|
19674
|
-
} from "@excalidraw
|
|
19674
|
+
} from "@misenkashari/excalidraw-math";
|
|
19675
19675
|
import {
|
|
19676
19676
|
SIDE_RESIZING_THRESHOLD
|
|
19677
|
-
} from "@excalidraw
|
|
19677
|
+
} from "@misenkashari/excalidraw-common";
|
|
19678
19678
|
|
|
19679
19679
|
// src/transformHandles.ts
|
|
19680
19680
|
init_define_import_meta_env();
|
|
19681
19681
|
import {
|
|
19682
19682
|
DEFAULT_TRANSFORM_HANDLE_SPACING
|
|
19683
|
-
} from "@excalidraw
|
|
19684
|
-
import { pointFrom as pointFrom17, pointRotateRads as pointRotateRads15 } from "@excalidraw
|
|
19683
|
+
} from "@misenkashari/excalidraw-common";
|
|
19684
|
+
import { pointFrom as pointFrom17, pointRotateRads as pointRotateRads15 } from "@misenkashari/excalidraw-math";
|
|
19685
19685
|
var transformHandleSizes = {
|
|
19686
19686
|
mouse: 8,
|
|
19687
19687
|
pen: 16,
|
|
@@ -20078,7 +20078,7 @@ var showSelectedShapeActions = (appState, elements) => Boolean(
|
|
|
20078
20078
|
|
|
20079
20079
|
// src/transform.ts
|
|
20080
20080
|
init_define_import_meta_env();
|
|
20081
|
-
import { pointFrom as pointFrom19 } from "@excalidraw
|
|
20081
|
+
import { pointFrom as pointFrom19 } from "@misenkashari/excalidraw-math";
|
|
20082
20082
|
import {
|
|
20083
20083
|
DEFAULT_FONT_FAMILY as DEFAULT_FONT_FAMILY3,
|
|
20084
20084
|
DEFAULT_FONT_SIZE as DEFAULT_FONT_SIZE4,
|
|
@@ -20093,7 +20093,7 @@ import {
|
|
|
20093
20093
|
isDevEnv as isDevEnv7,
|
|
20094
20094
|
toBrandedType as toBrandedType3,
|
|
20095
20095
|
getLineHeight as getLineHeight2
|
|
20096
|
-
} from "@excalidraw
|
|
20096
|
+
} from "@misenkashari/excalidraw-common";
|
|
20097
20097
|
var DEFAULT_LINEAR_ELEMENT_PROPS = {
|
|
20098
20098
|
width: 100,
|
|
20099
20099
|
height: 0
|
|
@@ -20588,7 +20588,7 @@ var convertToExcalidrawElements = (elementsSkeleton, opts) => {
|
|
|
20588
20588
|
|
|
20589
20589
|
// src/zindex.ts
|
|
20590
20590
|
init_define_import_meta_env();
|
|
20591
|
-
import { arrayToMap as arrayToMap12, findIndex, findLastIndex as findLastIndex2 } from "@excalidraw
|
|
20591
|
+
import { arrayToMap as arrayToMap12, findIndex, findLastIndex as findLastIndex2 } from "@misenkashari/excalidraw-common";
|
|
20592
20592
|
var isOfTargetFrame = (element, frameId) => {
|
|
20593
20593
|
return element.frameId === frameId || element.id === frameId;
|
|
20594
20594
|
};
|