@excalidraw/common 0.18.0-dda3affcb-8fc71066d → 0.18.0-ec07091
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 +67 -6
- package/dist/dev/index.js.map +2 -2
- package/dist/prod/index.js +3 -3
- package/dist/types/common/src/constants.d.ts +20 -4
- package/dist/types/common/src/utils.d.ts +3 -0
- package/dist/types/element/src/bounds.d.ts +1 -1
- package/dist/types/element/src/delta.d.ts +4 -5
- package/dist/types/element/src/index.d.ts +1 -0
- package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
- package/dist/types/element/src/renderElement.d.ts +4 -1
- package/dist/types/element/src/store.d.ts +5 -0
- package/dist/types/element/src/textElement.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +6 -3
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +29 -15
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +12 -6
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +6 -3
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionExport.d.ts +18 -9
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionFrame.d.ts +8 -4
- package/dist/types/excalidraw/actions/actionGroup.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +3 -2
- package/dist/types/excalidraw/actions/actionLink.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionMenu.d.ts +6 -3
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionProperties.d.ts +48 -24
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionStyles.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +2 -1
- package/dist/types/excalidraw/actions/index.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/appState.d.ts +1 -0
- package/dist/types/excalidraw/clipboard.d.ts +64 -1
- package/dist/types/excalidraw/components/Actions.d.ts +8 -1
- package/dist/types/excalidraw/components/App.d.ts +13 -11
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +2 -1
- package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
- package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
- package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +2 -1
- package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
- package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
- package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
- package/dist/types/excalidraw/components/TextField.d.ts +1 -0
- package/dist/types/excalidraw/components/icons.d.ts +6 -0
- package/dist/types/excalidraw/components/shapes.d.ts +129 -1
- package/dist/types/excalidraw/data/blob.d.ts +3 -7
- package/dist/types/excalidraw/data/types.d.ts +4 -1
- package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
- package/dist/types/excalidraw/types.d.ts +6 -3
- package/dist/types/math/src/segment.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IMAGE_MIME_TYPES, UserIdleState, throttleRAF, MIME_TYPES } from "@excalidraw/common";
|
|
2
|
-
import type {
|
|
2
|
+
import type { SuggestedBinding } from "@excalidraw/element";
|
|
3
3
|
import type { LinearElementEditor } from "@excalidraw/element";
|
|
4
4
|
import type { MaybeTransformHandleType } from "@excalidraw/element";
|
|
5
5
|
import type { PointerType, ExcalidrawLinearElement, NonDeletedExcalidrawElement, NonDeleted, TextAlign, ExcalidrawElement, GroupId, ExcalidrawBindableElement, Arrowhead, ChartType, FontFamilyValues, FileId, Theme, StrokeRoundness, ExcalidrawEmbeddableElement, ExcalidrawMagicFrameElement, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeLikeElement, OrderedExcalidrawElement, ExcalidrawNonSelectionElement } from "@excalidraw/element/types";
|
|
@@ -252,7 +252,7 @@ export interface AppState {
|
|
|
252
252
|
isRotating: boolean;
|
|
253
253
|
zoom: Zoom;
|
|
254
254
|
openMenu: "canvas" | "shape" | null;
|
|
255
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | null;
|
|
255
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
256
256
|
openSidebar: {
|
|
257
257
|
name: SidebarName;
|
|
258
258
|
tab?: SidebarTabName;
|
|
@@ -351,6 +351,8 @@ export interface AppState {
|
|
|
351
351
|
lockedMultiSelections: {
|
|
352
352
|
[groupId: string]: true;
|
|
353
353
|
};
|
|
354
|
+
/** properties sidebar mode - determines whether to show compact or complete sidebar */
|
|
355
|
+
stylesPanelMode: "compact" | "full";
|
|
354
356
|
}
|
|
355
357
|
export type SearchMatch = {
|
|
356
358
|
id: string;
|
|
@@ -478,7 +480,6 @@ export type SceneData = {
|
|
|
478
480
|
collaborators?: Map<SocketId, Collaborator>;
|
|
479
481
|
captureUpdate?: CaptureUpdateActionType;
|
|
480
482
|
};
|
|
481
|
-
export type ApplyDeltasOptions = Omit<ApplyToOptions, "skipRedraw">;
|
|
482
483
|
export type ExportOpts = {
|
|
483
484
|
saveFileToDisk?: boolean;
|
|
484
485
|
onExportToBackend?: (exportedElements: readonly NonDeletedExcalidrawElement[], appState: UIAppState, files: BinaryFiles) => void;
|
|
@@ -558,6 +559,7 @@ export type AppClassProperties = {
|
|
|
558
559
|
excalidrawContainerValue: App["excalidrawContainerValue"];
|
|
559
560
|
onPointerUpEmitter: App["onPointerUpEmitter"];
|
|
560
561
|
updateEditorAtom: App["updateEditorAtom"];
|
|
562
|
+
defaultSelectionTool: "selection" | "lasso";
|
|
561
563
|
};
|
|
562
564
|
export type PointerDownState = Readonly<{
|
|
563
565
|
origin: Readonly<{
|
|
@@ -605,6 +607,7 @@ export type PointerDownState = Readonly<{
|
|
|
605
607
|
x: number;
|
|
606
608
|
y: number;
|
|
607
609
|
};
|
|
610
|
+
blockDragging: boolean;
|
|
608
611
|
};
|
|
609
612
|
eventListeners: {
|
|
610
613
|
onMove: null | ReturnType<typeof throttleRAF>;
|
|
@@ -37,3 +37,4 @@ export declare const distanceToLineSegment: <Point extends GlobalPoint | LocalPo
|
|
|
37
37
|
* @returns
|
|
38
38
|
*/
|
|
39
39
|
export declare function lineSegmentIntersectionPoints<Point extends GlobalPoint | LocalPoint>(l: LineSegment<Point>, s: LineSegment<Point>, threshold?: number): Point | null;
|
|
40
|
+
export declare function lineSegmentsDistance<Point extends GlobalPoint | LocalPoint>(s1: LineSegment<Point>, s2: LineSegment<Point>): number;
|