@excalidraw/common 0.18.0-2874f9e → 0.18.0-2a82821
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 +173 -25
- package/dist/dev/index.js.map +3 -3
- package/dist/prod/index.js +3 -3
- package/dist/types/common/src/appEventBus.d.ts +27 -0
- package/dist/types/common/src/colors.d.ts +14 -14
- package/dist/types/common/src/constants.d.ts +9 -7
- package/dist/types/common/src/index.d.ts +2 -0
- package/dist/types/common/src/utils.d.ts +1 -3
- package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
- package/dist/types/element/src/Scene.d.ts +7 -3
- package/dist/types/element/src/arrowheads.d.ts +3 -0
- package/dist/types/element/src/binding.d.ts +3 -4
- package/dist/types/element/src/bounds.d.ts +22 -3
- package/dist/types/element/src/comparisons.d.ts +1 -0
- package/dist/types/element/src/duplicate.d.ts +1 -0
- package/dist/types/element/src/elbowArrow.d.ts +2 -0
- package/dist/types/element/src/frame.d.ts +7 -6
- package/dist/types/element/src/index.d.ts +1 -0
- package/dist/types/element/src/linearElementEditor.d.ts +5 -2
- package/dist/types/element/src/mutateElement.d.ts +2 -0
- package/dist/types/element/src/newElement.d.ts +1 -0
- package/dist/types/element/src/selection.d.ts +8 -4
- package/dist/types/element/src/shape.d.ts +1 -1
- 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/typeChecks.d.ts +1 -0
- package/dist/types/element/src/types.d.ts +11 -2
- package/dist/types/element/src/utils.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +35 -38
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +25 -27
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +207 -219
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +24 -26
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +37 -40
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +160 -0
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +8 -13
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +24 -26
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionExport.d.ts +112 -394
- package/dist/types/excalidraw/actions/actionFrame.d.ts +49 -52
- package/dist/types/excalidraw/actions/actionGroup.d.ts +27 -29
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +13 -13
- package/dist/types/excalidraw/actions/actionLink.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionMenu.d.ts +8 -13
- package/dist/types/excalidraw/actions/actionProperties.d.ts +37 -30
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +13 -14
- package/dist/types/excalidraw/actions/actionStyles.d.ts +12 -12
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +173 -0
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +173 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +8 -13
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +12 -13
- package/dist/types/excalidraw/actions/index.d.ts +4 -1
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
- package/dist/types/excalidraw/appState.d.ts +32 -28
- 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 +4 -7
- package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/App.d.ts +54 -14
- package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
- package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
- package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +1 -1
- package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
- package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
- package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
- package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
- package/dist/types/excalidraw/components/Range.d.ts +10 -4
- package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
- package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +4 -4
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +4 -1
- package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
- package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +3 -3
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
- package/dist/types/excalidraw/components/Toast.d.ts +8 -4
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -1
- package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
- package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -1
- package/dist/types/excalidraw/components/icons.d.ts +19 -8
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +9 -3
- package/dist/types/excalidraw/components/shapes.d.ts +7 -0
- package/dist/types/excalidraw/data/blob.d.ts +163 -166
- 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 -85
- package/dist/types/excalidraw/data/library.d.ts +1 -1
- package/dist/types/excalidraw/data/resave.d.ts +7 -2
- package/dist/types/excalidraw/eraser/index.d.ts +2 -3
- package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
- package/dist/types/excalidraw/lasso/index.d.ts +2 -3
- package/dist/types/excalidraw/renderer/animation.d.ts +4 -1
- package/dist/types/excalidraw/scene/Renderer.d.ts +426 -19
- package/dist/types/excalidraw/scene/index.d.ts +1 -1
- package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
- package/dist/types/excalidraw/types.d.ts +110 -18
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
- package/dist/types/fractional-indexing/src/index.d.ts +29 -0
- package/dist/types/laser-pointer/src/index.d.ts +2 -0
- package/dist/types/laser-pointer/src/math.d.ts +16 -0
- package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
- package/dist/types/laser-pointer/src/state.d.ts +35 -0
- package/dist/types/math/src/constants.d.ts +0 -1
- package/dist/types/math/src/curve.d.ts +4 -1
- package/dist/types/math/src/point.d.ts +2 -1
- package/dist/types/utils/src/index.d.ts +1 -2
- package/package.json +1 -1
- package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
- package/dist/types/excalidraw/charts.d.ts +0 -27
- package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
- package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
- package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
- package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +0 -24
- package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
- package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -84
- package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
- package/dist/types/excalidraw/index.d.ts +0 -47
- package/dist/types/excalidraw/polyfill.d.ts +0 -2
- package/dist/types/utils/src/bbox.d.ts +0 -9
- package/dist/types/utils/src/withinBounds.d.ts +0 -19
|
@@ -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;
|
|
@@ -36,17 +36,18 @@ export declare const omitPartialGroups: (elements: ExcalidrawElement[], frame: E
|
|
|
36
36
|
export declare const getContainingFrame: (element: ExcalidrawElement, elementsMap: ElementsMap) => ExcalidrawFrameLikeElement | null;
|
|
37
37
|
/** */
|
|
38
38
|
export declare const filterElementsEligibleAsFrameChildren: (elements: readonly ExcalidrawElement[], frame: ExcalidrawFrameLikeElement) => ExcalidrawElement[];
|
|
39
|
+
export declare const getCommonFrameId: (elements: readonly ExcalidrawElement[]) => string | null;
|
|
40
|
+
export declare const getFrameChildrenInsertionIndex: (elements: readonly ExcalidrawElement[], frameId: ExcalidrawFrameLikeElement["id"]) => number | null;
|
|
39
41
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* [el, el, child, child, frame, el]
|
|
42
|
+
* Adds elements and their bound elements to frame. Reorders added elements to
|
|
43
|
+
* be just below frame, or just above its highest child (whichever is higher).
|
|
43
44
|
*
|
|
44
45
|
* @returns mutated allElements (same data structure)
|
|
45
46
|
*/
|
|
46
|
-
export declare const addElementsToFrame: <T extends ElementsMapOrArray>(allElements: T, elementsToAdd: NonDeletedExcalidrawElement[], frame: ExcalidrawFrameLikeElement
|
|
47
|
+
export declare const addElementsToFrame: <T extends ElementsMapOrArray>(allElements: T, elementsToAdd: NonDeletedExcalidrawElement[], frame: ExcalidrawFrameLikeElement) => T;
|
|
47
48
|
export declare const removeElementsFromFrame: (elementsToRemove: ReadonlySetLike<NonDeletedExcalidrawElement>, elementsMap: ElementsMap) => void;
|
|
48
49
|
export declare const removeAllElementsFromFrame: <T extends ExcalidrawElement>(allElements: readonly T[], frame: ExcalidrawFrameLikeElement) => readonly T[];
|
|
49
|
-
export declare const replaceAllElementsInFrame: <T extends ExcalidrawElement>(allElements: readonly T[], nextElementsInFrame: ExcalidrawElement[], frame: ExcalidrawFrameLikeElement
|
|
50
|
+
export declare const replaceAllElementsInFrame: <T extends ExcalidrawElement>(allElements: readonly T[], nextElementsInFrame: ExcalidrawElement[], frame: ExcalidrawFrameLikeElement) => T[];
|
|
50
51
|
/** does not mutate elements, but returns new ones */
|
|
51
52
|
export declare const updateFrameMembershipOfSelectedElements: <T extends ElementsMapOrArray>(allElements: T, appState: AppState, app: AppClassProperties) => T;
|
|
52
53
|
/**
|
|
@@ -70,5 +71,5 @@ export declare const isElementInFrame: (element: ExcalidrawElement, allElementsM
|
|
|
70
71
|
export declare const shouldApplyFrameClip: (element: ExcalidrawElement, frame: ExcalidrawFrameLikeElement, appState: StaticCanvasAppState, elementsMap: ElementsMap, checkedGroups?: Map<string, boolean>) => boolean;
|
|
71
72
|
export declare const getDefaultFrameName: (element: ExcalidrawFrameLikeElement) => "Frame" | "AI Frame";
|
|
72
73
|
export declare const getFrameLikeTitle: (element: ExcalidrawFrameLikeElement) => string;
|
|
73
|
-
export declare const getElementsOverlappingFrame: (elements: readonly ExcalidrawElement[], frame: ExcalidrawFrameLikeElement) =>
|
|
74
|
+
export declare const getElementsOverlappingFrame: (elements: readonly ExcalidrawElement[], frame: ExcalidrawFrameLikeElement, elementsMap: ElementsMap) => ExcalidrawElement[];
|
|
74
75
|
export declare const frameAndChildrenSelectedTogether: (selectedElements: readonly ExcalidrawElement[]) => boolean;
|
|
@@ -55,8 +55,8 @@ export declare class LinearElementEditor {
|
|
|
55
55
|
x: number;
|
|
56
56
|
y: number;
|
|
57
57
|
}, appState: AppState, elementsMap: ElementsMap) => GlobalPoint | null;
|
|
58
|
-
static isSegmentTooShort<P extends GlobalPoint | LocalPoint>(element: NonDeleted<ExcalidrawLinearElement>, startPoint: P, endPoint: P, index: number, zoom: Zoom): boolean;
|
|
59
|
-
static getSegmentMidPoint(element: NonDeleted<ExcalidrawLinearElement>, index: number): GlobalPoint;
|
|
58
|
+
static isSegmentTooShort<P extends GlobalPoint | LocalPoint>(element: NonDeleted<ExcalidrawLinearElement>, startPoint: P, endPoint: P, index: number, zoom: Zoom, elementsMap: ElementsMap): boolean;
|
|
59
|
+
static getSegmentMidPoint(element: NonDeleted<ExcalidrawLinearElement>, index: number, elementsMap: ElementsMap): GlobalPoint;
|
|
60
60
|
static getSegmentMidPointIndex(linearElementEditor: LinearElementEditor, appState: AppState, midPoint: GlobalPoint, elementsMap: ElementsMap): number;
|
|
61
61
|
static handlePointerDown(event: React.PointerEvent<HTMLElement>, app: AppClassProperties, store: Store, scenePointer: {
|
|
62
62
|
x: number;
|
|
@@ -96,6 +96,9 @@ export declare class LinearElementEditor {
|
|
|
96
96
|
startBinding?: FixedPointBinding | null;
|
|
97
97
|
endBinding?: FixedPointBinding | null;
|
|
98
98
|
moveMidPointsWithElement?: boolean | null;
|
|
99
|
+
}, options?: {
|
|
100
|
+
isBindingEnabled?: boolean;
|
|
101
|
+
isMidpointSnappingEnabled?: boolean;
|
|
99
102
|
}): void;
|
|
100
103
|
static shouldAddMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, appState: AppState, elementsMap: ElementsMap): boolean;
|
|
101
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 */
|
|
@@ -38,6 +38,7 @@ export declare const newFreeDrawElement: (opts: {
|
|
|
38
38
|
type: "freedraw";
|
|
39
39
|
points?: ExcalidrawFreeDrawElement["points"];
|
|
40
40
|
simulatePressure: boolean;
|
|
41
|
+
strokeOptions?: ExcalidrawFreeDrawElement["strokeOptions"];
|
|
41
42
|
pressures?: ExcalidrawFreeDrawElement["pressures"];
|
|
42
43
|
} & ElementConstructorOpts) => NonDeleted<ExcalidrawFreeDrawElement>;
|
|
43
44
|
export declare const newLinearElement: (opts: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AppState, InteractiveCanvasAppState } from "@excalidraw/excalidraw/types";
|
|
1
|
+
import type { AppState, BoxSelectionMode, 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
|
|
@@ -8,7 +8,7 @@ import type { ElementsMap, ElementsMapOrArray, ExcalidrawElement, NonDeletedExca
|
|
|
8
8
|
* @param selectedElements
|
|
9
9
|
*/
|
|
10
10
|
export declare const excludeElementsInFramesFromSelection: <T extends ExcalidrawElement>(selectedElements: readonly T[]) => T[];
|
|
11
|
-
export declare const getElementsWithinSelection: (elements: readonly NonDeletedExcalidrawElement[], selection: NonDeletedExcalidrawElement, elementsMap: ElementsMap, excludeElementsInFrames?: boolean) => NonDeletedExcalidrawElement[];
|
|
11
|
+
export declare const getElementsWithinSelection: (elements: readonly NonDeletedExcalidrawElement[], selection: NonDeletedExcalidrawElement, elementsMap: ElementsMap, excludeElementsInFrames?: boolean, boxSelectionMode?: BoxSelectionMode) => NonDeletedExcalidrawElement[];
|
|
12
12
|
export declare const getVisibleAndNonSelectedElements: (elements: readonly NonDeletedExcalidrawElement[], selectedElements: readonly NonDeletedExcalidrawElement[], appState: AppState, elementsMap: ElementsMap) => NonDeletedExcalidrawElement[];
|
|
13
13
|
export declare const isSomeElementSelected: {
|
|
14
14
|
(elements: readonly NonDeletedExcalidrawElement[], appState: Pick<AppState, "selectedElementIds">): boolean;
|
|
@@ -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;
|
|
@@ -27,7 +27,7 @@ export declare class ShapeCache {
|
|
|
27
27
|
} | null) => ((T["type"] extends keyof ElementShapes ? ElementShapes[T["type"]] | undefined : ElementShape | undefined) & {}) | (T["type"] extends keyof ElementShapes ? ElementShapes[T["type"]] : Drawable | null);
|
|
28
28
|
}
|
|
29
29
|
export declare const generateRoughOptions: (element: ExcalidrawElement, continuousPath?: boolean, isDarkMode?: boolean) => Options;
|
|
30
|
-
export declare const generateLinearCollisionShape: (element: ExcalidrawLinearElement | ExcalidrawFreeDrawElement) => {
|
|
30
|
+
export declare const generateLinearCollisionShape: (element: ExcalidrawLinearElement | ExcalidrawFreeDrawElement, elementsMap: ElementsMap) => {
|
|
31
31
|
op: string;
|
|
32
32
|
data: number[];
|
|
33
33
|
}[];
|
|
@@ -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[];
|
|
@@ -52,3 +52,4 @@ export declare const getLinearElementSubType: (element: ExcalidrawLinearElement)
|
|
|
52
52
|
*/
|
|
53
53
|
export declare const isValidPolygon: (points: ExcalidrawLineElement["points"]) => boolean;
|
|
54
54
|
export declare const canBecomePolygon: (points: ExcalidrawLineElement["points"]) => boolean;
|
|
55
|
+
export declare const isEligibleFrameChildType: (type: ElementOrToolType) => boolean;
|
|
@@ -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[];
|
|
@@ -252,11 +255,17 @@ export type ExcalidrawElbowArrowElement = Merge<ExcalidrawArrowElement, {
|
|
|
252
255
|
*/
|
|
253
256
|
endIsSpecial: boolean | null;
|
|
254
257
|
}>;
|
|
258
|
+
export type StrokeVariability = "variable" | "constant";
|
|
259
|
+
export type StrokeOptions = Readonly<{
|
|
260
|
+
variability: StrokeVariability;
|
|
261
|
+
streamline: number;
|
|
262
|
+
}>;
|
|
255
263
|
export type ExcalidrawFreeDrawElement = _ExcalidrawElementBase & Readonly<{
|
|
256
264
|
type: "freedraw";
|
|
257
265
|
points: readonly LocalPoint[];
|
|
258
266
|
pressures: readonly number[];
|
|
259
267
|
simulatePressure: boolean;
|
|
268
|
+
strokeOptions: StrokeOptions;
|
|
260
269
|
}>;
|
|
261
270
|
export type FileId = string & {
|
|
262
271
|
_brand: "FileId";
|
|
@@ -8,7 +8,7 @@ import type { ElementsMap, ExcalidrawArrowElement, ExcalidrawBindableElement, Ex
|
|
|
8
8
|
* @param element The linear element to deconstruct
|
|
9
9
|
* @returns The rotated in components.
|
|
10
10
|
*/
|
|
11
|
-
export declare function deconstructLinearOrFreeDrawElement(element: ExcalidrawLinearElement | ExcalidrawFreeDrawElement): [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
|
|
11
|
+
export declare function deconstructLinearOrFreeDrawElement(element: ExcalidrawLinearElement | ExcalidrawFreeDrawElement, elementsMap: ElementsMap): [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
|
|
12
12
|
/**
|
|
13
13
|
* Get the building components of a rectanguloid element in the form of
|
|
14
14
|
* line segments and curves **unrotated**.
|
|
@@ -33,4 +33,4 @@ export declare const isPathALoop: (points: ExcalidrawLinearElement["points"],
|
|
|
33
33
|
zoomValue?: Zoom["value"]) => boolean;
|
|
34
34
|
export declare const getCornerRadius: (x: number, element: ExcalidrawElement) => number;
|
|
35
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"]) => GlobalPoint | null;
|
|
36
|
+
export declare const projectFixedPointOntoDiagonal: (arrow: ExcalidrawArrowElement, point: GlobalPoint, element: ExcalidrawBindableElement, startOrEnd: "start" | "end", elementsMap: ElementsMap, zoom: AppState["zoom"], isMidpointSnappingEnabled?: boolean) => GlobalPoint | null;
|
|
@@ -26,7 +26,9 @@ export declare const actionAddToLibrary: {
|
|
|
26
26
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
27
27
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
28
28
|
isBindingEnabled: boolean;
|
|
29
|
-
|
|
29
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
30
|
+
bindingPreference: "enabled" | "disabled";
|
|
31
|
+
isMidpointSnappingEnabled: boolean;
|
|
30
32
|
suggestedBinding: {
|
|
31
33
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
32
34
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -40,7 +42,7 @@ export declare const actionAddToLibrary: {
|
|
|
40
42
|
};
|
|
41
43
|
editingFrame: string | null;
|
|
42
44
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
43
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
45
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
44
46
|
activeTool: {
|
|
45
47
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
46
48
|
locked: boolean;
|
|
@@ -59,9 +61,10 @@ export declare const actionAddToLibrary: {
|
|
|
59
61
|
currentItemStrokeColor: string;
|
|
60
62
|
currentItemBackgroundColor: string;
|
|
61
63
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
62
|
-
|
|
64
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
63
65
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
64
66
|
currentItemRoughness: number;
|
|
67
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
65
68
|
currentItemOpacity: number;
|
|
66
69
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
67
70
|
currentItemFontSize: number;
|
|
@@ -98,6 +101,10 @@ export declare const actionAddToLibrary: {
|
|
|
98
101
|
} | {
|
|
99
102
|
name: "elementLinkSelector";
|
|
100
103
|
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
104
|
+
} | {
|
|
105
|
+
name: "charts";
|
|
106
|
+
data: import("../charts").Spreadsheet;
|
|
107
|
+
rawText: string;
|
|
101
108
|
};
|
|
102
109
|
defaultSidebarDockedPreference: boolean;
|
|
103
110
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -126,20 +133,12 @@ export declare const actionAddToLibrary: {
|
|
|
126
133
|
height: number;
|
|
127
134
|
offsetTop: number;
|
|
128
135
|
offsetLeft: number;
|
|
129
|
-
fileHandle:
|
|
136
|
+
fileHandle: FileSystemFileHandle | null;
|
|
130
137
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
131
138
|
stats: {
|
|
132
139
|
open: boolean;
|
|
133
140
|
panels: number;
|
|
134
141
|
};
|
|
135
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
136
|
-
pasteDialog: {
|
|
137
|
-
shown: false;
|
|
138
|
-
data: null;
|
|
139
|
-
} | {
|
|
140
|
-
shown: true;
|
|
141
|
-
data: import("../charts").Spreadsheet;
|
|
142
|
-
};
|
|
143
142
|
showHyperlinkPopup: false | "info" | "editor";
|
|
144
143
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
145
144
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -182,7 +181,9 @@ export declare const actionAddToLibrary: {
|
|
|
182
181
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
183
182
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
184
183
|
isBindingEnabled: boolean;
|
|
185
|
-
|
|
184
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
185
|
+
bindingPreference: "enabled" | "disabled";
|
|
186
|
+
isMidpointSnappingEnabled: boolean;
|
|
186
187
|
suggestedBinding: {
|
|
187
188
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
188
189
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -196,7 +197,7 @@ export declare const actionAddToLibrary: {
|
|
|
196
197
|
};
|
|
197
198
|
editingFrame: string | null;
|
|
198
199
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
199
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
200
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
200
201
|
activeTool: {
|
|
201
202
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
202
203
|
locked: boolean;
|
|
@@ -215,9 +216,10 @@ export declare const actionAddToLibrary: {
|
|
|
215
216
|
currentItemStrokeColor: string;
|
|
216
217
|
currentItemBackgroundColor: string;
|
|
217
218
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
218
|
-
|
|
219
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
219
220
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
220
221
|
currentItemRoughness: number;
|
|
222
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
221
223
|
currentItemOpacity: number;
|
|
222
224
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
223
225
|
currentItemFontSize: number;
|
|
@@ -254,6 +256,10 @@ export declare const actionAddToLibrary: {
|
|
|
254
256
|
} | {
|
|
255
257
|
name: "elementLinkSelector";
|
|
256
258
|
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
259
|
+
} | {
|
|
260
|
+
name: "charts";
|
|
261
|
+
data: import("../charts").Spreadsheet;
|
|
262
|
+
rawText: string;
|
|
257
263
|
};
|
|
258
264
|
defaultSidebarDockedPreference: boolean;
|
|
259
265
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -269,7 +275,7 @@ export declare const actionAddToLibrary: {
|
|
|
269
275
|
selectedElementsAreBeingDragged: boolean;
|
|
270
276
|
shouldCacheIgnoreZoom: boolean;
|
|
271
277
|
toast: {
|
|
272
|
-
message:
|
|
278
|
+
message: React.ReactNode;
|
|
273
279
|
closable?: boolean;
|
|
274
280
|
duration?: number;
|
|
275
281
|
} | null;
|
|
@@ -287,20 +293,12 @@ export declare const actionAddToLibrary: {
|
|
|
287
293
|
height: number;
|
|
288
294
|
offsetTop: number;
|
|
289
295
|
offsetLeft: number;
|
|
290
|
-
fileHandle:
|
|
296
|
+
fileHandle: FileSystemFileHandle | null;
|
|
291
297
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
292
298
|
stats: {
|
|
293
299
|
open: boolean;
|
|
294
300
|
panels: number;
|
|
295
301
|
};
|
|
296
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
297
|
-
pasteDialog: {
|
|
298
|
-
shown: false;
|
|
299
|
-
data: null;
|
|
300
|
-
} | {
|
|
301
|
-
shown: true;
|
|
302
|
-
data: import("../charts").Spreadsheet;
|
|
303
|
-
};
|
|
304
302
|
showHyperlinkPopup: false | "info" | "editor";
|
|
305
303
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
306
304
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -343,7 +341,9 @@ export declare const actionAddToLibrary: {
|
|
|
343
341
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
344
342
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
345
343
|
isBindingEnabled: boolean;
|
|
346
|
-
|
|
344
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
345
|
+
bindingPreference: "enabled" | "disabled";
|
|
346
|
+
isMidpointSnappingEnabled: boolean;
|
|
347
347
|
suggestedBinding: {
|
|
348
348
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
349
349
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -357,7 +357,7 @@ export declare const actionAddToLibrary: {
|
|
|
357
357
|
};
|
|
358
358
|
editingFrame: string | null;
|
|
359
359
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
360
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
360
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
361
361
|
activeTool: {
|
|
362
362
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
363
363
|
locked: boolean;
|
|
@@ -376,9 +376,10 @@ export declare const actionAddToLibrary: {
|
|
|
376
376
|
currentItemStrokeColor: string;
|
|
377
377
|
currentItemBackgroundColor: string;
|
|
378
378
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
379
|
-
|
|
379
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
380
380
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
381
381
|
currentItemRoughness: number;
|
|
382
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
382
383
|
currentItemOpacity: number;
|
|
383
384
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
384
385
|
currentItemFontSize: number;
|
|
@@ -415,6 +416,10 @@ export declare const actionAddToLibrary: {
|
|
|
415
416
|
} | {
|
|
416
417
|
name: "elementLinkSelector";
|
|
417
418
|
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
419
|
+
} | {
|
|
420
|
+
name: "charts";
|
|
421
|
+
data: import("../charts").Spreadsheet;
|
|
422
|
+
rawText: string;
|
|
418
423
|
};
|
|
419
424
|
defaultSidebarDockedPreference: boolean;
|
|
420
425
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -430,7 +435,7 @@ export declare const actionAddToLibrary: {
|
|
|
430
435
|
selectedElementsAreBeingDragged: boolean;
|
|
431
436
|
shouldCacheIgnoreZoom: boolean;
|
|
432
437
|
toast: {
|
|
433
|
-
message:
|
|
438
|
+
message: React.ReactNode;
|
|
434
439
|
closable?: boolean;
|
|
435
440
|
duration?: number;
|
|
436
441
|
} | null;
|
|
@@ -448,20 +453,12 @@ export declare const actionAddToLibrary: {
|
|
|
448
453
|
height: number;
|
|
449
454
|
offsetTop: number;
|
|
450
455
|
offsetLeft: number;
|
|
451
|
-
fileHandle:
|
|
456
|
+
fileHandle: FileSystemFileHandle | null;
|
|
452
457
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
453
458
|
stats: {
|
|
454
459
|
open: boolean;
|
|
455
460
|
panels: number;
|
|
456
461
|
};
|
|
457
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
458
|
-
pasteDialog: {
|
|
459
|
-
shown: false;
|
|
460
|
-
data: null;
|
|
461
|
-
} | {
|
|
462
|
-
shown: true;
|
|
463
|
-
data: import("../charts").Spreadsheet;
|
|
464
|
-
};
|
|
465
462
|
showHyperlinkPopup: false | "info" | "editor";
|
|
466
463
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
467
464
|
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: {
|
|
@@ -46,7 +46,9 @@ export declare const actionBindText: {
|
|
|
46
46
|
multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
47
47
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
48
48
|
isBindingEnabled: boolean;
|
|
49
|
-
|
|
49
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
50
|
+
bindingPreference: "enabled" | "disabled";
|
|
51
|
+
isMidpointSnappingEnabled: boolean;
|
|
50
52
|
suggestedBinding: {
|
|
51
53
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
52
54
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -60,7 +62,7 @@ export declare const actionBindText: {
|
|
|
60
62
|
};
|
|
61
63
|
editingFrame: string | null;
|
|
62
64
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
63
|
-
editingTextElement:
|
|
65
|
+
editingTextElement: ExcalidrawTextElement | null;
|
|
64
66
|
activeTool: {
|
|
65
67
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
66
68
|
locked: boolean;
|
|
@@ -79,9 +81,10 @@ export declare const actionBindText: {
|
|
|
79
81
|
currentItemStrokeColor: string;
|
|
80
82
|
currentItemBackgroundColor: string;
|
|
81
83
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
82
|
-
|
|
84
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
83
85
|
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
84
86
|
currentItemRoughness: number;
|
|
87
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
85
88
|
currentItemOpacity: number;
|
|
86
89
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
87
90
|
currentItemFontSize: number;
|
|
@@ -118,6 +121,10 @@ export declare const actionBindText: {
|
|
|
118
121
|
} | {
|
|
119
122
|
name: "elementLinkSelector";
|
|
120
123
|
sourceElementId: ExcalidrawElement["id"];
|
|
124
|
+
} | {
|
|
125
|
+
name: "charts";
|
|
126
|
+
data: import("../charts").Spreadsheet;
|
|
127
|
+
rawText: string;
|
|
121
128
|
};
|
|
122
129
|
defaultSidebarDockedPreference: boolean;
|
|
123
130
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -130,7 +137,7 @@ export declare const actionBindText: {
|
|
|
130
137
|
selectedElementsAreBeingDragged: boolean;
|
|
131
138
|
shouldCacheIgnoreZoom: boolean;
|
|
132
139
|
toast: {
|
|
133
|
-
message:
|
|
140
|
+
message: React.ReactNode;
|
|
134
141
|
closable?: boolean;
|
|
135
142
|
duration?: number;
|
|
136
143
|
} | null;
|
|
@@ -148,20 +155,12 @@ export declare const actionBindText: {
|
|
|
148
155
|
height: number;
|
|
149
156
|
offsetTop: number;
|
|
150
157
|
offsetLeft: number;
|
|
151
|
-
fileHandle:
|
|
158
|
+
fileHandle: FileSystemFileHandle | null;
|
|
152
159
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
153
160
|
stats: {
|
|
154
161
|
open: boolean;
|
|
155
162
|
panels: number;
|
|
156
163
|
};
|
|
157
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
158
|
-
pasteDialog: {
|
|
159
|
-
shown: false;
|
|
160
|
-
data: null;
|
|
161
|
-
} | {
|
|
162
|
-
shown: true;
|
|
163
|
-
data: import("../charts").Spreadsheet;
|
|
164
|
-
};
|
|
165
164
|
showHyperlinkPopup: false | "info" | "editor";
|
|
166
165
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
167
166
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -219,7 +218,9 @@ export declare const actionWrapTextInContainer: {
|
|
|
219
218
|
multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
220
219
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
221
220
|
isBindingEnabled: boolean;
|
|
222
|
-
|
|
221
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
222
|
+
bindingPreference: "enabled" | "disabled";
|
|
223
|
+
isMidpointSnappingEnabled: boolean;
|
|
223
224
|
suggestedBinding: {
|
|
224
225
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
225
226
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -233,7 +234,7 @@ export declare const actionWrapTextInContainer: {
|
|
|
233
234
|
};
|
|
234
235
|
editingFrame: string | null;
|
|
235
236
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
236
|
-
editingTextElement:
|
|
237
|
+
editingTextElement: ExcalidrawTextElement | null;
|
|
237
238
|
activeTool: {
|
|
238
239
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
239
240
|
locked: boolean;
|
|
@@ -252,9 +253,10 @@ export declare const actionWrapTextInContainer: {
|
|
|
252
253
|
currentItemStrokeColor: string;
|
|
253
254
|
currentItemBackgroundColor: string;
|
|
254
255
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
255
|
-
|
|
256
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
256
257
|
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
257
258
|
currentItemRoughness: number;
|
|
259
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
258
260
|
currentItemOpacity: number;
|
|
259
261
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
260
262
|
currentItemFontSize: number;
|
|
@@ -291,6 +293,10 @@ export declare const actionWrapTextInContainer: {
|
|
|
291
293
|
} | {
|
|
292
294
|
name: "elementLinkSelector";
|
|
293
295
|
sourceElementId: ExcalidrawElement["id"];
|
|
296
|
+
} | {
|
|
297
|
+
name: "charts";
|
|
298
|
+
data: import("../charts").Spreadsheet;
|
|
299
|
+
rawText: string;
|
|
294
300
|
};
|
|
295
301
|
defaultSidebarDockedPreference: boolean;
|
|
296
302
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -303,7 +309,7 @@ export declare const actionWrapTextInContainer: {
|
|
|
303
309
|
selectedElementsAreBeingDragged: boolean;
|
|
304
310
|
shouldCacheIgnoreZoom: boolean;
|
|
305
311
|
toast: {
|
|
306
|
-
message:
|
|
312
|
+
message: React.ReactNode;
|
|
307
313
|
closable?: boolean;
|
|
308
314
|
duration?: number;
|
|
309
315
|
} | null;
|
|
@@ -321,20 +327,12 @@ export declare const actionWrapTextInContainer: {
|
|
|
321
327
|
height: number;
|
|
322
328
|
offsetTop: number;
|
|
323
329
|
offsetLeft: number;
|
|
324
|
-
fileHandle:
|
|
330
|
+
fileHandle: FileSystemFileHandle | null;
|
|
325
331
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
326
332
|
stats: {
|
|
327
333
|
open: boolean;
|
|
328
334
|
panels: number;
|
|
329
335
|
};
|
|
330
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
331
|
-
pasteDialog: {
|
|
332
|
-
shown: false;
|
|
333
|
-
data: null;
|
|
334
|
-
} | {
|
|
335
|
-
shown: true;
|
|
336
|
-
data: import("../charts").Spreadsheet;
|
|
337
|
-
};
|
|
338
336
|
showHyperlinkPopup: false | "info" | "editor";
|
|
339
337
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
340
338
|
snapLines: readonly import("../snapping").SnapLine[];
|