@zsviczian/excalidraw 0.14.2-obsidian-2 → 0.14.2-obsidian-3
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/excalidraw.development.js +49 -38
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +2 -2
- package/types/actions/actionAddToLibrary.d.ts +5 -1
- package/types/actions/actionBoundText.d.ts +3 -1
- package/types/actions/actionCanvas.d.ts +20 -10
- package/types/actions/actionClipboard.d.ts +8 -3
- package/types/actions/actionDeleteSelected.d.ts +6 -3
- package/types/actions/actionDuplicateSelection.d.ts +1 -1
- package/types/actions/actionExport.d.ts +17 -8
- package/types/actions/actionFinalize.d.ts +4 -2
- package/types/actions/actionLinearEditor.d.ts +3 -1
- package/types/actions/actionMenu.d.ts +6 -3
- package/types/actions/actionProperties.d.ts +26 -13
- package/types/actions/actionStyles.d.ts +2 -1
- package/types/actions/actionToggleGridMode.d.ts +2 -1
- package/types/actions/actionToggleLock.d.ts +2 -1
- package/types/actions/actionToggleStats.d.ts +2 -1
- package/types/actions/actionToggleViewMode.d.ts +2 -1
- package/types/actions/actionToggleZenMode.d.ts +2 -1
- package/types/actions/shortcuts.d.ts +1 -0
- package/types/actions/types.d.ts +1 -0
- package/types/components/App.d.ts +12 -1
- package/types/components/BraveMeasureTextError.d.ts +2 -0
- package/types/components/ErrorDialog.d.ts +3 -2
- package/types/constants.d.ts +1 -0
- package/types/data/blob.d.ts +1 -0
- package/types/element/Hyperlink.d.ts +2 -1
- package/types/element/linearElementEditor.d.ts +6 -3
- package/types/element/mutateElement.d.ts +1 -0
- package/types/element/newElement.d.ts +2 -0
- package/types/element/textElement.d.ts +24 -6
- package/types/element/typeChecks.d.ts +1 -0
- package/types/element/types.d.ts +8 -0
- package/types/packages/excalidraw/index.d.ts +1 -0
- package/types/packages/utils.d.ts +1 -1
- package/types/types.d.ts +4 -2
- package/types/utility-types.d.ts +22 -0
- package/types/utils.d.ts +20 -0
package/types/utils.d.ts
CHANGED
|
@@ -28,6 +28,26 @@ export declare const throttleRAF: <T extends any[]>(fn: (...args: T) => void, op
|
|
|
28
28
|
flush(): void;
|
|
29
29
|
cancel(): void;
|
|
30
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* Compute new values based on the same ease function and trigger the
|
|
33
|
+
* callback through a requestAnimationFrame call
|
|
34
|
+
*
|
|
35
|
+
* use `opts` to define a duration and/or an easeFn
|
|
36
|
+
*
|
|
37
|
+
* for example:
|
|
38
|
+
* ```ts
|
|
39
|
+
* easeToValuesRAF([10, 20, 10], [0, 0, 0], (a, b, c) => setState(a,b, c))
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @param fromValues The initial values, must be numeric
|
|
43
|
+
* @param toValues The destination values, must also be numeric
|
|
44
|
+
* @param callback The callback receiving the values
|
|
45
|
+
* @param opts default to 250ms duration and the easeOut function
|
|
46
|
+
*/
|
|
47
|
+
export declare const easeToValuesRAF: (fromValues: number[], toValues: number[], callback: (...values: number[]) => void, opts?: {
|
|
48
|
+
duration?: number | undefined;
|
|
49
|
+
easeFn?: ((value: number) => number) | undefined;
|
|
50
|
+
} | undefined) => () => void;
|
|
31
51
|
export declare const chunk: <T extends unknown>(array: readonly T[], size: number) => T[][];
|
|
32
52
|
export declare const selectNode: (node: Element) => void;
|
|
33
53
|
export declare const removeSelection: () => void;
|