@zsviczian/excalidraw 0.17.1-obsidian-50 → 0.17.1-obsidian-52

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.
@@ -273,13 +273,11 @@ export declare const DEFAULT_ELEMENT_PROPS: {
273
273
  locked: ExcalidrawElement["locked"];
274
274
  };
275
275
  export declare const LIBRARY_SIDEBAR_TAB = "library";
276
+ export declare const CANVAS_SEARCH_TAB = "search";
276
277
  export declare const DEFAULT_SIDEBAR: {
277
278
  readonly name: "default";
278
279
  readonly defaultTab: "library";
279
280
  };
280
- export declare const SEARCH_SIDEBAR: {
281
- name: string;
282
- };
283
281
  export declare const LIBRARY_DISABLED_TYPES: Set<"image" | "iframe" | "embeddable">;
284
282
  export declare const TOOL_TYPE: {
285
283
  readonly selection: "selection";
@@ -27,7 +27,6 @@ export declare const newTextElement: (opts: {
27
27
  verticalAlign?: VerticalAlign;
28
28
  containerId?: ExcalidrawTextContainer["id"] | null;
29
29
  lineHeight?: ExcalidrawTextElement["lineHeight"];
30
- strokeWidth?: ExcalidrawTextElement["strokeWidth"];
31
30
  autoResize?: ExcalidrawTextElement["autoResize"];
32
31
  } & ElementConstructorOpts) => NonDeleted<ExcalidrawTextElement>;
33
32
  export declare const refreshTextDimensions: (textElement: ExcalidrawTextElement, container: ExcalidrawTextContainer | null, elementsMap: ElementsMap, text?: string) => {
@@ -1,5 +1,5 @@
1
1
  import type { ElementsMap, ExcalidrawElement } from "./types";
2
- import type { AppState, Zoom } from "../types";
2
+ import type { AppState, Offsets, Zoom } from "../types";
3
3
  export declare const isInvisiblySmallElement: (element: ExcalidrawElement) => boolean;
4
4
  export declare const isElementInViewport: (element: ExcalidrawElement, width: number, height: number, viewTransformations: {
5
5
  zoom: Zoom;
@@ -14,12 +14,7 @@ export declare const isElementCompletelyInViewport: (elements: ExcalidrawElement
14
14
  offsetTop: number;
15
15
  scrollX: number;
16
16
  scrollY: number;
17
- }, elementsMap: ElementsMap, padding?: Partial<{
18
- top: number;
19
- right: number;
20
- bottom: number;
21
- left: number;
22
- }>) => boolean;
17
+ }, elementsMap: ElementsMap, padding?: Offsets) => boolean;
23
18
  /**
24
19
  * Makes a perfect shape or diagonal/horizontal/vertical line
25
20
  */
@@ -31,7 +31,7 @@ export declare class ExcalidrawFont implements Font {
31
31
  private static getFormat;
32
32
  private static normalizeBaseUrl;
33
33
  /**
34
- * zsviczian https://github.com/zsviczian/excalidraw/commit/b4cfaaa4b4f46ca01f94e27fb7bf651a9da99daa
35
- */
34
+ * zsviczian https://github.com/zsviczian/excalidraw/commit/b4cfaaa4b4f46ca01f94e27fb7bf651a9da99daa
35
+ */
36
36
  getContentLegacy(): Promise<string>;
37
37
  }
@@ -1,12 +1,18 @@
1
- import type { AppState, PointerCoords, Zoom } from "../types";
1
+ import type { AppState, Offsets, PointerCoords, Zoom } from "../types";
2
2
  import type { ExcalidrawElement } from "../element/types";
3
- export declare const centerScrollOn: ({ scenePoint, viewportDimensions, zoom, }: {
3
+ export declare const centerScrollOn: ({ scenePoint, viewportDimensions, zoom, offsets, }: {
4
4
  scenePoint: PointerCoords;
5
5
  viewportDimensions: {
6
6
  height: number;
7
7
  width: number;
8
8
  };
9
9
  zoom: Zoom;
10
+ offsets?: Partial<{
11
+ top: number;
12
+ right: number;
13
+ bottom: number;
14
+ left: number;
15
+ }> | undefined;
10
16
  }) => {
11
17
  scrollX: number;
12
18
  scrollY: number;
@@ -710,4 +710,10 @@ export type GenerateDiagramToCode = (props: {
710
710
  }) => MaybePromise<{
711
711
  html: string;
712
712
  }>;
713
+ export type Offsets = Partial<{
714
+ top: number;
715
+ right: number;
716
+ bottom: number;
717
+ left: number;
718
+ }>;
713
719
  export {};
@@ -1,5 +1,6 @@
1
1
  export declare const PRECISION = 0.0001;
2
- export declare function clamp(value: number, min: number, max: number): number;
3
- export declare function round(value: number, precision: number): number;
2
+ export declare const clamp: (value: number, min: number, max: number) => number;
3
+ export declare const round: (value: number, precision: number, func?: "round" | "floor" | "ceil") => number;
4
+ export declare const roundToStep: (value: number, step: number, func?: "round" | "floor" | "ceil") => number;
4
5
  export declare const average: (a: number, b: number) => number;
5
6
  export declare const isFiniteNumber: (value: any) => value is number;