@excalidraw/excalidraw 0.16.0 → 0.16.1
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/CHANGELOG.md +15 -0
- package/dist/excalidraw-assets/locales/{id-ID-json-43d505d7071a0e359681.js → id-ID-json-0e69caf5d919807ed234.js} +1 -1
- package/dist/excalidraw.development.js +19 -8
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/components/ColorPicker/ColorInput.d.ts +3 -2
- package/types/components/EyeDropper.d.ts +17 -6
- package/types/hooks/useStable.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { ColorPickerType } from "./colorPickerUtils";
|
|
1
2
|
interface ColorInputProps {
|
|
2
3
|
color: string;
|
|
3
4
|
onChange: (color: string) => void;
|
|
4
5
|
label: string;
|
|
5
|
-
|
|
6
|
+
colorPickerType: ColorPickerType;
|
|
6
7
|
}
|
|
7
|
-
export declare const ColorInput: ({ color, onChange, label,
|
|
8
|
+
export declare const ColorInput: ({ color, onChange, label, colorPickerType, }: ColorInputProps) => JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -1,17 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import "./EyeDropper.scss";
|
|
2
|
-
|
|
3
|
+
import { ColorPickerType } from "./ColorPicker/colorPickerUtils";
|
|
4
|
+
import { ExcalidrawElement } from "../element/types";
|
|
5
|
+
export type EyeDropperProperties = {
|
|
3
6
|
keepOpenOnAlt: boolean;
|
|
4
7
|
swapPreviewOnAlt?: boolean;
|
|
8
|
+
/** called when user picks color (on pointerup) */
|
|
5
9
|
onSelect: (color: string, event: PointerEvent) => void;
|
|
6
|
-
|
|
10
|
+
/**
|
|
11
|
+
* property of selected elements to update live when alt-dragging.
|
|
12
|
+
* Supply `null` if not applicable (e.g. updating the canvas bg instead of
|
|
13
|
+
* elements)
|
|
14
|
+
**/
|
|
15
|
+
colorPickerType: ColorPickerType;
|
|
7
16
|
};
|
|
8
17
|
export declare const activeEyeDropperAtom: import("jotai").PrimitiveAtom<EyeDropperProperties | null> & {
|
|
9
18
|
init: EyeDropperProperties | null;
|
|
10
19
|
};
|
|
11
20
|
export declare const EyeDropper: React.FC<{
|
|
12
21
|
onCancel: () => void;
|
|
13
|
-
onSelect:
|
|
14
|
-
|
|
15
|
-
|
|
22
|
+
onSelect: EyeDropperProperties["onSelect"];
|
|
23
|
+
/** called when color changes, on pointerdown for preview */
|
|
24
|
+
onChange: (type: ColorPickerType, color: string, selectedElements: ExcalidrawElement[], event: {
|
|
25
|
+
altKey: boolean;
|
|
26
|
+
}) => void;
|
|
27
|
+
colorPickerType: EyeDropperProperties["colorPickerType"];
|
|
16
28
|
}>;
|
|
17
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useStable: <T extends Record<string, any>>(value: T) => T;
|