@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.
Files changed (39) hide show
  1. package/dist/excalidraw.development.js +49 -38
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/package.json +2 -2
  4. package/types/actions/actionAddToLibrary.d.ts +5 -1
  5. package/types/actions/actionBoundText.d.ts +3 -1
  6. package/types/actions/actionCanvas.d.ts +20 -10
  7. package/types/actions/actionClipboard.d.ts +8 -3
  8. package/types/actions/actionDeleteSelected.d.ts +6 -3
  9. package/types/actions/actionDuplicateSelection.d.ts +1 -1
  10. package/types/actions/actionExport.d.ts +17 -8
  11. package/types/actions/actionFinalize.d.ts +4 -2
  12. package/types/actions/actionLinearEditor.d.ts +3 -1
  13. package/types/actions/actionMenu.d.ts +6 -3
  14. package/types/actions/actionProperties.d.ts +26 -13
  15. package/types/actions/actionStyles.d.ts +2 -1
  16. package/types/actions/actionToggleGridMode.d.ts +2 -1
  17. package/types/actions/actionToggleLock.d.ts +2 -1
  18. package/types/actions/actionToggleStats.d.ts +2 -1
  19. package/types/actions/actionToggleViewMode.d.ts +2 -1
  20. package/types/actions/actionToggleZenMode.d.ts +2 -1
  21. package/types/actions/shortcuts.d.ts +1 -0
  22. package/types/actions/types.d.ts +1 -0
  23. package/types/components/App.d.ts +12 -1
  24. package/types/components/BraveMeasureTextError.d.ts +2 -0
  25. package/types/components/ErrorDialog.d.ts +3 -2
  26. package/types/constants.d.ts +1 -0
  27. package/types/data/blob.d.ts +1 -0
  28. package/types/element/Hyperlink.d.ts +2 -1
  29. package/types/element/linearElementEditor.d.ts +6 -3
  30. package/types/element/mutateElement.d.ts +1 -0
  31. package/types/element/newElement.d.ts +2 -0
  32. package/types/element/textElement.d.ts +24 -6
  33. package/types/element/typeChecks.d.ts +1 -0
  34. package/types/element/types.d.ts +8 -0
  35. package/types/packages/excalidraw/index.d.ts +1 -0
  36. package/types/packages/utils.d.ts +1 -1
  37. package/types/types.d.ts +4 -2
  38. package/types/utility-types.d.ts +22 -0
  39. 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;