@myoc/common 0.19.502-ff5a131b0 → 0.19.503
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 +313 -21
- package/dist/dev/index.js.map +3 -3
- package/dist/prod/index.js +3 -3
- package/dist/types/common/debug.d.ts +21 -0
- package/dist/types/common/src/appEventBus.d.ts +27 -0
- package/dist/types/common/src/colors.d.ts +13 -13
- package/dist/types/common/src/constants.d.ts +3 -0
- package/dist/types/common/src/index.d.ts +3 -0
- package/dist/types/common/src/utils.d.ts +4 -7
- package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
- package/dist/types/element/src/Scene.d.ts +2 -0
- package/dist/types/element/src/arrowheads.d.ts +3 -0
- package/dist/types/element/src/arrows/focus.d.ts +27 -0
- package/dist/types/element/src/arrows/helpers.d.ts +5 -0
- package/dist/types/element/src/binding.d.ts +13 -8
- package/dist/types/element/src/bounds.d.ts +1 -1
- package/dist/types/element/src/collision.d.ts +4 -3
- package/dist/types/element/src/distribute.d.ts +2 -1
- package/dist/types/element/src/elbowArrow.d.ts +2 -0
- package/dist/types/element/src/index.d.ts +4 -0
- package/dist/types/element/src/linearElementEditor.d.ts +5 -0
- package/dist/types/element/src/mutateElement.d.ts +2 -0
- package/dist/types/element/src/selection.d.ts +6 -2
- package/dist/types/element/src/shapes.d.ts +2 -22
- package/dist/types/element/src/textElement.d.ts +1 -1
- package/dist/types/element/src/textWrapping.d.ts +26 -0
- package/dist/types/element/src/types.d.ts +5 -2
- package/dist/types/element/src/utils.d.ts +5 -3
- package/dist/types/element/src/zindex.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +38 -35
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +27 -25
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +143 -132
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +26 -24
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +42 -37
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +9 -12
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +26 -24
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionExport.d.ts +112 -405
- package/dist/types/excalidraw/actions/actionFrame.d.ts +52 -48
- package/dist/types/excalidraw/actions/actionGroup.d.ts +29 -27
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +15 -12
- package/dist/types/excalidraw/actions/actionLink.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionMenu.d.ts +9 -12
- package/dist/types/excalidraw/actions/actionProperties.d.ts +29 -27
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +14 -13
- package/dist/types/excalidraw/actions/actionStyles.d.ts +13 -11
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +181 -0
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +181 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +9 -12
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +13 -12
- package/dist/types/excalidraw/actions/index.d.ts +2 -0
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/appState.d.ts +34 -32
- package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
- package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
- package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
- package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
- package/dist/types/excalidraw/charts/index.d.ts +7 -0
- package/dist/types/excalidraw/clipboard.d.ts +8 -9
- package/dist/types/excalidraw/components/App.d.ts +55 -13
- package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
- package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -1
- package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
- package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
- package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
- package/dist/types/excalidraw/components/Range.d.ts +10 -4
- package/dist/types/excalidraw/components/Toast.d.ts +8 -4
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -17
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +3 -2
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +11 -13
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
- package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
- package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
- package/dist/types/excalidraw/components/icons.d.ts +23 -9
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +17 -0
- package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +23 -13
- package/dist/types/excalidraw/data/blob.d.ts +163 -162
- package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
- package/dist/types/excalidraw/data/index.d.ts +2 -3
- package/dist/types/excalidraw/data/json.d.ts +92 -83
- package/dist/types/excalidraw/data/resave.d.ts +7 -2
- package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
- package/dist/types/excalidraw/index.d.ts +25 -3
- package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
- package/dist/types/excalidraw/types.d.ts +93 -16
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
- package/dist/types/math/src/point.d.ts +7 -2
- package/dist/types/math/src/types.d.ts +25 -1
- package/package.json +1 -1
- package/dist/types/excalidraw/charts.d.ts +0 -27
|
@@ -43,7 +43,7 @@ export declare const getBoundsFromPoints: (points: ExcalidrawFreeDrawElement["po
|
|
|
43
43
|
export declare const getArrowheadSize: (arrowhead: Arrowhead) => number;
|
|
44
44
|
/** @returns number in degrees */
|
|
45
45
|
export declare const getArrowheadAngle: (arrowhead: Arrowhead) => Degrees;
|
|
46
|
-
export declare const getArrowheadPoints: (element: ExcalidrawLinearElement, shape: Drawable[], position: "start" | "end", arrowhead: Arrowhead) => number[] | null;
|
|
46
|
+
export declare const getArrowheadPoints: (element: ExcalidrawLinearElement, shape: Drawable[], position: "start" | "end", arrowhead: Arrowhead, offsetMultiplier?: number) => number[] | null;
|
|
47
47
|
export declare const getElementBounds: (element: ExcalidrawElement, elementsMap: ElementsMap, nonRotated?: boolean) => Bounds;
|
|
48
48
|
export declare const getCommonBounds: (elements: ElementsMapOrArray, elementsMap?: ElementsMap) => Bounds;
|
|
49
49
|
export declare const getDraggedElementsBounds: (elements: ExcalidrawElement[], dragOffset: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GlobalPoint, LineSegment } from "@excalidraw/math";
|
|
2
2
|
import type { FrameNameBounds } from "@excalidraw/excalidraw/types";
|
|
3
|
-
import type { ElementsMap, ExcalidrawBindableElement, ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, NonDeletedSceneElementsMap, Ordered } from "./types";
|
|
3
|
+
import type { ElementsMap, ExcalidrawArrowElement, ExcalidrawBindableElement, ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, NonDeletedSceneElementsMap, Ordered } from "./types";
|
|
4
4
|
export declare const shouldTestInside: (element: ExcalidrawElement) => boolean;
|
|
5
5
|
export type HitTestArgs = {
|
|
6
6
|
point: GlobalPoint;
|
|
@@ -14,8 +14,9 @@ export declare const hitElementItself: ({ point, element, threshold, elementsMap
|
|
|
14
14
|
export declare const hitElementBoundingBox: (point: GlobalPoint, element: ExcalidrawElement, elementsMap: ElementsMap, tolerance?: number) => boolean;
|
|
15
15
|
export declare const hitElementBoundingBoxOnly: (hitArgs: HitTestArgs, elementsMap: ElementsMap) => boolean;
|
|
16
16
|
export declare const hitElementBoundText: (point: GlobalPoint, element: ExcalidrawElement, elementsMap: ElementsMap) => boolean;
|
|
17
|
-
export declare const getAllHoveredElementAtPoint: (point: Readonly<GlobalPoint>, elements: readonly Ordered<NonDeletedExcalidrawElement>[], elementsMap: NonDeletedSceneElementsMap,
|
|
18
|
-
export declare const getHoveredElementForBinding: (point: Readonly<GlobalPoint>, elements: readonly Ordered<NonDeletedExcalidrawElement>[], elementsMap: NonDeletedSceneElementsMap,
|
|
17
|
+
export declare const getAllHoveredElementAtPoint: (point: Readonly<GlobalPoint>, elements: readonly Ordered<NonDeletedExcalidrawElement>[], elementsMap: NonDeletedSceneElementsMap, tolerance?: number) => NonDeleted<ExcalidrawBindableElement>[];
|
|
18
|
+
export declare const getHoveredElementForBinding: (point: Readonly<GlobalPoint>, elements: readonly Ordered<NonDeletedExcalidrawElement>[], elementsMap: NonDeletedSceneElementsMap, tolerance?: number) => NonDeleted<ExcalidrawBindableElement> | null;
|
|
19
|
+
export declare const getHoveredElementForFocusPoint: (point: GlobalPoint, arrow: ExcalidrawArrowElement, elements: readonly Ordered<NonDeletedExcalidrawElement>[], elementsMap: NonDeletedSceneElementsMap, tolerance?: number) => ExcalidrawBindableElement | null;
|
|
19
20
|
/**
|
|
20
21
|
* Intersect a line with an element for binding test
|
|
21
22
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
2
|
+
import type { Scene } from "./Scene";
|
|
2
3
|
import type { ElementsMap, ExcalidrawElement } from "./types";
|
|
3
4
|
export interface Distribution {
|
|
4
5
|
space: "between";
|
|
5
6
|
axis: "x" | "y";
|
|
6
7
|
}
|
|
7
|
-
export declare const distributeElements: (selectedElements: ExcalidrawElement[], elementsMap: ElementsMap, distribution: Distribution, appState: Readonly<AppState
|
|
8
|
+
export declare const distributeElements: (selectedElements: ExcalidrawElement[], elementsMap: ElementsMap, distribution: Distribution, appState: Readonly<AppState>, scene: Scene) => ExcalidrawElement[];
|
|
@@ -13,5 +13,7 @@ export declare const updateElbowArrowPoints: (arrow: Readonly<ExcalidrawElbowArr
|
|
|
13
13
|
endBinding?: FixedPointBinding | null;
|
|
14
14
|
}, options?: {
|
|
15
15
|
isDragging?: boolean;
|
|
16
|
+
isBindingEnabled?: boolean;
|
|
17
|
+
isMidpointSnappingEnabled?: boolean;
|
|
16
18
|
}) => ElementUpdate<ExcalidrawElbowArrowElement>;
|
|
17
19
|
export declare const validateElbowPoints: <P extends GlobalPoint | LocalPoint>(points: readonly P[], tolerance?: number) => boolean;
|
|
@@ -28,6 +28,7 @@ export * from "./elbowArrow";
|
|
|
28
28
|
export * from "./elementLink";
|
|
29
29
|
export * from "./embeddable";
|
|
30
30
|
export * from "./flowchart";
|
|
31
|
+
export * from "./arrows/focus";
|
|
31
32
|
export * from "./fractionalIndex";
|
|
32
33
|
export * from "./frame";
|
|
33
34
|
export * from "./groups";
|
|
@@ -44,6 +45,7 @@ export * from "./resizeTest";
|
|
|
44
45
|
export * from "./Scene";
|
|
45
46
|
export * from "./selection";
|
|
46
47
|
export * from "./shape";
|
|
48
|
+
export * from "./shapes";
|
|
47
49
|
export * from "./showSelectedShapeActions";
|
|
48
50
|
export * from "./sizeHelpers";
|
|
49
51
|
export * from "./sortElements";
|
|
@@ -56,3 +58,5 @@ export * from "./transformHandles";
|
|
|
56
58
|
export * from "./typeChecks";
|
|
57
59
|
export * from "./utils";
|
|
58
60
|
export * from "./zindex";
|
|
61
|
+
export * from "./arrows/helpers";
|
|
62
|
+
export * from "./arrowheads";
|
|
@@ -33,6 +33,8 @@ export declare class LinearElementEditor {
|
|
|
33
33
|
}>;
|
|
34
34
|
readonly hoverPointIndex: number;
|
|
35
35
|
readonly segmentMidPointHoveredCoords: GlobalPoint | null;
|
|
36
|
+
readonly hoveredFocusPointBinding: "start" | "end" | null;
|
|
37
|
+
readonly draggedFocusPointBinding: "start" | "end" | null;
|
|
36
38
|
readonly elbowed: boolean;
|
|
37
39
|
readonly customLineAngle: number | null;
|
|
38
40
|
readonly isEditing: boolean;
|
|
@@ -94,6 +96,9 @@ export declare class LinearElementEditor {
|
|
|
94
96
|
startBinding?: FixedPointBinding | null;
|
|
95
97
|
endBinding?: FixedPointBinding | null;
|
|
96
98
|
moveMidPointsWithElement?: boolean | null;
|
|
99
|
+
}, options?: {
|
|
100
|
+
isBindingEnabled?: boolean;
|
|
101
|
+
isMidpointSnappingEnabled?: boolean;
|
|
97
102
|
}): void;
|
|
98
103
|
static shouldAddMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, appState: AppState, elementsMap: ElementsMap): boolean;
|
|
99
104
|
static addMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, app: AppClassProperties, snapToGrid: boolean, scene: Scene): {
|
|
@@ -11,6 +11,8 @@ export type ElementUpdate<TElement extends ExcalidrawElement> = Omit<Partial<TEl
|
|
|
11
11
|
*/
|
|
12
12
|
export declare const mutateElement: <TElement extends Mutable<ExcalidrawElement>>(element: TElement, elementsMap: ElementsMap, updates: ElementUpdate<TElement>, options?: {
|
|
13
13
|
isDragging?: boolean;
|
|
14
|
+
isBindingEnabled?: boolean;
|
|
15
|
+
isMidpointSnappingEnabled?: boolean;
|
|
14
16
|
}) => TElement;
|
|
15
17
|
export declare const newElementWith: <TElement extends ExcalidrawElement>(element: TElement, updates: ElementUpdate<TElement>,
|
|
16
18
|
/** pass `true` to always regenerate */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AppState, InteractiveCanvasAppState } from "@excalidraw/excalidraw/types";
|
|
2
2
|
import { LinearElementEditor } from "./linearElementEditor";
|
|
3
|
-
import type { ElementsMap, ElementsMapOrArray, ExcalidrawElement, NonDeletedExcalidrawElement } from "./types";
|
|
3
|
+
import type { ElementsMap, ElementsMapOrArray, ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement } from "./types";
|
|
4
4
|
/**
|
|
5
5
|
* Frames and their containing elements are not to be selected at the same time.
|
|
6
6
|
* Given an array of selected elements, if there are frames and their containing elements
|
|
@@ -27,8 +27,12 @@ export declare const makeNextSelectedElementIds: (nextSelectedElementIds: AppSta
|
|
|
27
27
|
[id: string]: true;
|
|
28
28
|
}>;
|
|
29
29
|
export declare const getSelectionStateForElements: (targetElements: readonly ExcalidrawElement[], allElements: readonly NonDeletedExcalidrawElement[], appState: AppState) => {
|
|
30
|
-
editingGroupId: AppState["editingGroupId"];
|
|
31
30
|
selectedElementIds: AppState["selectedElementIds"];
|
|
32
31
|
selectedGroupIds: AppState["selectedGroupIds"];
|
|
32
|
+
editingGroupId: AppState["editingGroupId"];
|
|
33
33
|
selectedLinearElement: LinearElementEditor | null;
|
|
34
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* Returns editing or single-selected text element, if any.
|
|
37
|
+
*/
|
|
38
|
+
export declare const getActiveTextElement: (selectedElements: readonly NonDeleted<ExcalidrawElement>[], appState: Pick<AppState, "editingTextElement">) => import("./types").ExcalidrawTextElement | null;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
|
|
2
2
|
import { type GeometricShape } from "@excalidraw/utils/shape";
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { ExcalidrawElement, ElementsMap, NonDeleted, ExcalidrawLinearElement, NonDeletedSceneElementsMap } from "./types";
|
|
3
|
+
import type { AppClassProperties } from "@excalidraw/excalidraw/types";
|
|
4
|
+
import type { ExcalidrawElement, ElementsMap } from "./types";
|
|
6
5
|
export type ToolCategory = "manipulation" | "elements";
|
|
7
6
|
export declare const SHAPES: readonly [{
|
|
8
7
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -223,23 +222,4 @@ export declare const getToolbarTools: (app: AppClassProperties) => readonly [{
|
|
|
223
222
|
readonly myocSimplifiedMode: true;
|
|
224
223
|
})[]];
|
|
225
224
|
export declare const findShapeByKey: (key: string, app: AppClassProperties) => "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "lasso" | "eraser" | null;
|
|
226
|
-
/**
|
|
227
|
-
* get the pure geometric shape of an excalidraw elementw
|
|
228
|
-
* which is then used for hit detection
|
|
229
|
-
*/
|
|
230
|
-
export declare const getElementShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawElement, elementsMap: ElementsMap) => GeometricShape<Point>;
|
|
231
225
|
export declare const getBoundTextShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawElement, elementsMap: ElementsMap) => GeometricShape<Point> | null;
|
|
232
|
-
export declare const getControlPointsForBezierCurve: <P extends GlobalPoint | LocalPoint>(element: NonDeleted<ExcalidrawLinearElement>, endPoint: P) => P[] | null;
|
|
233
|
-
export declare const getBezierXY: <P extends GlobalPoint | LocalPoint>(p0: P, p1: P, p2: P, p3: P, t: number) => P;
|
|
234
|
-
export declare const getBezierCurveLength: <P extends GlobalPoint | LocalPoint>(element: NonDeleted<ExcalidrawLinearElement>, endPoint: P) => number;
|
|
235
|
-
export declare const mapIntervalToBezierT: <P extends GlobalPoint | LocalPoint>(element: NonDeleted<ExcalidrawLinearElement>, endPoint: P, interval: number) => number;
|
|
236
|
-
/**
|
|
237
|
-
* Get the axis-aligned bounding box for a given element
|
|
238
|
-
*/
|
|
239
|
-
export declare const aabbForElement: (element: Readonly<ExcalidrawElement>, elementsMap: NonDeletedSceneElementsMap, offset?: [number, number, number, number]) => Bounds;
|
|
240
|
-
export declare const pointInsideBounds: <P extends GlobalPoint | LocalPoint>(p: P, bounds: Bounds) => boolean;
|
|
241
|
-
export declare const aabbsOverlapping: (a: Bounds, b: Bounds) => boolean;
|
|
242
|
-
export declare const getCornerRadius: (x: number, element: ExcalidrawElement) => number;
|
|
243
|
-
export declare const isPathALoop: (points: ExcalidrawLinearElement["points"],
|
|
244
|
-
/** supply if you want the loop detection to account for current zoom */
|
|
245
|
-
zoomValue?: Zoom["value"]) => boolean;
|
|
@@ -31,7 +31,7 @@ export declare const suppportsHorizontalAlign: (selectedElements: NonDeletedExca
|
|
|
31
31
|
declare const VALID_CONTAINER_TYPES: Set<string>;
|
|
32
32
|
export declare const isValidTextContainer: (element: {
|
|
33
33
|
type: ExcalidrawElementType;
|
|
34
|
-
}) =>
|
|
34
|
+
}) => element is ExcalidrawTextContainer;
|
|
35
35
|
export declare const computeContainerDimensionForBoundText: (dimension: number, containerType: ExtractSetType<typeof VALID_CONTAINER_TYPES>) => number;
|
|
36
36
|
export declare const getBoundTextMaxWidth: (container: ExcalidrawElement, boundTextElement: ExcalidrawTextElement | null) => number;
|
|
37
37
|
export declare const getBoundTextMaxHeight: (container: ExcalidrawElement, boundTextElement: ExcalidrawTextElementWithContainer) => number;
|
|
@@ -5,9 +5,35 @@ import type { FontString } from "./types";
|
|
|
5
5
|
export declare const containsCJK: (text: string) => boolean;
|
|
6
6
|
/**
|
|
7
7
|
* Breaks the line into the tokens based on the found line break opporutnities.
|
|
8
|
+
*
|
|
9
|
+
* Note: tokenization normalizes to NFC first so decomposed graphemes are treated as
|
|
10
|
+
* their composed variants for wrapping. Any code that needs exact source offsets should
|
|
11
|
+
* keep in mind that this assumes the input text is already NFC-normalized.
|
|
8
12
|
*/
|
|
9
13
|
export declare const parseTokens: (line: string) => string[];
|
|
10
14
|
/**
|
|
11
15
|
* Wraps the original text into the lines based on the given width.
|
|
16
|
+
*
|
|
17
|
+
* This is a convenience adapter over `getWrappedTextLines()` for call sites
|
|
18
|
+
* that only need the rendered wrapped string and not the source offsets.
|
|
12
19
|
*/
|
|
13
20
|
export declare const wrapText: (text: string, font: FontString, maxWidth: number) => string;
|
|
21
|
+
/**
|
|
22
|
+
* A single rendered visual line produced from the original text.
|
|
23
|
+
*
|
|
24
|
+
* `start` and `end` are end-exclusive code-unit offsets into the original text, and do
|
|
25
|
+
* not include synthetic soft line breaks inserted by this module. If trailing whitespace
|
|
26
|
+
* was trimmed away at a wrap boundary, `end` points to the last rendered character.
|
|
27
|
+
*/
|
|
28
|
+
export type WrappedTextLine = {
|
|
29
|
+
text: string;
|
|
30
|
+
start: number;
|
|
31
|
+
end: number;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Returns the rendered visual lines together with their source offsets.
|
|
35
|
+
*
|
|
36
|
+
* This is the source-of-truth wrapping pipeline for callers that need more than the
|
|
37
|
+
* final wrapped string, for example caret placement or future editor/rich-text mapping.
|
|
38
|
+
*/
|
|
39
|
+
export declare const getWrappedTextLines: (text: string, font: FontString, maxWidth: number) => WrappedTextLine[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LocalPoint, Radians } from "@excalidraw/math";
|
|
2
2
|
import type { FONT_FAMILY, ROUNDNESS, TEXT_ALIGN, THEME, VERTICAL_ALIGN } from "@excalidraw/common";
|
|
3
3
|
import type { MakeBrand, MarkNonNullable, Merge, ValueOf } from "@excalidraw/common/utility-types";
|
|
4
|
-
export type ChartType = "bar" | "line";
|
|
4
|
+
export type ChartType = "bar" | "line" | "radar";
|
|
5
5
|
export type FillStyle = "hachure" | "cross-hatch" | "solid" | "zigzag";
|
|
6
6
|
export type FontFamilyKeys = keyof typeof FONT_FAMILY;
|
|
7
7
|
export type FontFamilyValues = typeof FONT_FAMILY[FontFamilyKeys];
|
|
@@ -208,7 +208,10 @@ export type PointsPositionUpdates = Map<Index, {
|
|
|
208
208
|
point: LocalPoint;
|
|
209
209
|
isDragging?: boolean;
|
|
210
210
|
}>;
|
|
211
|
-
export type
|
|
211
|
+
export type CardinalityArrowhead = "cardinality_one" | "cardinality_many" | "cardinality_one_or_many" | "cardinality_exactly_one" | "cardinality_zero_or_one" | "cardinality_zero_or_many";
|
|
212
|
+
export type ArrowheadLegacy = "dot" | "crowfoot_one" | "crowfoot_many" | "crowfoot_one_or_many";
|
|
213
|
+
export type Arrowhead = "arrow" | "bar" | "circle" | "circle_outline" | "triangle" | "triangle_outline" | "diamond" | "diamond_outline" | CardinalityArrowhead;
|
|
214
|
+
export type AnyArrowhead = Arrowhead | ArrowheadLegacy;
|
|
212
215
|
export type ExcalidrawLinearElement = _ExcalidrawElementBase & Readonly<{
|
|
213
216
|
type: "line" | "arrow";
|
|
214
217
|
points: readonly LocalPoint[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type GlobalPoint } from "@excalidraw/math";
|
|
2
2
|
import type { Curve, LineSegment } from "@excalidraw/math";
|
|
3
|
-
import type { Zoom } from "@excalidraw/excalidraw/types";
|
|
4
|
-
import type { ElementsMap, ExcalidrawArrowElement, ExcalidrawDiamondElement, ExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawLinearElement, ExcalidrawRectanguloidElement } from "./types";
|
|
3
|
+
import type { AppState, Zoom } from "@excalidraw/excalidraw/types";
|
|
4
|
+
import type { ElementsMap, ExcalidrawArrowElement, ExcalidrawBindableElement, ExcalidrawDiamondElement, ExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawLinearElement, ExcalidrawRectanguloidElement } from "./types";
|
|
5
5
|
/**
|
|
6
6
|
* Returns the **rotated** components of freedraw, line or arrow elements.
|
|
7
7
|
*
|
|
@@ -18,6 +18,7 @@ export declare function deconstructLinearOrFreeDrawElement(element: ExcalidrawLi
|
|
|
18
18
|
* @returns Tuple of **unrotated** line segments (0) and curves (1)
|
|
19
19
|
*/
|
|
20
20
|
export declare function deconstructRectanguloidElement(element: ExcalidrawRectanguloidElement, offset?: number): [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
|
|
21
|
+
export declare function getDiamondBaseCorners(element: ExcalidrawDiamondElement, offset?: number): Curve<GlobalPoint>[];
|
|
21
22
|
/**
|
|
22
23
|
* Get the **unrotated** building components of a diamond element
|
|
23
24
|
* in the form of line segments and curves as a tuple, in this order.
|
|
@@ -31,4 +32,5 @@ export declare const isPathALoop: (points: ExcalidrawLinearElement["points"],
|
|
|
31
32
|
/** supply if you want the loop detection to account for current zoom */
|
|
32
33
|
zoomValue?: Zoom["value"]) => boolean;
|
|
33
34
|
export declare const getCornerRadius: (x: number, element: ExcalidrawElement) => number;
|
|
34
|
-
export declare const
|
|
35
|
+
export declare const getSnapOutlineMidPoint: (point: GlobalPoint, element: ExcalidrawBindableElement, elementsMap: ElementsMap, zoom: AppState["zoom"]) => GlobalPoint | undefined;
|
|
36
|
+
export declare const projectFixedPointOntoDiagonal: (arrow: ExcalidrawArrowElement, point: GlobalPoint, element: ExcalidrawBindableElement, startOrEnd: "start" | "end", elementsMap: ElementsMap, zoom: AppState["zoom"], isMidpointSnappingEnabled?: boolean) => GlobalPoint | null;
|
|
@@ -6,7 +6,7 @@ import type { ExcalidrawArrowElement, ExcalidrawElement, NonDeletedExcalidrawEle
|
|
|
6
6
|
* Moves the arrow element above any bindable elements it intersects with or
|
|
7
7
|
* hovers over.
|
|
8
8
|
*/
|
|
9
|
-
export declare const moveArrowAboveBindable: (point: GlobalPoint, arrow: ExcalidrawArrowElement, elements: readonly Ordered<NonDeletedExcalidrawElement>[], elementsMap: NonDeletedSceneElementsMap, scene: Scene) => readonly OrderedExcalidrawElement[];
|
|
9
|
+
export declare const moveArrowAboveBindable: (point: GlobalPoint, arrow: ExcalidrawArrowElement, elements: readonly Ordered<NonDeletedExcalidrawElement>[], elementsMap: NonDeletedSceneElementsMap, scene: Scene, hit?: NonDeletedExcalidrawElement) => readonly OrderedExcalidrawElement[];
|
|
10
10
|
export declare const moveOneLeft: (allElements: readonly ExcalidrawElement[], appState: AppState, scene: Scene) => readonly ExcalidrawElement[];
|
|
11
11
|
export declare const moveOneRight: (allElements: readonly ExcalidrawElement[], appState: AppState, scene: Scene) => readonly ExcalidrawElement[];
|
|
12
12
|
export declare const moveAllLeft: (allElements: readonly ExcalidrawElement[], appState: AppState) => readonly ExcalidrawElement[] | ExcalidrawElement[];
|
|
@@ -38,8 +38,13 @@ export declare const actionAddToLibrary: {
|
|
|
38
38
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
39
39
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
40
40
|
isBindingEnabled: boolean;
|
|
41
|
+
bindingPreference: "enabled" | "disabled";
|
|
42
|
+
isMidpointSnappingEnabled: boolean;
|
|
41
43
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
42
|
-
suggestedBinding:
|
|
44
|
+
suggestedBinding: {
|
|
45
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
46
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
47
|
+
} | null;
|
|
43
48
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
44
49
|
frameRendering: {
|
|
45
50
|
enabled: boolean;
|
|
@@ -49,7 +54,7 @@ export declare const actionAddToLibrary: {
|
|
|
49
54
|
};
|
|
50
55
|
editingFrame: string | null;
|
|
51
56
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
52
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
57
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
53
58
|
activeTool: {
|
|
54
59
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
55
60
|
locked: boolean;
|
|
@@ -104,6 +109,10 @@ export declare const actionAddToLibrary: {
|
|
|
104
109
|
} | {
|
|
105
110
|
name: "elementLinkSelector";
|
|
106
111
|
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
112
|
+
} | {
|
|
113
|
+
name: "charts";
|
|
114
|
+
data: import("../charts").Spreadsheet;
|
|
115
|
+
rawText: string;
|
|
107
116
|
};
|
|
108
117
|
defaultSidebarDockedPreference: boolean;
|
|
109
118
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -132,20 +141,12 @@ export declare const actionAddToLibrary: {
|
|
|
132
141
|
height: number;
|
|
133
142
|
offsetTop: number;
|
|
134
143
|
offsetLeft: number;
|
|
135
|
-
fileHandle:
|
|
144
|
+
fileHandle: FileSystemFileHandle | null;
|
|
136
145
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
137
146
|
stats: {
|
|
138
147
|
open: boolean;
|
|
139
148
|
panels: number;
|
|
140
149
|
};
|
|
141
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
142
|
-
pasteDialog: {
|
|
143
|
-
shown: false;
|
|
144
|
-
data: null;
|
|
145
|
-
} | {
|
|
146
|
-
shown: true;
|
|
147
|
-
data: import("../charts").Spreadsheet;
|
|
148
|
-
};
|
|
149
150
|
showHyperlinkPopup: false | "info" | "editor";
|
|
150
151
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
151
152
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -200,8 +201,13 @@ export declare const actionAddToLibrary: {
|
|
|
200
201
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
201
202
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
202
203
|
isBindingEnabled: boolean;
|
|
204
|
+
bindingPreference: "enabled" | "disabled";
|
|
205
|
+
isMidpointSnappingEnabled: boolean;
|
|
203
206
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
204
|
-
suggestedBinding:
|
|
207
|
+
suggestedBinding: {
|
|
208
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
209
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
210
|
+
} | null;
|
|
205
211
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
206
212
|
frameRendering: {
|
|
207
213
|
enabled: boolean;
|
|
@@ -211,7 +217,7 @@ export declare const actionAddToLibrary: {
|
|
|
211
217
|
};
|
|
212
218
|
editingFrame: string | null;
|
|
213
219
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
214
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
220
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
215
221
|
activeTool: {
|
|
216
222
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
217
223
|
locked: boolean;
|
|
@@ -266,6 +272,10 @@ export declare const actionAddToLibrary: {
|
|
|
266
272
|
} | {
|
|
267
273
|
name: "elementLinkSelector";
|
|
268
274
|
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
275
|
+
} | {
|
|
276
|
+
name: "charts";
|
|
277
|
+
data: import("../charts").Spreadsheet;
|
|
278
|
+
rawText: string;
|
|
269
279
|
};
|
|
270
280
|
defaultSidebarDockedPreference: boolean;
|
|
271
281
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -281,7 +291,7 @@ export declare const actionAddToLibrary: {
|
|
|
281
291
|
selectedElementsAreBeingDragged: boolean;
|
|
282
292
|
shouldCacheIgnoreZoom: boolean;
|
|
283
293
|
toast: {
|
|
284
|
-
message:
|
|
294
|
+
message: React.ReactNode;
|
|
285
295
|
closable?: boolean;
|
|
286
296
|
duration?: number;
|
|
287
297
|
} | null;
|
|
@@ -299,20 +309,12 @@ export declare const actionAddToLibrary: {
|
|
|
299
309
|
height: number;
|
|
300
310
|
offsetTop: number;
|
|
301
311
|
offsetLeft: number;
|
|
302
|
-
fileHandle:
|
|
312
|
+
fileHandle: FileSystemFileHandle | null;
|
|
303
313
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
304
314
|
stats: {
|
|
305
315
|
open: boolean;
|
|
306
316
|
panels: number;
|
|
307
317
|
};
|
|
308
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
309
|
-
pasteDialog: {
|
|
310
|
-
shown: false;
|
|
311
|
-
data: null;
|
|
312
|
-
} | {
|
|
313
|
-
shown: true;
|
|
314
|
-
data: import("../charts").Spreadsheet;
|
|
315
|
-
};
|
|
316
318
|
showHyperlinkPopup: false | "info" | "editor";
|
|
317
319
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
318
320
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -367,8 +369,13 @@ export declare const actionAddToLibrary: {
|
|
|
367
369
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
368
370
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
369
371
|
isBindingEnabled: boolean;
|
|
372
|
+
bindingPreference: "enabled" | "disabled";
|
|
373
|
+
isMidpointSnappingEnabled: boolean;
|
|
370
374
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
371
|
-
suggestedBinding:
|
|
375
|
+
suggestedBinding: {
|
|
376
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
377
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
378
|
+
} | null;
|
|
372
379
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
373
380
|
frameRendering: {
|
|
374
381
|
enabled: boolean;
|
|
@@ -378,7 +385,7 @@ export declare const actionAddToLibrary: {
|
|
|
378
385
|
};
|
|
379
386
|
editingFrame: string | null;
|
|
380
387
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
381
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
388
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
382
389
|
activeTool: {
|
|
383
390
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
384
391
|
locked: boolean;
|
|
@@ -433,6 +440,10 @@ export declare const actionAddToLibrary: {
|
|
|
433
440
|
} | {
|
|
434
441
|
name: "elementLinkSelector";
|
|
435
442
|
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
443
|
+
} | {
|
|
444
|
+
name: "charts";
|
|
445
|
+
data: import("../charts").Spreadsheet;
|
|
446
|
+
rawText: string;
|
|
436
447
|
};
|
|
437
448
|
defaultSidebarDockedPreference: boolean;
|
|
438
449
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -448,7 +459,7 @@ export declare const actionAddToLibrary: {
|
|
|
448
459
|
selectedElementsAreBeingDragged: boolean;
|
|
449
460
|
shouldCacheIgnoreZoom: boolean;
|
|
450
461
|
toast: {
|
|
451
|
-
message:
|
|
462
|
+
message: React.ReactNode;
|
|
452
463
|
closable?: boolean;
|
|
453
464
|
duration?: number;
|
|
454
465
|
} | null;
|
|
@@ -466,20 +477,12 @@ export declare const actionAddToLibrary: {
|
|
|
466
477
|
height: number;
|
|
467
478
|
offsetTop: number;
|
|
468
479
|
offsetLeft: number;
|
|
469
|
-
fileHandle:
|
|
480
|
+
fileHandle: FileSystemFileHandle | null;
|
|
470
481
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
471
482
|
stats: {
|
|
472
483
|
open: boolean;
|
|
473
484
|
panels: number;
|
|
474
485
|
};
|
|
475
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
476
|
-
pasteDialog: {
|
|
477
|
-
shown: false;
|
|
478
|
-
data: null;
|
|
479
|
-
} | {
|
|
480
|
-
shown: true;
|
|
481
|
-
data: import("../charts").Spreadsheet;
|
|
482
|
-
};
|
|
483
486
|
showHyperlinkPopup: false | "info" | "editor";
|
|
484
487
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
485
488
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExcalidrawElement, ExcalidrawLinearElement } from "@excalidraw/element/types";
|
|
1
|
+
import type { ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextElement } from "@excalidraw/element/types";
|
|
2
2
|
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
3
3
|
import type { AppState } from "../types";
|
|
4
4
|
export declare const actionUnbindText: {
|
|
@@ -58,8 +58,13 @@ export declare const actionBindText: {
|
|
|
58
58
|
multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
59
59
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
60
60
|
isBindingEnabled: boolean;
|
|
61
|
+
bindingPreference: "enabled" | "disabled";
|
|
62
|
+
isMidpointSnappingEnabled: boolean;
|
|
61
63
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
62
|
-
suggestedBinding:
|
|
64
|
+
suggestedBinding: {
|
|
65
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
66
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
67
|
+
} | null;
|
|
63
68
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
64
69
|
frameRendering: {
|
|
65
70
|
enabled: boolean;
|
|
@@ -69,7 +74,7 @@ export declare const actionBindText: {
|
|
|
69
74
|
};
|
|
70
75
|
editingFrame: string | null;
|
|
71
76
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
72
|
-
editingTextElement:
|
|
77
|
+
editingTextElement: ExcalidrawTextElement | null;
|
|
73
78
|
activeTool: {
|
|
74
79
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
75
80
|
locked: boolean;
|
|
@@ -124,6 +129,10 @@ export declare const actionBindText: {
|
|
|
124
129
|
} | {
|
|
125
130
|
name: "elementLinkSelector";
|
|
126
131
|
sourceElementId: ExcalidrawElement["id"];
|
|
132
|
+
} | {
|
|
133
|
+
name: "charts";
|
|
134
|
+
data: import("../charts").Spreadsheet;
|
|
135
|
+
rawText: string;
|
|
127
136
|
};
|
|
128
137
|
defaultSidebarDockedPreference: boolean;
|
|
129
138
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -136,7 +145,7 @@ export declare const actionBindText: {
|
|
|
136
145
|
selectedElementsAreBeingDragged: boolean;
|
|
137
146
|
shouldCacheIgnoreZoom: boolean;
|
|
138
147
|
toast: {
|
|
139
|
-
message:
|
|
148
|
+
message: React.ReactNode;
|
|
140
149
|
closable?: boolean;
|
|
141
150
|
duration?: number;
|
|
142
151
|
} | null;
|
|
@@ -154,20 +163,12 @@ export declare const actionBindText: {
|
|
|
154
163
|
height: number;
|
|
155
164
|
offsetTop: number;
|
|
156
165
|
offsetLeft: number;
|
|
157
|
-
fileHandle:
|
|
166
|
+
fileHandle: FileSystemFileHandle | null;
|
|
158
167
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
159
168
|
stats: {
|
|
160
169
|
open: boolean;
|
|
161
170
|
panels: number;
|
|
162
171
|
};
|
|
163
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
164
|
-
pasteDialog: {
|
|
165
|
-
shown: false;
|
|
166
|
-
data: null;
|
|
167
|
-
} | {
|
|
168
|
-
shown: true;
|
|
169
|
-
data: import("../charts").Spreadsheet;
|
|
170
|
-
};
|
|
171
172
|
showHyperlinkPopup: false | "info" | "editor";
|
|
172
173
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
173
174
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -237,8 +238,13 @@ export declare const actionWrapTextInContainer: {
|
|
|
237
238
|
multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
238
239
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
239
240
|
isBindingEnabled: boolean;
|
|
241
|
+
bindingPreference: "enabled" | "disabled";
|
|
242
|
+
isMidpointSnappingEnabled: boolean;
|
|
240
243
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
241
|
-
suggestedBinding:
|
|
244
|
+
suggestedBinding: {
|
|
245
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
246
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
247
|
+
} | null;
|
|
242
248
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
243
249
|
frameRendering: {
|
|
244
250
|
enabled: boolean;
|
|
@@ -248,7 +254,7 @@ export declare const actionWrapTextInContainer: {
|
|
|
248
254
|
};
|
|
249
255
|
editingFrame: string | null;
|
|
250
256
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
251
|
-
editingTextElement:
|
|
257
|
+
editingTextElement: ExcalidrawTextElement | null;
|
|
252
258
|
activeTool: {
|
|
253
259
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
254
260
|
locked: boolean;
|
|
@@ -303,6 +309,10 @@ export declare const actionWrapTextInContainer: {
|
|
|
303
309
|
} | {
|
|
304
310
|
name: "elementLinkSelector";
|
|
305
311
|
sourceElementId: ExcalidrawElement["id"];
|
|
312
|
+
} | {
|
|
313
|
+
name: "charts";
|
|
314
|
+
data: import("../charts").Spreadsheet;
|
|
315
|
+
rawText: string;
|
|
306
316
|
};
|
|
307
317
|
defaultSidebarDockedPreference: boolean;
|
|
308
318
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -315,7 +325,7 @@ export declare const actionWrapTextInContainer: {
|
|
|
315
325
|
selectedElementsAreBeingDragged: boolean;
|
|
316
326
|
shouldCacheIgnoreZoom: boolean;
|
|
317
327
|
toast: {
|
|
318
|
-
message:
|
|
328
|
+
message: React.ReactNode;
|
|
319
329
|
closable?: boolean;
|
|
320
330
|
duration?: number;
|
|
321
331
|
} | null;
|
|
@@ -333,20 +343,12 @@ export declare const actionWrapTextInContainer: {
|
|
|
333
343
|
height: number;
|
|
334
344
|
offsetTop: number;
|
|
335
345
|
offsetLeft: number;
|
|
336
|
-
fileHandle:
|
|
346
|
+
fileHandle: FileSystemFileHandle | null;
|
|
337
347
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
338
348
|
stats: {
|
|
339
349
|
open: boolean;
|
|
340
350
|
panels: number;
|
|
341
351
|
};
|
|
342
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
343
|
-
pasteDialog: {
|
|
344
|
-
shown: false;
|
|
345
|
-
data: null;
|
|
346
|
-
} | {
|
|
347
|
-
shown: true;
|
|
348
|
-
data: import("../charts").Spreadsheet;
|
|
349
|
-
};
|
|
350
352
|
showHyperlinkPopup: false | "info" | "editor";
|
|
351
353
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
352
354
|
snapLines: readonly import("../snapping").SnapLine[];
|