scanbot-web-sdk 2.8.0-alpha1 → 2.8.0-beta3

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.
@@ -43,7 +43,8 @@ export default class DocumentScannerView extends ScannerView<DocumentScannerProp
43
43
  updateButton(action: ShutterButtonAction): void;
44
44
  render(): JSX.Element;
45
45
  defaultCaptureButtonClick: () => Promise<void>;
46
- private polygonPointsToPixels;
46
+ private scalePolygonPointsToPixels;
47
47
  private runMovementPredicate;
48
+ private getCameraFrameSize;
48
49
  }
49
50
  export {};
@@ -1,6 +1,3 @@
1
1
  export declare class Debugger {
2
- static saveImageData(data: ImageData): void;
3
- static saveBlob(blob: Blob, name: string): void;
4
- static uuid(): string;
5
2
  static warn(message: string): void;
6
3
  }
@@ -2,6 +2,7 @@
2
2
  * Utils with a public API. Initialized in ScanbotSDK entry point
3
3
  */
4
4
  export default class PublicUtils {
5
+ saveImageAsJpeg(data: Uint8Array, name?: string): void;
5
6
  isCameraSupported(): boolean;
6
7
  flash(): void;
7
8
  private findFlashElement;
@@ -10,6 +10,6 @@ export declare class Point {
10
10
  static scaleDownTo(pt: Point, size: Size): Point;
11
11
  static fromHtmlElement(element: HTMLElement): Point;
12
12
  static withScale(x: number, y: number, scale: number): Point;
13
- static fromTouches(touches: any, rotations: number, scale: number): Point;
13
+ static fromCoordinates(clientX: any, clientY: any, rotations: number, scale: number): Point;
14
14
  static empty(): Point;
15
15
  }
@@ -4,4 +4,6 @@ export declare class ImageUtils {
4
4
  static toDataUrl(buffer: ArrayBuffer): Promise<string>;
5
5
  static getObjectFitSize(container: Size, size: Size, contains?: boolean): Frame;
6
6
  static loadFromUrl(imageURL: string): Promise<ImageData>;
7
+ static saveImageData(data: ImageData): void;
8
+ static saveBlob(blob: Blob, name: string): void;
7
9
  }
@@ -6,9 +6,9 @@ export declare class PolygonMovementPredicate {
6
6
  private maxDistance;
7
7
  private sensitivity;
8
8
  constructor(videoSize: VideoSize, sensitivity?: Number);
9
- checkPredicate(polygon: Polygon): boolean;
10
- resetPredicate(): void;
11
- updatePredicate(polygon: Polygon): void;
9
+ check(polygon: Polygon): boolean;
10
+ reset(): void;
11
+ update(polygon: Polygon): void;
12
12
  private isPointMoved;
13
13
  private calculateMaxDistance;
14
14
  }
@@ -3,4 +3,5 @@ export declare class Utils {
3
3
  static containsString(content: string, substring: string): boolean;
4
4
  static copy(item: any): any;
5
5
  static getProperty(obj: any, propertyName: string): string;
6
+ static uuid(): string;
6
7
  }
@@ -7,8 +7,9 @@ export declare class DraggableLinesContainer extends DraggableBaseContainer {
7
7
  point1Start: Point;
8
8
  point2Start: Point;
9
9
  create(): JSX.Element[];
10
- lineTouchStart(e: React.TouchEvent<HTMLDivElement>, index: number): void;
11
- lineTouchMove(e: React.TouchEvent<HTMLDivElement>, index: number): void;
10
+ lineTouchStart(e: React.PointerEvent<HTMLDivElement>, index: number): void;
11
+ lineTouchMove(e: React.PointerEvent<HTMLDivElement>, index: number): void;
12
+ lineTouchEnd(): void;
12
13
  MAX_SLOPE_DIFF: number;
13
14
  accountForSlopeCalculationError(potential: number, existing: number): number;
14
15
  isNearOpposingPoint(start: Point, active: Point, wall: Point, axis: "x" | "y"): boolean;
@@ -2,10 +2,11 @@ import React from "react";
2
2
  import { Point } from "../../utils/dto/Point";
3
3
  import { DraggableBaseContainer } from "./draggable-base-container";
4
4
  export declare class DraggablePointsContainer extends DraggableBaseContainer {
5
+ lastPointIndex: number;
5
6
  create(): JSX.Element[];
6
- cornerTouchStart(e: React.TouchEvent<HTMLDivElement>, index: number): void;
7
- cornerTouchMove(e: React.TouchEvent<HTMLDivElement>, index: number): void;
8
- cornerTouchEnd(e: React.TouchEvent<HTMLDivElement>, index: number): void;
7
+ cornerTouchStart(e: React.PointerEvent<HTMLDivElement>, index: number): void;
8
+ cornerTouchMove(e: React.PointerEvent<HTMLDivElement>, index: number): void;
9
+ cornerTouchEnd(): void;
9
10
  calculateSlopes(): void;
10
11
  calculateSlope(point1: Point, point2: Point, isHorizontal: boolean): number;
11
12
  render(): JSX.Element;