@excalidraw/math 0.18.0-abeeaeb → 0.18.0-afa3a65
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 +36 -42
- package/dist/dev/index.js.map +2 -2
- package/dist/prod/index.js +1 -1
- package/dist/types/common/src/colors.d.ts +8 -0
- package/dist/types/common/src/constants.d.ts +44 -0
- package/dist/types/common/src/keys.d.ts +2 -0
- package/dist/types/common/src/random.d.ts +7 -0
- package/dist/types/element/src/Scene.d.ts +1 -1
- package/dist/types/element/src/comparisons.d.ts +5 -3
- package/dist/types/element/src/delta.d.ts +23 -1
- package/dist/types/element/src/flowchart.d.ts +5 -1
- package/dist/types/element/src/frame.d.ts +2 -2
- package/dist/types/element/src/index.d.ts +1 -0
- package/dist/types/element/src/linearElementEditor.d.ts +10 -0
- package/dist/types/element/src/mutateElement.d.ts +1 -1
- package/dist/types/element/src/newElement.d.ts +24 -2
- package/dist/types/element/src/sizeHelpers.d.ts +6 -0
- package/dist/types/element/src/stickyNote.d.ts +183 -0
- package/dist/types/element/src/textElement.d.ts +2 -1
- package/dist/types/element/src/transform.d.ts +25 -6
- package/dist/types/element/src/typeChecks.d.ts +3 -2
- package/dist/types/element/src/types.d.ts +35 -6
- package/dist/types/element/src/utils.d.ts +7 -3
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +12 -0
- package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +8 -0
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +28 -0
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +8 -0
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +13 -1
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +8 -0
- package/dist/types/excalidraw/actions/actionExport.d.ts +8 -0
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionFrame.d.ts +63 -1
- package/dist/types/excalidraw/actions/actionGroup.d.ts +8 -0
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +55 -1
- package/dist/types/excalidraw/actions/actionLink.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionMenu.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionProperties.d.ts +18 -6
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionStyles.d.ts +5 -1
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +4 -0
- package/dist/types/excalidraw/actions/colorTargets.d.ts +39 -0
- package/dist/types/excalidraw/appState.d.ts +4 -0
- package/dist/types/excalidraw/components/App.arrowText.d.ts +40 -8
- package/dist/types/excalidraw/components/App.cursor.d.ts +8 -0
- package/dist/types/excalidraw/components/App.d.ts +92 -6
- package/dist/types/excalidraw/components/App.toolDrag.d.ts +63 -0
- package/dist/types/excalidraw/components/IconButton.d.ts +2 -0
- package/dist/types/excalidraw/components/Tools.d.ts +7 -2
- package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +2 -0
- package/dist/types/excalidraw/components/icons.d.ts +1 -0
- package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +2 -2
- package/dist/types/excalidraw/data/blob.d.ts +8 -0
- package/dist/types/excalidraw/data/json.d.ts +4 -0
- package/dist/types/excalidraw/fonts/Fonts.d.ts +3 -2
- package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +5 -5
- package/dist/types/excalidraw/renderer/helpers.d.ts +25 -0
- package/dist/types/excalidraw/renderer/interactiveScene.d.ts +1 -1
- package/dist/types/excalidraw/scene/Renderer.d.ts +50 -1
- package/dist/types/excalidraw/scene/index.d.ts +1 -1
- package/dist/types/excalidraw/scene/types.d.ts +1 -0
- package/dist/types/excalidraw/types.d.ts +30 -2
- package/dist/types/excalidraw/viewport.d.ts +4 -0
- package/dist/types/math/src/curve.d.ts +19 -12
- package/dist/types/math/src/segment.d.ts +6 -0
- package/dist/types/utils/src/export.d.ts +1 -0
- package/dist/types/utils/src/shape.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { MarkOptional } from "@excalidraw/common/utility-types";
|
|
2
2
|
import { type ElementConstructorOpts } from "./newElement";
|
|
3
|
-
import type { ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawFrameElement, ExcalidrawFreeDrawElement, ExcalidrawGenericElement, ExcalidrawIframeLikeElement, ExcalidrawImageElement, ExcalidrawLinearElement, ExcalidrawMagicFrameElement, ExcalidrawSelectionElement, ExcalidrawTextElement, FileId, FontFamilyValues, NonDeletedExcalidrawElement, Ordered, TextAlign, VerticalAlign } from "./types";
|
|
3
|
+
import type { ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawFrameElement, ExcalidrawFreeDrawElement, ExcalidrawGenericElement, ExcalidrawIframeLikeElement, ExcalidrawImageElement, ExcalidrawLinearElement, ExcalidrawMagicFrameElement, ExcalidrawSelectionElement, ExcalidrawTextElement, FileId, FontFamilyValues, NonDeletedExcalidrawElement, Ordered, TextAlign, VerticalAlign, ExcalidrawStickyNoteElement } from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* Options for elements generated from a skeleton fragment (bound labels and
|
|
6
|
+
* binding endpoints). Such elements are always constructed fresh, hence they
|
|
7
|
+
* never carry a creation time of their own.
|
|
8
|
+
*/
|
|
9
|
+
type FragmentConstructorOpts = MarkOptional<Omit<ElementConstructorOpts, "created">, "x" | "y">;
|
|
4
10
|
export type ValidLinearElement = {
|
|
5
11
|
type: "arrow" | "line";
|
|
6
12
|
x: number;
|
|
@@ -11,7 +17,7 @@ export type ValidLinearElement = {
|
|
|
11
17
|
fontFamily?: FontFamilyValues;
|
|
12
18
|
textAlign?: TextAlign;
|
|
13
19
|
verticalAlign?: VerticalAlign;
|
|
14
|
-
} &
|
|
20
|
+
} & FragmentConstructorOpts;
|
|
15
21
|
end?: (({
|
|
16
22
|
type: Exclude<ExcalidrawBindableElement["type"], "image" | "text" | "frame" | "magicframe" | "embeddable" | "iframe">;
|
|
17
23
|
id?: ExcalidrawGenericElement["id"];
|
|
@@ -25,7 +31,7 @@ export type ValidLinearElement = {
|
|
|
25
31
|
type?: "text";
|
|
26
32
|
id: ExcalidrawTextElement["id"];
|
|
27
33
|
text: string;
|
|
28
|
-
}) & Partial<ExcalidrawTextElement
|
|
34
|
+
}) & Partial<Omit<ExcalidrawTextElement, "created">>)) & FragmentConstructorOpts;
|
|
29
35
|
start?: (({
|
|
30
36
|
type: Exclude<ExcalidrawBindableElement["type"], "image" | "text" | "frame" | "magicframe" | "embeddable" | "iframe">;
|
|
31
37
|
id?: ExcalidrawGenericElement["id"];
|
|
@@ -39,7 +45,7 @@ export type ValidLinearElement = {
|
|
|
39
45
|
type?: "text";
|
|
40
46
|
id: ExcalidrawTextElement["id"];
|
|
41
47
|
text: string;
|
|
42
|
-
}) & Partial<ExcalidrawTextElement
|
|
48
|
+
}) & Partial<Omit<ExcalidrawTextElement, "created">>)) & FragmentConstructorOpts;
|
|
43
49
|
} & Partial<ExcalidrawLinearElement>;
|
|
44
50
|
export type ValidContainer = {
|
|
45
51
|
type: Exclude<ExcalidrawGenericElement["type"], "selection">;
|
|
@@ -50,13 +56,25 @@ export type ValidContainer = {
|
|
|
50
56
|
fontFamily?: FontFamilyValues;
|
|
51
57
|
textAlign?: TextAlign;
|
|
52
58
|
verticalAlign?: VerticalAlign;
|
|
53
|
-
} &
|
|
59
|
+
} & FragmentConstructorOpts;
|
|
54
60
|
} & ElementConstructorOpts;
|
|
61
|
+
/**
|
|
62
|
+
* A sticky note: an always-filled note whose label auto-fits. `label.fontSize`
|
|
63
|
+
* is the font ceiling the fit shrinks from; the note grows past its height
|
|
64
|
+
* (kept as `baseHeight`) only once the label hits the minimum font size.
|
|
65
|
+
*/
|
|
66
|
+
export type ValidStickyNote = {
|
|
67
|
+
type: "stickynote";
|
|
68
|
+
id?: ExcalidrawStickyNoteElement["id"];
|
|
69
|
+
label?: Extract<ValidContainer, {
|
|
70
|
+
label?: unknown;
|
|
71
|
+
}>["label"];
|
|
72
|
+
} & ElementConstructorOpts & Partial<Pick<ExcalidrawStickyNoteElement, "baseHeight">>;
|
|
55
73
|
export type ExcalidrawElementSkeleton = Extract<Exclude<ExcalidrawElement, ExcalidrawSelectionElement>, ExcalidrawIframeLikeElement | ExcalidrawFreeDrawElement> | ({
|
|
56
74
|
type: Extract<ExcalidrawLinearElement["type"], "line">;
|
|
57
75
|
x: number;
|
|
58
76
|
y: number;
|
|
59
|
-
} & Partial<ExcalidrawLinearElement>) | ValidContainer | ValidLinearElement | ({
|
|
77
|
+
} & Partial<ExcalidrawLinearElement>) | ValidContainer | ValidStickyNote | ValidLinearElement | ({
|
|
60
78
|
type: "text";
|
|
61
79
|
text: string;
|
|
62
80
|
x: number;
|
|
@@ -79,3 +97,4 @@ export type ExcalidrawElementSkeleton = Extract<Exclude<ExcalidrawElement, Excal
|
|
|
79
97
|
export declare const convertToExcalidrawElements: (elementsSkeleton: ExcalidrawElementSkeleton[] | null, opts?: {
|
|
80
98
|
regenerateIds: boolean;
|
|
81
99
|
}) => Ordered<NonDeletedExcalidrawElement>[];
|
|
100
|
+
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { ElementOrToolType } from "@excalidraw/excalidraw/types";
|
|
2
2
|
import type { MarkNonNullable } from "@excalidraw/common/utility-types";
|
|
3
|
-
import type { ExcalidrawElement, ExcalidrawTextElement, ExcalidrawEmbeddableElement, ExcalidrawLinearElement, ExcalidrawBindableElement, ExcalidrawFreeDrawElement, InitializedExcalidrawImageElement, ExcalidrawImageElement, ExcalidrawTextElementWithContainer, ExcalidrawTextContainer, ExcalidrawFrameElement, RoundnessType, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeElement, ExcalidrawIframeLikeElement, ExcalidrawMagicFrameElement, ExcalidrawArrowElement, ExcalidrawElbowArrowElement, ExcalidrawLineElement, ExcalidrawFlowchartNodeElement, ExcalidrawLinearElementSubType } from "./types";
|
|
3
|
+
import type { ExcalidrawElement, ExcalidrawTextElement, ExcalidrawEmbeddableElement, ExcalidrawLinearElement, ExcalidrawBindableElement, ExcalidrawFreeDrawElement, InitializedExcalidrawImageElement, ExcalidrawImageElement, ExcalidrawTextElementWithContainer, ExcalidrawTextContainer, ExcalidrawFrameElement, RoundnessType, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeElement, ExcalidrawIframeLikeElement, ExcalidrawMagicFrameElement, ExcalidrawArrowElement, ExcalidrawElbowArrowElement, ExcalidrawLineElement, ExcalidrawFlowchartNodeElement, ExcalidrawLinearElementSubType, ExcalidrawStickyNoteElement } from "./types";
|
|
4
4
|
export declare const isInitializedImageElement: <T extends ExcalidrawElement>(element: T | null) => element is T & InitializedExcalidrawImageElement;
|
|
5
5
|
export declare const isImageElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawImageElement;
|
|
6
6
|
export declare const isEmbeddableElement: <T extends ExcalidrawElement>(element: T | null | undefined) => element is T & ExcalidrawEmbeddableElement;
|
|
7
7
|
export declare const isIframeElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawIframeElement;
|
|
8
8
|
export declare const isIframeLikeElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawIframeLikeElement;
|
|
9
9
|
export declare const isTextElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawTextElement;
|
|
10
|
+
export declare const isStickyNoteElement: <T extends ExcalidrawElement>(element: T | null | undefined) => element is T & ExcalidrawStickyNoteElement;
|
|
10
11
|
export declare const isFrameElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawFrameElement;
|
|
11
12
|
export declare const isMagicFrameElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawMagicFrameElement;
|
|
12
13
|
export declare const isFrameLikeElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawFrameLikeElement;
|
|
@@ -35,7 +36,7 @@ export declare const hasBoundTextElement: <T extends ExcalidrawElement>(element:
|
|
|
35
36
|
export declare const isBoundToContainer: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawTextElementWithContainer;
|
|
36
37
|
export declare const isArrowBoundToElement: (element: ExcalidrawArrowElement) => boolean;
|
|
37
38
|
export declare const isUsingAdaptiveRadius: (type: string) => type is "rectangle" | "embeddable" | "iframe" | "image";
|
|
38
|
-
export declare const isUsingProportionalRadius: (type: string) => type is "line" | "arrow" | "diamond";
|
|
39
|
+
export declare const isUsingProportionalRadius: (type: string) => type is "line" | "arrow" | "stickynote" | "diamond";
|
|
39
40
|
export declare const canApplyRoundnessTypeToElement: (roundnessType: RoundnessType, element: ExcalidrawElement) => boolean;
|
|
40
41
|
export declare const getDefaultRoundnessTypeForElement: (element: ExcalidrawElement) => {
|
|
41
42
|
type: 2;
|
|
@@ -66,6 +66,11 @@ type _ExcalidrawElementBase = Readonly<{
|
|
|
66
66
|
boundElements: readonly BoundElement[] | null;
|
|
67
67
|
/** epoch (ms) timestamp of last element update */
|
|
68
68
|
updated: number;
|
|
69
|
+
/** Client wall-clock creation time in epoch milliseconds; null if unknown.
|
|
70
|
+
Preserved for this element's lifetime, including edits and undo/redo,
|
|
71
|
+
and excluded from `ElementUpdate` (mutateElement / newElementWith).
|
|
72
|
+
Duplicating an element starts a new lifetime. Not an ordering clock. */
|
|
73
|
+
created: number | null;
|
|
69
74
|
link: string | null;
|
|
70
75
|
locked: boolean;
|
|
71
76
|
customData?: Record<string, any>;
|
|
@@ -76,6 +81,14 @@ export type ExcalidrawSelectionElement = _ExcalidrawElementBase & {
|
|
|
76
81
|
export type ExcalidrawRectangleElement = _ExcalidrawElementBase & {
|
|
77
82
|
type: "rectangle";
|
|
78
83
|
};
|
|
84
|
+
export type ExcalidrawStickyNoteElement = _ExcalidrawElementBase & Readonly<{
|
|
85
|
+
type: "stickynote";
|
|
86
|
+
/**
|
|
87
|
+
* The height the user set, from which the layout derives `height`: the
|
|
88
|
+
* note grows above it to fit its label and never shrinks below it
|
|
89
|
+
*/
|
|
90
|
+
baseHeight: number;
|
|
91
|
+
}>;
|
|
79
92
|
export type ExcalidrawDiamondElement = _ExcalidrawElementBase & {
|
|
80
93
|
type: "diamond";
|
|
81
94
|
};
|
|
@@ -150,14 +163,14 @@ export type ExcalidrawFrameLikeElement = ExcalidrawFrameElement | ExcalidrawMagi
|
|
|
150
163
|
* These are elements that don't have any additional properties.
|
|
151
164
|
*/
|
|
152
165
|
export type ExcalidrawGenericElement = ExcalidrawSelectionElement | ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement;
|
|
153
|
-
export type ExcalidrawFlowchartNodeElement = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement;
|
|
154
|
-
export type ExcalidrawRectanguloidElement = ExcalidrawRectangleElement | ExcalidrawImageElement | ExcalidrawTextElement | ExcalidrawFreeDrawElement | ExcalidrawIframeLikeElement | ExcalidrawFrameLikeElement | ExcalidrawEmbeddableElement | ExcalidrawSelectionElement;
|
|
166
|
+
export type ExcalidrawFlowchartNodeElement = ExcalidrawRectangleElement | ExcalidrawStickyNoteElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement;
|
|
167
|
+
export type ExcalidrawRectanguloidElement = ExcalidrawRectangleElement | ExcalidrawStickyNoteElement | ExcalidrawImageElement | ExcalidrawTextElement | ExcalidrawFreeDrawElement | ExcalidrawIframeLikeElement | ExcalidrawFrameLikeElement | ExcalidrawEmbeddableElement | ExcalidrawSelectionElement;
|
|
155
168
|
/**
|
|
156
169
|
* ExcalidrawElement should be JSON serializable and (eventually) contain
|
|
157
170
|
* no computed data. The list of all ExcalidrawElements should be shareable
|
|
158
171
|
* between peers and contain no state local to the peer.
|
|
159
172
|
*/
|
|
160
|
-
export type ExcalidrawElement = ExcalidrawGenericElement | ExcalidrawTextElement | ExcalidrawLinearElement | ExcalidrawArrowElement | ExcalidrawFreeDrawElement | ExcalidrawImageElement | ExcalidrawFrameElement | ExcalidrawMagicFrameElement | ExcalidrawIframeElement | ExcalidrawEmbeddableElement;
|
|
173
|
+
export type ExcalidrawElement = ExcalidrawGenericElement | ExcalidrawStickyNoteElement | ExcalidrawTextElement | ExcalidrawLinearElement | ExcalidrawArrowElement | ExcalidrawFreeDrawElement | ExcalidrawImageElement | ExcalidrawFrameElement | ExcalidrawMagicFrameElement | ExcalidrawIframeElement | ExcalidrawEmbeddableElement;
|
|
161
174
|
export type ExcalidrawNonSelectionElement = Exclude<ExcalidrawElement, ExcalidrawSelectionElement>;
|
|
162
175
|
export type Ordered<TElement extends ExcalidrawElement> = TElement & {
|
|
163
176
|
index: FractionalIndex;
|
|
@@ -171,10 +184,19 @@ export type ExcalidrawTextElement = _ExcalidrawElementBase & Readonly<{
|
|
|
171
184
|
type: "text";
|
|
172
185
|
fontSize: number;
|
|
173
186
|
fontFamily: FontFamilyValues;
|
|
187
|
+
/**
|
|
188
|
+
* The font size the user picked, from which the layout derives `fontSize`.
|
|
189
|
+
* Today only sticky note labels have one: the auto-fit shrinks below it
|
|
190
|
+
* and never above it (compare `baseHeight`, which the note grows above).
|
|
191
|
+
* `null` for every other text. Read it through `getBaseFontSize` —
|
|
192
|
+
* generic binding repair can detach a label without clearing this, so
|
|
193
|
+
* the container decides its meaning.
|
|
194
|
+
*/
|
|
195
|
+
baseFontSize: number | null;
|
|
174
196
|
text: string;
|
|
175
197
|
textAlign: TextAlign;
|
|
176
198
|
verticalAlign: VerticalAlign;
|
|
177
|
-
containerId:
|
|
199
|
+
containerId: ExcalidrawTextContainer["id"] | null;
|
|
178
200
|
originalText: string;
|
|
179
201
|
/**
|
|
180
202
|
* If `true` the width will fit the text. If `false`, the text will
|
|
@@ -190,9 +212,16 @@ export type ExcalidrawTextElement = _ExcalidrawElementBase & Readonly<{
|
|
|
190
212
|
lineHeight: number & {
|
|
191
213
|
_brand: "unitlessLineHeight";
|
|
192
214
|
};
|
|
215
|
+
/**
|
|
216
|
+
* Position of text bound to a linear element (such as an arrow),
|
|
217
|
+
* expressed as a normalized arc-length parameter (0–1) along the
|
|
218
|
+
* container's whole path. Independent of how the path is segmented,
|
|
219
|
+
* so it survives midpoint insertion and other geometry changes.
|
|
220
|
+
* */
|
|
221
|
+
labelPosition?: number | null;
|
|
193
222
|
}>;
|
|
194
|
-
export type ExcalidrawBindableElement = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawTextElement | ExcalidrawImageElement | ExcalidrawIframeElement | ExcalidrawEmbeddableElement | ExcalidrawFrameElement | ExcalidrawMagicFrameElement;
|
|
195
|
-
export type ExcalidrawTextContainer = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawArrowElement;
|
|
223
|
+
export type ExcalidrawBindableElement = ExcalidrawRectangleElement | ExcalidrawStickyNoteElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawTextElement | ExcalidrawImageElement | ExcalidrawIframeElement | ExcalidrawEmbeddableElement | ExcalidrawFrameElement | ExcalidrawMagicFrameElement;
|
|
224
|
+
export type ExcalidrawTextContainer = ExcalidrawRectangleElement | ExcalidrawStickyNoteElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawArrowElement;
|
|
196
225
|
export type ExcalidrawTextElementWithContainer = {
|
|
197
226
|
containerId: ExcalidrawTextContainer["id"];
|
|
198
227
|
} & ExcalidrawTextElement;
|
|
@@ -2,13 +2,16 @@ import { type GlobalPoint } from "@excalidraw/math";
|
|
|
2
2
|
import type { Curve, LineSegment } from "@excalidraw/math";
|
|
3
3
|
import type { AppState, Zoom } from "@excalidraw/excalidraw/types";
|
|
4
4
|
import type { ElementsMap, ExcalidrawArrowElement, ExcalidrawBindableElement, ExcalidrawDiamondElement, ExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawLinearElement, ExcalidrawRectanguloidElement } from "./types";
|
|
5
|
+
export type LinearPathSegment = LineSegment<GlobalPoint> | Curve<GlobalPoint>;
|
|
6
|
+
type ElementShape = [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
|
|
5
7
|
/**
|
|
6
8
|
* Returns the **rotated** components of freedraw, line or arrow elements.
|
|
7
9
|
*
|
|
8
10
|
* @param element The linear element to deconstruct
|
|
9
11
|
* @returns The rotated in components.
|
|
10
12
|
*/
|
|
11
|
-
export declare function deconstructLinearOrFreeDrawElement(element: ExcalidrawLinearElement | ExcalidrawFreeDrawElement, elementsMap: ElementsMap):
|
|
13
|
+
export declare function deconstructLinearOrFreeDrawElement(element: ExcalidrawLinearElement | ExcalidrawFreeDrawElement, elementsMap: ElementsMap): ElementShape;
|
|
14
|
+
export declare function getLinearElementPathSegments(element: ExcalidrawLinearElement | ExcalidrawFreeDrawElement, elementsMap: ElementsMap): LinearPathSegment[];
|
|
12
15
|
/**
|
|
13
16
|
* Get the building components of a rectanguloid element in the form of
|
|
14
17
|
* line segments and curves **unrotated**.
|
|
@@ -17,7 +20,7 @@ export declare function deconstructLinearOrFreeDrawElement(element: ExcalidrawLi
|
|
|
17
20
|
* @param offset Optional offset to expand the rectanguloid shape
|
|
18
21
|
* @returns Tuple of **unrotated** line segments (0) and curves (1)
|
|
19
22
|
*/
|
|
20
|
-
export declare function deconstructRectanguloidElement(element: ExcalidrawRectanguloidElement, offset?: number):
|
|
23
|
+
export declare function deconstructRectanguloidElement(element: ExcalidrawRectanguloidElement, offset?: number): ElementShape;
|
|
21
24
|
export declare function getDiamondBaseCorners(element: ExcalidrawDiamondElement, offset?: number): Curve<GlobalPoint>[];
|
|
22
25
|
/**
|
|
23
26
|
* Get the **unrotated** building components of a diamond element
|
|
@@ -27,10 +30,11 @@ export declare function getDiamondBaseCorners(element: ExcalidrawDiamondElement,
|
|
|
27
30
|
* @param offset An optional offset
|
|
28
31
|
* @returns Tuple of line **unrotated** segments (0) and curves (1)
|
|
29
32
|
*/
|
|
30
|
-
export declare function deconstructDiamondElement(element: ExcalidrawDiamondElement, offset?: number):
|
|
33
|
+
export declare function deconstructDiamondElement(element: ExcalidrawDiamondElement, offset?: number): ElementShape;
|
|
31
34
|
export declare const isPathALoop: (points: ExcalidrawLinearElement["points"],
|
|
32
35
|
/** supply if you want the loop detection to account for current zoom */
|
|
33
36
|
zoomValue?: Zoom["value"]) => boolean;
|
|
34
37
|
export declare const getCornerRadius: (x: number, element: ExcalidrawElement) => number;
|
|
35
38
|
export declare const getSnapOutlineMidPoint: (point: GlobalPoint, element: ExcalidrawBindableElement, elementsMap: ElementsMap, zoom: AppState["zoom"]) => GlobalPoint | undefined;
|
|
36
39
|
export declare const projectFixedPointOntoDiagonal: (arrow: ExcalidrawArrowElement, point: GlobalPoint, element: ExcalidrawBindableElement, startOrEnd: "start" | "end", elementsMap: ElementsMap, zoom: AppState["zoom"], isMidpointSnappingEnabled?: boolean) => GlobalPoint | null;
|
|
40
|
+
export {};
|
|
@@ -63,6 +63,8 @@ export declare const actionAddToLibrary: {
|
|
|
63
63
|
exportWithDarkMode: boolean;
|
|
64
64
|
exportScale: number;
|
|
65
65
|
currentItemStrokeColor: string;
|
|
66
|
+
currentItemStickynoteStrokeColor: string;
|
|
67
|
+
currentItemStickynoteBackgroundColor: string;
|
|
66
68
|
currentItemBackgroundColor: string;
|
|
67
69
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
68
70
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -167,6 +169,8 @@ export declare const actionAddToLibrary: {
|
|
|
167
169
|
elementStroke: readonly string[] | null;
|
|
168
170
|
elementBackground: readonly string[] | null;
|
|
169
171
|
bucketFill: readonly string[] | null;
|
|
172
|
+
stickyNoteStroke: readonly string[] | null;
|
|
173
|
+
stickyNoteBackground: readonly string[] | null;
|
|
170
174
|
};
|
|
171
175
|
};
|
|
172
176
|
} | {
|
|
@@ -226,6 +230,8 @@ export declare const actionAddToLibrary: {
|
|
|
226
230
|
exportWithDarkMode: boolean;
|
|
227
231
|
exportScale: number;
|
|
228
232
|
currentItemStrokeColor: string;
|
|
233
|
+
currentItemStickynoteStrokeColor: string;
|
|
234
|
+
currentItemStickynoteBackgroundColor: string;
|
|
229
235
|
currentItemBackgroundColor: string;
|
|
230
236
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
231
237
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -335,6 +341,8 @@ export declare const actionAddToLibrary: {
|
|
|
335
341
|
elementStroke: readonly string[] | null;
|
|
336
342
|
elementBackground: readonly string[] | null;
|
|
337
343
|
bucketFill: readonly string[] | null;
|
|
344
|
+
stickyNoteStroke: readonly string[] | null;
|
|
345
|
+
stickyNoteBackground: readonly string[] | null;
|
|
338
346
|
};
|
|
339
347
|
};
|
|
340
348
|
}> | {
|
|
@@ -394,6 +402,8 @@ export declare const actionAddToLibrary: {
|
|
|
394
402
|
exportWithDarkMode: boolean;
|
|
395
403
|
exportScale: number;
|
|
396
404
|
currentItemStrokeColor: string;
|
|
405
|
+
currentItemStickynoteStrokeColor: string;
|
|
406
|
+
currentItemStickynoteBackgroundColor: string;
|
|
397
407
|
currentItemBackgroundColor: string;
|
|
398
408
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
399
409
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -503,6 +513,8 @@ export declare const actionAddToLibrary: {
|
|
|
503
513
|
elementStroke: readonly string[] | null;
|
|
504
514
|
elementBackground: readonly string[] | null;
|
|
505
515
|
bucketFill: readonly string[] | null;
|
|
516
|
+
stickyNoteStroke: readonly string[] | null;
|
|
517
|
+
stickyNoteBackground: readonly string[] | null;
|
|
506
518
|
};
|
|
507
519
|
};
|
|
508
520
|
};
|
|
@@ -11,7 +11,7 @@ export declare const actionAlignTop: {
|
|
|
11
11
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
12
12
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
13
13
|
appState: Readonly<AppState>;
|
|
14
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
14
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
15
15
|
captureUpdate: "IMMEDIATELY";
|
|
16
16
|
};
|
|
17
17
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -29,7 +29,7 @@ export declare const actionAlignBottom: {
|
|
|
29
29
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
30
30
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
31
31
|
appState: Readonly<AppState>;
|
|
32
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
32
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
33
33
|
captureUpdate: "IMMEDIATELY";
|
|
34
34
|
};
|
|
35
35
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -47,7 +47,7 @@ export declare const actionAlignLeft: {
|
|
|
47
47
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
48
48
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
49
49
|
appState: Readonly<AppState>;
|
|
50
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
50
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
51
51
|
captureUpdate: "IMMEDIATELY";
|
|
52
52
|
};
|
|
53
53
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -65,7 +65,7 @@ export declare const actionAlignRight: {
|
|
|
65
65
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
66
66
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
67
67
|
appState: Readonly<AppState>;
|
|
68
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
68
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
69
69
|
captureUpdate: "IMMEDIATELY";
|
|
70
70
|
};
|
|
71
71
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -83,7 +83,7 @@ export declare const actionAlignVerticallyCentered: {
|
|
|
83
83
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
84
84
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
85
85
|
appState: Readonly<AppState>;
|
|
86
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
86
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
87
87
|
captureUpdate: "IMMEDIATELY";
|
|
88
88
|
};
|
|
89
89
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -100,7 +100,7 @@ export declare const actionAlignHorizontallyCentered: {
|
|
|
100
100
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
101
101
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
102
102
|
appState: Readonly<AppState>;
|
|
103
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
103
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
104
104
|
captureUpdate: "IMMEDIATELY";
|
|
105
105
|
};
|
|
106
106
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -83,6 +83,8 @@ export declare const actionBindText: {
|
|
|
83
83
|
exportWithDarkMode: boolean;
|
|
84
84
|
exportScale: number;
|
|
85
85
|
currentItemStrokeColor: string;
|
|
86
|
+
currentItemStickynoteStrokeColor: string;
|
|
87
|
+
currentItemStickynoteBackgroundColor: string;
|
|
86
88
|
currentItemBackgroundColor: string;
|
|
87
89
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
88
90
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -189,6 +191,8 @@ export declare const actionBindText: {
|
|
|
189
191
|
elementStroke: readonly string[] | null;
|
|
190
192
|
elementBackground: readonly string[] | null;
|
|
191
193
|
bucketFill: readonly string[] | null;
|
|
194
|
+
stickyNoteStroke: readonly string[] | null;
|
|
195
|
+
stickyNoteBackground: readonly string[] | null;
|
|
192
196
|
};
|
|
193
197
|
};
|
|
194
198
|
captureUpdate: "IMMEDIATELY";
|
|
@@ -263,6 +267,8 @@ export declare const actionWrapTextInContainer: {
|
|
|
263
267
|
exportWithDarkMode: boolean;
|
|
264
268
|
exportScale: number;
|
|
265
269
|
currentItemStrokeColor: string;
|
|
270
|
+
currentItemStickynoteStrokeColor: string;
|
|
271
|
+
currentItemStickynoteBackgroundColor: string;
|
|
266
272
|
currentItemBackgroundColor: string;
|
|
267
273
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
268
274
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -369,6 +375,8 @@ export declare const actionWrapTextInContainer: {
|
|
|
369
375
|
elementStroke: readonly string[] | null;
|
|
370
376
|
elementBackground: readonly string[] | null;
|
|
371
377
|
bucketFill: readonly string[] | null;
|
|
378
|
+
stickyNoteStroke: readonly string[] | null;
|
|
379
|
+
stickyNoteBackground: readonly string[] | null;
|
|
372
380
|
};
|
|
373
381
|
};
|
|
374
382
|
captureUpdate: "IMMEDIATELY";
|
|
@@ -30,6 +30,8 @@ export declare const actionClearCanvas: {
|
|
|
30
30
|
elementStroke: readonly string[] | null;
|
|
31
31
|
elementBackground: readonly string[] | null;
|
|
32
32
|
bucketFill: readonly string[] | null;
|
|
33
|
+
stickyNoteStroke: readonly string[] | null;
|
|
34
|
+
stickyNoteBackground: readonly string[] | null;
|
|
33
35
|
};
|
|
34
36
|
activeTool: {
|
|
35
37
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -129,6 +131,8 @@ export declare const actionClearCanvas: {
|
|
|
129
131
|
};
|
|
130
132
|
exportWithDarkMode: boolean;
|
|
131
133
|
currentItemStrokeColor: string;
|
|
134
|
+
currentItemStickynoteStrokeColor: string;
|
|
135
|
+
currentItemStickynoteBackgroundColor: string;
|
|
132
136
|
currentItemBackgroundColor: string;
|
|
133
137
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
134
138
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -249,6 +253,8 @@ export declare const actionZoomIn: {
|
|
|
249
253
|
exportWithDarkMode: boolean;
|
|
250
254
|
exportScale: number;
|
|
251
255
|
currentItemStrokeColor: string;
|
|
256
|
+
currentItemStickynoteStrokeColor: string;
|
|
257
|
+
currentItemStickynoteBackgroundColor: string;
|
|
252
258
|
currentItemBackgroundColor: string;
|
|
253
259
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
254
260
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -355,6 +361,8 @@ export declare const actionZoomIn: {
|
|
|
355
361
|
elementStroke: readonly string[] | null;
|
|
356
362
|
elementBackground: readonly string[] | null;
|
|
357
363
|
bucketFill: readonly string[] | null;
|
|
364
|
+
stickyNoteStroke: readonly string[] | null;
|
|
365
|
+
stickyNoteBackground: readonly string[] | null;
|
|
358
366
|
};
|
|
359
367
|
};
|
|
360
368
|
captureUpdate: "EVENTUALLY";
|
|
@@ -433,6 +441,8 @@ export declare const actionZoomOut: {
|
|
|
433
441
|
exportWithDarkMode: boolean;
|
|
434
442
|
exportScale: number;
|
|
435
443
|
currentItemStrokeColor: string;
|
|
444
|
+
currentItemStickynoteStrokeColor: string;
|
|
445
|
+
currentItemStickynoteBackgroundColor: string;
|
|
436
446
|
currentItemBackgroundColor: string;
|
|
437
447
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
438
448
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -539,6 +549,8 @@ export declare const actionZoomOut: {
|
|
|
539
549
|
elementStroke: readonly string[] | null;
|
|
540
550
|
elementBackground: readonly string[] | null;
|
|
541
551
|
bucketFill: readonly string[] | null;
|
|
552
|
+
stickyNoteStroke: readonly string[] | null;
|
|
553
|
+
stickyNoteBackground: readonly string[] | null;
|
|
542
554
|
};
|
|
543
555
|
};
|
|
544
556
|
captureUpdate: "EVENTUALLY";
|
|
@@ -617,6 +629,8 @@ export declare const actionResetZoom: {
|
|
|
617
629
|
exportWithDarkMode: boolean;
|
|
618
630
|
exportScale: number;
|
|
619
631
|
currentItemStrokeColor: string;
|
|
632
|
+
currentItemStickynoteStrokeColor: string;
|
|
633
|
+
currentItemStickynoteBackgroundColor: string;
|
|
620
634
|
currentItemBackgroundColor: string;
|
|
621
635
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
622
636
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -723,6 +737,8 @@ export declare const actionResetZoom: {
|
|
|
723
737
|
elementStroke: readonly string[] | null;
|
|
724
738
|
elementBackground: readonly string[] | null;
|
|
725
739
|
bucketFill: readonly string[] | null;
|
|
740
|
+
stickyNoteStroke: readonly string[] | null;
|
|
741
|
+
stickyNoteBackground: readonly string[] | null;
|
|
726
742
|
};
|
|
727
743
|
};
|
|
728
744
|
captureUpdate: "EVENTUALLY";
|
|
@@ -801,6 +817,8 @@ export declare const actionZoomToFitSelectionInViewport: {
|
|
|
801
817
|
exportWithDarkMode: boolean;
|
|
802
818
|
exportScale: number;
|
|
803
819
|
currentItemStrokeColor: string;
|
|
820
|
+
currentItemStickynoteStrokeColor: string;
|
|
821
|
+
currentItemStickynoteBackgroundColor: string;
|
|
804
822
|
currentItemBackgroundColor: string;
|
|
805
823
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
806
824
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -907,6 +925,8 @@ export declare const actionZoomToFitSelectionInViewport: {
|
|
|
907
925
|
elementStroke: readonly string[] | null;
|
|
908
926
|
elementBackground: readonly string[] | null;
|
|
909
927
|
bucketFill: readonly string[] | null;
|
|
928
|
+
stickyNoteStroke: readonly string[] | null;
|
|
929
|
+
stickyNoteBackground: readonly string[] | null;
|
|
910
930
|
};
|
|
911
931
|
};
|
|
912
932
|
captureUpdate: "EVENTUALLY";
|
|
@@ -984,6 +1004,8 @@ export declare const actionZoomToFitSelection: {
|
|
|
984
1004
|
exportWithDarkMode: boolean;
|
|
985
1005
|
exportScale: number;
|
|
986
1006
|
currentItemStrokeColor: string;
|
|
1007
|
+
currentItemStickynoteStrokeColor: string;
|
|
1008
|
+
currentItemStickynoteBackgroundColor: string;
|
|
987
1009
|
currentItemBackgroundColor: string;
|
|
988
1010
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
989
1011
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -1090,6 +1112,8 @@ export declare const actionZoomToFitSelection: {
|
|
|
1090
1112
|
elementStroke: readonly string[] | null;
|
|
1091
1113
|
elementBackground: readonly string[] | null;
|
|
1092
1114
|
bucketFill: readonly string[] | null;
|
|
1115
|
+
stickyNoteStroke: readonly string[] | null;
|
|
1116
|
+
stickyNoteBackground: readonly string[] | null;
|
|
1093
1117
|
};
|
|
1094
1118
|
};
|
|
1095
1119
|
captureUpdate: "EVENTUALLY";
|
|
@@ -1167,6 +1191,8 @@ export declare const actionZoomToFit: {
|
|
|
1167
1191
|
exportWithDarkMode: boolean;
|
|
1168
1192
|
exportScale: number;
|
|
1169
1193
|
currentItemStrokeColor: string;
|
|
1194
|
+
currentItemStickynoteStrokeColor: string;
|
|
1195
|
+
currentItemStickynoteBackgroundColor: string;
|
|
1170
1196
|
currentItemBackgroundColor: string;
|
|
1171
1197
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
1172
1198
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -1273,6 +1299,8 @@ export declare const actionZoomToFit: {
|
|
|
1273
1299
|
elementStroke: readonly string[] | null;
|
|
1274
1300
|
elementBackground: readonly string[] | null;
|
|
1275
1301
|
bucketFill: readonly string[] | null;
|
|
1302
|
+
stickyNoteStroke: readonly string[] | null;
|
|
1303
|
+
stickyNoteBackground: readonly string[] | null;
|
|
1276
1304
|
};
|
|
1277
1305
|
};
|
|
1278
1306
|
captureUpdate: "EVENTUALLY";
|
|
@@ -64,6 +64,8 @@ export declare const actionPaste: {
|
|
|
64
64
|
exportWithDarkMode: boolean;
|
|
65
65
|
exportScale: number;
|
|
66
66
|
currentItemStrokeColor: string;
|
|
67
|
+
currentItemStickynoteStrokeColor: string;
|
|
68
|
+
currentItemStickynoteBackgroundColor: string;
|
|
67
69
|
currentItemBackgroundColor: string;
|
|
68
70
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
69
71
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -173,6 +175,8 @@ export declare const actionPaste: {
|
|
|
173
175
|
elementStroke: readonly string[] | null;
|
|
174
176
|
elementBackground: readonly string[] | null;
|
|
175
177
|
bucketFill: readonly string[] | null;
|
|
178
|
+
stickyNoteStroke: readonly string[] | null;
|
|
179
|
+
stickyNoteBackground: readonly string[] | null;
|
|
176
180
|
};
|
|
177
181
|
};
|
|
178
182
|
} | {
|
|
@@ -282,6 +286,8 @@ export declare const actionCopyAsPng: {
|
|
|
282
286
|
exportWithDarkMode: boolean;
|
|
283
287
|
exportScale: number;
|
|
284
288
|
currentItemStrokeColor: string;
|
|
289
|
+
currentItemStickynoteStrokeColor: string;
|
|
290
|
+
currentItemStickynoteBackgroundColor: string;
|
|
285
291
|
currentItemBackgroundColor: string;
|
|
286
292
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
287
293
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -391,6 +397,8 @@ export declare const actionCopyAsPng: {
|
|
|
391
397
|
elementStroke: readonly string[] | null;
|
|
392
398
|
elementBackground: readonly string[] | null;
|
|
393
399
|
bucketFill: readonly string[] | null;
|
|
400
|
+
stickyNoteStroke: readonly string[] | null;
|
|
401
|
+
stickyNoteBackground: readonly string[] | null;
|
|
394
402
|
};
|
|
395
403
|
};
|
|
396
404
|
captureUpdate: "EVENTUALLY";
|
|
@@ -65,6 +65,8 @@ export declare const actionToggleCropEditor: {
|
|
|
65
65
|
exportWithDarkMode: boolean;
|
|
66
66
|
exportScale: number;
|
|
67
67
|
currentItemStrokeColor: string;
|
|
68
|
+
currentItemStickynoteStrokeColor: string;
|
|
69
|
+
currentItemStickynoteBackgroundColor: string;
|
|
68
70
|
currentItemBackgroundColor: string;
|
|
69
71
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
70
72
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -172,6 +174,8 @@ export declare const actionToggleCropEditor: {
|
|
|
172
174
|
elementStroke: readonly string[] | null;
|
|
173
175
|
elementBackground: readonly string[] | null;
|
|
174
176
|
bucketFill: readonly string[] | null;
|
|
177
|
+
stickyNoteStroke: readonly string[] | null;
|
|
178
|
+
stickyNoteBackground: readonly string[] | null;
|
|
175
179
|
};
|
|
176
180
|
};
|
|
177
181
|
captureUpdate: "IMMEDIATELY";
|
|
@@ -66,6 +66,8 @@ export declare const actionDeleteSelected: {
|
|
|
66
66
|
exportWithDarkMode: boolean;
|
|
67
67
|
exportScale: number;
|
|
68
68
|
currentItemStrokeColor: string;
|
|
69
|
+
currentItemStickynoteStrokeColor: string;
|
|
70
|
+
currentItemStickynoteBackgroundColor: string;
|
|
69
71
|
currentItemBackgroundColor: string;
|
|
70
72
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
71
73
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -174,6 +176,8 @@ export declare const actionDeleteSelected: {
|
|
|
174
176
|
elementStroke: readonly string[] | null;
|
|
175
177
|
elementBackground: readonly string[] | null;
|
|
176
178
|
bucketFill: readonly string[] | null;
|
|
179
|
+
stickyNoteStroke: readonly string[] | null;
|
|
180
|
+
stickyNoteBackground: readonly string[] | null;
|
|
177
181
|
};
|
|
178
182
|
};
|
|
179
183
|
captureUpdate: "IMMEDIATELY";
|
|
@@ -268,6 +272,8 @@ export declare const actionDeleteSelected: {
|
|
|
268
272
|
exportWithDarkMode: boolean;
|
|
269
273
|
exportScale: number;
|
|
270
274
|
currentItemStrokeColor: string;
|
|
275
|
+
currentItemStickynoteStrokeColor: string;
|
|
276
|
+
currentItemStickynoteBackgroundColor: string;
|
|
271
277
|
currentItemBackgroundColor: string;
|
|
272
278
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
273
279
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -376,11 +382,13 @@ export declare const actionDeleteSelected: {
|
|
|
376
382
|
elementStroke: readonly string[] | null;
|
|
377
383
|
elementBackground: readonly string[] | null;
|
|
378
384
|
bucketFill: readonly string[] | null;
|
|
385
|
+
stickyNoteStroke: readonly string[] | null;
|
|
386
|
+
stickyNoteBackground: readonly string[] | null;
|
|
379
387
|
};
|
|
380
388
|
};
|
|
381
389
|
captureUpdate: "IMMEDIATELY";
|
|
382
390
|
} | {
|
|
383
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
391
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
384
392
|
appState: {
|
|
385
393
|
activeTool: {
|
|
386
394
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -437,6 +445,8 @@ export declare const actionDeleteSelected: {
|
|
|
437
445
|
exportWithDarkMode: boolean;
|
|
438
446
|
exportScale: number;
|
|
439
447
|
currentItemStrokeColor: string;
|
|
448
|
+
currentItemStickynoteStrokeColor: string;
|
|
449
|
+
currentItemStickynoteBackgroundColor: string;
|
|
440
450
|
currentItemBackgroundColor: string;
|
|
441
451
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
442
452
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -538,6 +548,8 @@ export declare const actionDeleteSelected: {
|
|
|
538
548
|
elementStroke: readonly string[] | null;
|
|
539
549
|
elementBackground: readonly string[] | null;
|
|
540
550
|
bucketFill: readonly string[] | null;
|
|
551
|
+
stickyNoteStroke: readonly string[] | null;
|
|
552
|
+
stickyNoteBackground: readonly string[] | null;
|
|
541
553
|
};
|
|
542
554
|
};
|
|
543
555
|
captureUpdate: "IMMEDIATELY" | "EVENTUALLY";
|