@zsviczian/excalidraw 0.18.0-23 → 0.18.0-24

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 (67) hide show
  1. package/dist/excalidraw.development.js +23 -23
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/package.json +1 -1
  4. package/types/common/src/constants.d.ts +1 -1
  5. package/types/common/src/points.d.ts +1 -1
  6. package/types/common/src/utils.d.ts +2 -2
  7. package/types/element/src/Scene.d.ts +1 -1
  8. package/types/element/src/binding.d.ts +4 -0
  9. package/types/element/src/bounds.d.ts +3 -1
  10. package/types/element/src/elbowArrow.d.ts +1 -1
  11. package/types/element/src/frame.d.ts +2 -2
  12. package/types/element/src/heading.d.ts +2 -2
  13. package/types/element/src/linearElementEditor.d.ts +1 -4
  14. package/types/element/src/resizeTest.d.ts +2 -2
  15. package/types/element/src/selection.d.ts +1 -1
  16. package/types/element/src/shape.d.ts +2 -2
  17. package/types/element/src/store.d.ts +1 -1
  18. package/types/element/src/transformHandles.d.ts +4 -4
  19. package/types/element/src/utils.d.ts +11 -5
  20. package/types/excalidraw/actions/actionAddToLibrary.d.ts +6 -6
  21. package/types/excalidraw/actions/actionAlign.d.ts +8 -8
  22. package/types/excalidraw/actions/actionBoundText.d.ts +4 -4
  23. package/types/excalidraw/actions/actionCanvas.d.ts +137 -137
  24. package/types/excalidraw/actions/actionClipboard.d.ts +17 -17
  25. package/types/excalidraw/actions/actionCropEditor.d.ts +2 -2
  26. package/types/excalidraw/actions/actionDeleteSelected.d.ts +9 -9
  27. package/types/excalidraw/actions/actionDistribute.d.ts +4 -4
  28. package/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  29. package/types/excalidraw/actions/actionElementLink.d.ts +2 -2
  30. package/types/excalidraw/actions/actionElementLock.d.ts +6 -6
  31. package/types/excalidraw/actions/actionEmbeddable.d.ts +2 -2
  32. package/types/excalidraw/actions/actionExport.d.ts +121 -121
  33. package/types/excalidraw/actions/actionFinalize.d.ts +8 -8
  34. package/types/excalidraw/actions/actionFlip.d.ts +4 -4
  35. package/types/excalidraw/actions/actionFrame.d.ts +61 -61
  36. package/types/excalidraw/actions/actionGroup.d.ts +10 -10
  37. package/types/excalidraw/actions/actionLinearEditor.d.ts +53 -53
  38. package/types/excalidraw/actions/actionLink.d.ts +3 -3
  39. package/types/excalidraw/actions/actionMenu.d.ts +8 -8
  40. package/types/excalidraw/actions/actionNavigate.d.ts +4 -4
  41. package/types/excalidraw/actions/actionProperties.d.ts +33 -33
  42. package/types/excalidraw/actions/actionSelectAll.d.ts +5 -5
  43. package/types/excalidraw/actions/actionStyles.d.ts +6 -6
  44. package/types/excalidraw/actions/actionToggleGridMode.d.ts +4 -4
  45. package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +4 -4
  46. package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +4 -4
  47. package/types/excalidraw/actions/actionToggleStats.d.ts +4 -4
  48. package/types/excalidraw/actions/actionToggleViewMode.d.ts +4 -4
  49. package/types/excalidraw/actions/actionToggleZenMode.d.ts +4 -4
  50. package/types/excalidraw/actions/actionZindex.d.ts +8 -8
  51. package/types/excalidraw/appState.d.ts +21 -21
  52. package/types/excalidraw/components/App.d.ts +8 -4
  53. package/types/excalidraw/components/Stats/DragInput.d.ts +11 -1
  54. package/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  55. package/types/excalidraw/components/shapes.d.ts +1 -1
  56. package/types/excalidraw/data/blob.d.ts +1 -1
  57. package/types/excalidraw/data/library.d.ts +1 -1
  58. package/types/math/src/angle.d.ts +1 -1
  59. package/types/math/src/curve.d.ts +1 -1
  60. package/types/math/src/ellipse.d.ts +3 -3
  61. package/types/math/src/point.d.ts +2 -2
  62. package/types/math/src/polygon.d.ts +2 -2
  63. package/types/math/src/rectangle.d.ts +2 -0
  64. package/types/math/src/segment.d.ts +5 -5
  65. package/types/math/src/utils.d.ts +0 -2
  66. package/types/utils/src/shape.d.ts +12 -12
  67. package/types/excalidraw/visualdebug.d.ts +0 -41
@@ -30,13 +30,13 @@ export type GeometricShape<Point extends GlobalPoint | LocalPoint> = {
30
30
  data: Polycurve<Point>;
31
31
  };
32
32
  type RectangularElement = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawFrameLikeElement | ExcalidrawEmbeddableElement | ExcalidrawImageElement | ExcalidrawIframeElement | ExcalidrawTextElement | ExcalidrawSelectionElement;
33
- export declare const getPolygonShape: <Point extends LocalPoint | GlobalPoint>(element: RectangularElement) => GeometricShape<Point>;
34
- export declare const getSelectionBoxShape: <Point extends LocalPoint | GlobalPoint>(element: ExcalidrawElement, elementsMap: ElementsMap, padding?: number) => GeometricShape<Point>;
35
- export declare const getEllipseShape: <Point extends LocalPoint | GlobalPoint>(element: ExcalidrawEllipseElement) => GeometricShape<Point>;
33
+ export declare const getPolygonShape: <Point extends GlobalPoint | LocalPoint>(element: RectangularElement) => GeometricShape<Point>;
34
+ export declare const getSelectionBoxShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawElement, elementsMap: ElementsMap, padding?: number) => GeometricShape<Point>;
35
+ export declare const getEllipseShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawEllipseElement) => GeometricShape<Point>;
36
36
  export declare const getCurvePathOps: (shape: Drawable) => Op[];
