@excalidraw/math 0.18.0-ab0255f → 0.18.0-abeeaeb
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/types/common/src/colors.d.ts +5 -7
- package/dist/types/element/src/sortElements.d.ts +10 -0
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +15 -6
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +10 -4
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +35 -14
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +10 -4
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +15 -6
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +10 -4
- package/dist/types/excalidraw/actions/actionExport.d.ts +10 -4
- package/dist/types/excalidraw/actions/actionFrame.d.ts +15 -6
- package/dist/types/excalidraw/actions/actionGroup.d.ts +11 -5
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionLink.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionMenu.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionProperties.d.ts +10 -4
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionStyles.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +5 -2
- package/dist/types/excalidraw/appState.d.ts +5 -0
- package/dist/types/excalidraw/components/App.bucketFill.d.ts +14 -0
- package/dist/types/excalidraw/components/App.cursor.d.ts +2 -3
- package/dist/types/excalidraw/components/App.d.ts +12 -5
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +6 -2
- package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -1
- package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +4 -2
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +4 -2
- package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
- package/dist/types/excalidraw/components/ColorPicker/topPicksDnD.d.ts +31 -0
- package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
- package/dist/types/excalidraw/components/UserList.d.ts +3 -2
- package/dist/types/excalidraw/components/ViewportStatusFrame/ViewportStatusFrame.d.ts +11 -0
- package/dist/types/excalidraw/components/icons.d.ts +3 -0
- package/dist/types/excalidraw/data/blob.d.ts +10 -4
- package/dist/types/excalidraw/data/json.d.ts +5 -2
- package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
- package/dist/types/excalidraw/types.d.ts +47 -4
- package/dist/types/excalidraw/viewport.d.ts +5 -2
- package/package.json +2 -2
- package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
|
@@ -57,6 +57,7 @@ export declare const saveAs: import("react/jsx-runtime").JSX.Element;
|
|
|
57
57
|
export declare const LoadIcon: import("react/jsx-runtime").JSX.Element;
|
|
58
58
|
export declare const clipboard: import("react/jsx-runtime").JSX.Element;
|
|
59
59
|
export declare const palette: import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
export declare const bucketFillIconSvgPaths: readonly ["M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z", "M13.737 9.737c2.299 -2.3 3.23 -5.095 2.081 -6.245c-1.15 -1.15 -3.945 -.217 -6.244 2.082c-2.3 2.299 -3.231 5.095 -2.082 6.244c1.15 1.15 3.946 .218 6.245 -2.081z", "M7.492 11.818c.362 .362 .768 .676 1.208 .934l6.895 4.047c1.078 .557 2.255 -.075 3.692 -1.512c1.437 -1.437 2.07 -2.614 1.512 -3.692c-.372 -.718 -1.72 -3.017 -4.047 -6.895a6.015 6.015 0 0 0 -.934 -1.208"];
|
|
60
61
|
export declare const bucketFillIcon: import("react/jsx-runtime").JSX.Element;
|
|
61
62
|
export declare const slashIcon: import("react/jsx-runtime").JSX.Element;
|
|
62
63
|
export declare const ExportImageIcon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -196,6 +197,7 @@ export declare const playerPlayIcon: import("react/jsx-runtime").JSX.Element;
|
|
|
196
197
|
export declare const playerStopFilledIcon: import("react/jsx-runtime").JSX.Element;
|
|
197
198
|
export declare const tablerCheckIcon: import("react/jsx-runtime").JSX.Element;
|
|
198
199
|
export declare const alertTriangleIcon: import("react/jsx-runtime").JSX.Element;
|
|
200
|
+
export declare const eyeDropperIconSvgPaths: readonly ["M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z", "M11 7l6 6"];
|
|
199
201
|
export declare const eyeDropperIcon: import("react/jsx-runtime").JSX.Element;
|
|
200
202
|
export declare const frameToolIcon: import("react/jsx-runtime").JSX.Element;
|
|
201
203
|
export declare const mermaidLogoIcon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -250,6 +252,7 @@ export declare const sidebarRightIcon: import("react/jsx-runtime").JSX.Element;
|
|
|
250
252
|
export declare const messageCircleIcon: import("react/jsx-runtime").JSX.Element;
|
|
251
253
|
export declare const presentationIcon: import("react/jsx-runtime").JSX.Element;
|
|
252
254
|
export declare const emptyIcon: import("react/jsx-runtime").JSX.Element;
|
|
255
|
+
export declare const chevronDownIcon: import("react/jsx-runtime").JSX.Element;
|
|
253
256
|
export declare const chevronRight: import("react/jsx-runtime").JSX.Element;
|
|
254
257
|
export declare const settingsIcon: import("react/jsx-runtime").JSX.Element;
|
|
255
258
|
export {};
|
|
@@ -172,11 +172,14 @@ fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
|
172
172
|
y: number;
|
|
173
173
|
} | null;
|
|
174
174
|
objectsSnapModeEnabled: boolean;
|
|
175
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
176
|
-
followedBy: Set<import("../types").SocketId>;
|
|
177
175
|
lockedMultiSelections: {
|
|
178
176
|
[groupId: string]: true;
|
|
179
177
|
};
|
|
178
|
+
colorTopPicks: {
|
|
179
|
+
elementStroke: readonly string[] | null;
|
|
180
|
+
elementBackground: readonly string[] | null;
|
|
181
|
+
bucketFill: readonly string[] | null;
|
|
182
|
+
};
|
|
180
183
|
};
|
|
181
184
|
files: import("../types").BinaryFiles;
|
|
182
185
|
};
|
|
@@ -343,11 +346,14 @@ fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
|
343
346
|
y: number;
|
|
344
347
|
} | null;
|
|
345
348
|
objectsSnapModeEnabled: boolean;
|
|
346
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
347
|
-
followedBy: Set<import("../types").SocketId>;
|
|
348
349
|
lockedMultiSelections: {
|
|
349
350
|
[groupId: string]: true;
|
|
350
351
|
};
|
|
352
|
+
colorTopPicks: {
|
|
353
|
+
elementStroke: readonly string[] | null;
|
|
354
|
+
elementBackground: readonly string[] | null;
|
|
355
|
+
bucketFill: readonly string[] | null;
|
|
356
|
+
};
|
|
351
357
|
};
|
|
352
358
|
files: import("../types").BinaryFiles;
|
|
353
359
|
}>;
|
|
@@ -170,11 +170,14 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
170
170
|
y: number;
|
|
171
171
|
} | null;
|
|
172
172
|
objectsSnapModeEnabled: boolean;
|
|
173
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
174
|
-
followedBy: Set<import("../types").SocketId>;
|
|
175
173
|
lockedMultiSelections: {
|
|
176
174
|
[groupId: string]: true;
|
|
177
175
|
};
|
|
176
|
+
colorTopPicks: {
|
|
177
|
+
elementStroke: readonly string[] | null;
|
|
178
|
+
elementBackground: readonly string[] | null;
|
|
179
|
+
bucketFill: readonly string[] | null;
|
|
180
|
+
};
|
|
178
181
|
};
|
|
179
182
|
files: BinaryFiles;
|
|
180
183
|
}>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ElementsSegmentsMap, GlobalPoint } from "@excalidraw/math/types";
|
|
2
2
|
import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types";
|
|
3
|
+
import type { BoxSelectionMode } from "../types";
|
|
3
4
|
export declare const getLassoSelectedElementIds: (input: {
|
|
4
5
|
lassoPath: GlobalPoint[];
|
|
5
6
|
elements: readonly ExcalidrawElement[];
|
|
@@ -8,6 +9,7 @@ export declare const getLassoSelectedElementIds: (input: {
|
|
|
8
9
|
intersectedElements: Set<ExcalidrawElement["id"]>;
|
|
9
10
|
enclosedElements: Set<ExcalidrawElement["id"]>;
|
|
10
11
|
simplifyDistance?: number;
|
|
12
|
+
mode?: BoxSelectionMode;
|
|
11
13
|
}) => {
|
|
12
14
|
selectedElementIds: string[];
|
|
13
15
|
};
|
|
@@ -414,10 +414,6 @@ export interface AppState {
|
|
|
414
414
|
y: number;
|
|
415
415
|
} | null;
|
|
416
416
|
objectsSnapModeEnabled: boolean;
|
|
417
|
-
/** the user's socket id & username who is being followed on the canvas */
|
|
418
|
-
userToFollow: UserToFollow | null;
|
|
419
|
-
/** the socket ids of the users following the current user */
|
|
420
|
-
followedBy: Set<SocketId>;
|
|
421
417
|
/** image cropping */
|
|
422
418
|
isCropping: boolean;
|
|
423
419
|
croppingElementId: ExcalidrawElement["id"] | null;
|
|
@@ -432,6 +428,17 @@ export interface AppState {
|
|
|
432
428
|
[groupId: string]: true;
|
|
433
429
|
};
|
|
434
430
|
bindMode: BindMode;
|
|
431
|
+
/** user-customized color-picker top picks (pinned via drag & drop from the
|
|
432
|
+
* color picker popup). `null` means no customization (defaults, or
|
|
433
|
+
* host-supplied `topPicks`, are used). Kept per picker. */
|
|
434
|
+
colorTopPicks: {
|
|
435
|
+
elementStroke: readonly string[] | null;
|
|
436
|
+
elementBackground: readonly string[] | null;
|
|
437
|
+
/** the bucket-fill tool keeps a list separate from `elementBackground`
|
|
438
|
+
* even though both drive `currentItemBackgroundColor` (its defaults and
|
|
439
|
+
* use case differ — no transparent) */
|
|
440
|
+
bucketFill: readonly string[] | null;
|
|
441
|
+
};
|
|
435
442
|
}
|
|
436
443
|
export type SearchMatch = {
|
|
437
444
|
id: string;
|
|
@@ -495,6 +502,23 @@ export type OnUserFollowedPayload = {
|
|
|
495
502
|
userToFollow: UserToFollow;
|
|
496
503
|
action: "FOLLOW" | "UNFOLLOW";
|
|
497
504
|
};
|
|
505
|
+
export type ViewportStatusFrame = {
|
|
506
|
+
/** the badge (bottom-center pill) */
|
|
507
|
+
label?: {
|
|
508
|
+
label: React.ReactNode;
|
|
509
|
+
icon?: React.ReactNode;
|
|
510
|
+
/** badge background; defaults to var(--color-primary-hover) */
|
|
511
|
+
background?: string;
|
|
512
|
+
/** badge text color; defaults to var(--color-primary-light) */
|
|
513
|
+
color?: string;
|
|
514
|
+
/** makes the badge label interactive */
|
|
515
|
+
onClick?: () => void;
|
|
516
|
+
/** renders a close button when set */
|
|
517
|
+
onClose?: () => void;
|
|
518
|
+
};
|
|
519
|
+
/** viewport-edge border: CSS color, or `false` for none */
|
|
520
|
+
border: false | string;
|
|
521
|
+
};
|
|
498
522
|
export type OnExportProgress = {
|
|
499
523
|
type: "progress";
|
|
500
524
|
message?: React.ReactNode;
|
|
@@ -607,6 +631,7 @@ export type UIConfig = {
|
|
|
607
631
|
};
|
|
608
632
|
};
|
|
609
633
|
export interface ExcalidrawProps {
|
|
634
|
+
className?: string;
|
|
610
635
|
onChange?: (elements: readonly OrderedExcalidrawElement[], appState: AppState, files: BinaryFiles) => void;
|
|
611
636
|
onThemeChange?: (theme: Theme | "system") => void;
|
|
612
637
|
/**
|
|
@@ -756,6 +781,21 @@ export interface ExcalidrawProps {
|
|
|
756
781
|
aiEnabled?: boolean;
|
|
757
782
|
showDeprecatedFonts?: boolean;
|
|
758
783
|
renderScrollbars?: boolean;
|
|
784
|
+
viewportStatusFrame?: ViewportStatusFrame | null;
|
|
785
|
+
/**
|
|
786
|
+
* Rendered inside the UserList "who's here" dropdown (desktop) and inline
|
|
787
|
+
* in the mobile menu's collaborators section, below a divider. Accepts a
|
|
788
|
+
* render function — called with `isMobile` so hosts can render different
|
|
789
|
+
* UI for each surface — in addition to a plain node.
|
|
790
|
+
*/
|
|
791
|
+
currentUserControls?: React.ReactNode | ((isMobile: boolean) => React.ReactNode);
|
|
792
|
+
/**
|
|
793
|
+
* The user being followed on the canvas, if any. Controlled by the host —
|
|
794
|
+
* the editor never sets it; it emits follow/unfollow intents via
|
|
795
|
+
* `onUserFollow` (prop or imperative API) and renders the followed
|
|
796
|
+
* user's avatar highlight from this value.
|
|
797
|
+
*/
|
|
798
|
+
userToFollow?: UserToFollow | null;
|
|
759
799
|
/**
|
|
760
800
|
* Called before exporting to a file.
|
|
761
801
|
*
|
|
@@ -875,6 +915,7 @@ export type AppClassProperties = {
|
|
|
875
915
|
flowchart: App["flowchart"];
|
|
876
916
|
drawShape: App["drawShape"];
|
|
877
917
|
cursor: App["cursor"];
|
|
918
|
+
bucketFill: App["bucketFill"];
|
|
878
919
|
isToolLocked: App["isToolLocked"];
|
|
879
920
|
getEffectiveGridSize: App["getEffectiveGridSize"];
|
|
880
921
|
setPlugins: App["setPlugins"];
|
|
@@ -889,6 +930,8 @@ export type AppClassProperties = {
|
|
|
889
930
|
lastPointerMoveCoords: App["lastPointerMoveCoords"];
|
|
890
931
|
lastPointerMoveEvent: App["lastPointerMoveEvent"];
|
|
891
932
|
bindModeHandler: App["bindModeHandler"];
|
|
933
|
+
emitUserFollowIntent: App["emitUserFollowIntent"];
|
|
934
|
+
requestUnfollow: App["requestUnfollow"];
|
|
892
935
|
setAppState: App["setAppState"];
|
|
893
936
|
isInteractionEnabled: App["isInteractionEnabled"];
|
|
894
937
|
isNavigationEnabled: App["isNavigationEnabled"];
|
|
@@ -233,8 +233,6 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fit, m
|
|
|
233
233
|
y: number;
|
|
234
234
|
} | null;
|
|
235
235
|
objectsSnapModeEnabled: boolean;
|
|
236
|
-
userToFollow: import("./types").UserToFollow | null;
|
|
237
|
-
followedBy: Set<import("./types").SocketId>;
|
|
238
236
|
isCropping: boolean;
|
|
239
237
|
croppingElementId: ExcalidrawElement["id"] | null;
|
|
240
238
|
searchMatches: Readonly<{
|
|
@@ -246,6 +244,11 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fit, m
|
|
|
246
244
|
[groupId: string]: true;
|
|
247
245
|
};
|
|
248
246
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
247
|
+
colorTopPicks: {
|
|
248
|
+
elementStroke: readonly string[] | null;
|
|
249
|
+
elementBackground: readonly string[] | null;
|
|
250
|
+
bucketFill: readonly string[] | null;
|
|
251
|
+
};
|
|
249
252
|
};
|
|
250
253
|
captureUpdate: "EVENTUALLY";
|
|
251
254
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@excalidraw/math",
|
|
3
|
-
"version": "0.18.0-
|
|
3
|
+
"version": "0.18.0-abeeaeb",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/types/math/src/index.d.ts",
|
|
6
6
|
"main": "./dist/prod/index.js",
|
|
@@ -61,6 +61,6 @@
|
|
|
61
61
|
"build:esm": "rimraf dist && node ../../scripts/buildBase.js && yarn gen:types"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@excalidraw/common": "0.18.0-
|
|
64
|
+
"@excalidraw/common": "0.18.0-abeeaeb"
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import "./FollowMode.scss";
|
|
2
|
-
import type { UserToFollow } from "../../types";
|
|
3
|
-
interface FollowModeProps {
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
userToFollow: UserToFollow;
|
|
7
|
-
onDisconnect: () => void;
|
|
8
|
-
}
|
|
9
|
-
declare const FollowMode: ({ height, width, userToFollow, onDisconnect, }: FollowModeProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export default FollowMode;
|