37
- export declare const getCurveShape: <Point extends LocalPoint | GlobalPoint>(roughShape: Drawable, startingPoint: Point | undefined, angleInRadian: Radians, center: Point) => GeometricShape<Point>;
38
- export declare const getFreedrawShape: <Point extends LocalPoint | GlobalPoint>(element: ExcalidrawFreeDrawElement, center: Point, isClosed?: boolean) => GeometricShape<Point>;
39
- export declare const getClosedCurveShape: <Point extends LocalPoint | GlobalPoint>(element: ExcalidrawLinearElement, roughShape: Drawable, startingPoint: Point | undefined, angleInRadian: Radians, center: Point) => GeometricShape<Point>;
37
+ export declare const getCurveShape: <Point extends GlobalPoint | LocalPoint>(roughShape: Drawable, startingPoint: Point | undefined, angleInRadian: Radians, center: Point) => GeometricShape<Point>;
38
+ export declare const getFreedrawShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawFreeDrawElement, center: Point, isClosed?: boolean) => GeometricShape<Point>;
39
+ export declare const getClosedCurveShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawLinearElement, roughShape: Drawable, startingPoint: Point | undefined, angleInRadian: Radians, center: Point) => GeometricShape<Point>;
40
40
  /**
41
41
  * Determine intersection of a rectangular shaped element and a
42
42
  * line segment.
@@ -46,13 +46,13 @@ export declare const getClosedCurveShape: <Point extends LocalPoint | GlobalPoin
46
46
  * @param gap Optional value to inflate the shape before testing
47
47
  * @returns An array of intersections
48
48
  */
49
- export declare const segmentIntersectRectangleElement: <Point extends LocalPoint | GlobalPoint>(element: ExcalidrawBindableElement, segment: LineSegment<Point>, gap?: number) => Point[];
50
- export declare const pointOnEllipse: <Point extends LocalPoint | GlobalPoint>(point: Point, ellipse: Ellipse<Point>, threshold?: number) => boolean;
51
- export declare const pointInEllipse: <Point extends LocalPoint | GlobalPoint>(p: Point, ellipse: Ellipse<Point>) => boolean;
52
- export declare const ellipseAxes: <Point extends LocalPoint | GlobalPoint>(ellipse: Ellipse<Point>) => {
49
+ export declare const segmentIntersectRectangleElement: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawBindableElement, segment: LineSegment<Point>, gap?: number) => Point[];
50
+ export declare const pointOnEllipse: <Point extends GlobalPoint | LocalPoint>(point: Point, ellipse: Ellipse<Point>, threshold?: number) => boolean;
51
+ export declare const pointInEllipse: <Point extends GlobalPoint | LocalPoint>(p: Point, ellipse: Ellipse<Point>) => boolean;
52
+ export declare const ellipseAxes: <Point extends GlobalPoint | LocalPoint>(ellipse: Ellipse<Point>) => {
53
53
  majorAxis: number;
54
54
  minorAxis: number;
55
55
  };
56
- export declare const ellipseFocusToCenter: <Point extends LocalPoint | GlobalPoint>(ellipse: Ellipse<Point>) => number;
57
- export declare const ellipseExtremes: <Point extends LocalPoint | GlobalPoint>(ellipse: Ellipse<Point>) => import("@excalidraw/math").Vector[];
56
+ export declare const ellipseFocusToCenter: <Point extends GlobalPoint | LocalPoint>(ellipse: Ellipse<Point>) => number;
57
+ export declare const ellipseExtremes: <Point extends GlobalPoint | LocalPoint>(ellipse: Ellipse<Point>) => import("@excalidraw/math").Vector[];
58
58
  export {};
@@ -1,41 +0,0 @@
1
- import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
2
- import type { Curve } from "@excalidraw/math";
3
- import type { LineSegment } from "@excalidraw/utils";
4
- import type { Bounds } from "@excalidraw/element";
5
- declare global {
6
- interface Window {
7
- visualDebug?: {
8
- data: DebugElement[][];
9
- currentFrame?: number;
10
- };
11
- }
12
- }
13
- export type DebugElement = {
14
- color: string;
15
- data: LineSegment<GlobalPoint> | Curve<GlobalPoint>;
16
- permanent: boolean;
17
- };
18
- export declare const debugDrawCubicBezier: (c: Curve<GlobalPoint>, opts?: {
19
- color?: string;
20
- permanent?: boolean;
21
- }) => void;
22
- export declare const debugDrawLine: (segment: LineSegment<GlobalPoint> | LineSegment<GlobalPoint>[], opts?: {
23
- color?: string;
24
- permanent?: boolean;
25
- }) => void;
26
- export declare const debugDrawPoint: (p: GlobalPoint, opts?: {
27
- color?: string;
28
- permanent?: boolean;
29
- fuzzy?: boolean;
30
- }) => void;
31
- export declare const debugDrawBounds: (box: Bounds | Bounds[], opts?: {
32
- color?: string;
33
- permanent?: boolean;
34
- }) => void;
35
- export declare const debugDrawPoints: ({ x, y, points, }: {
36
- x: number;
37
- y: number;
38
- points: LocalPoint[];
39
- }, options?: any) => void;
40
- export declare const debugCloseFrame: () => void;
41
- export declare const debugClear: () => void;