-
Notifications
You must be signed in to change notification settings - Fork 610
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish a plain JS module but also type defs
- Loading branch information
Showing
12 changed files
with
1,066 additions
and
1,065 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
* | ||
|
||
!dist | ||
!package.json | ||
!LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import { BitMatrix } from "../bitmatrix"; | ||
export declare function binarize(data: Uint8ClampedArray, width: number, height: number): BitMatrix; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export declare class BitMatrix { | ||
static createEmpty(width: number, height: number): BitMatrix; | ||
width: number; | ||
height: number; | ||
private data; | ||
constructor(data: Uint8ClampedArray, width: number); | ||
get(x: number, y: number): boolean; | ||
set(x: number, y: number, v: boolean): void; | ||
setRegion(left: number, top: number, width: number, height: number, v: boolean): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export declare class BitStream { | ||
private bytes; | ||
private byteOffset; | ||
private bitOffset; | ||
constructor(bytes: Uint32Array); | ||
readBits(numBits: number): number; | ||
available(): number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export declare function decodeQRdata(data: Uint8ClampedArray, version: number, ecl: string): number[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import { BitMatrix } from "../bitmatrix"; | ||
export declare function decode(matrix: BitMatrix): number[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { BitMatrix } from "../bitmatrix"; | ||
import { QRLocation } from "../locator"; | ||
export declare function extract(image: BitMatrix, location: QRLocation): BitMatrix; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export interface Point { | ||
x: number; | ||
y: number; | ||
} | ||
export interface QRCode { | ||
binaryData: Uint8ClampedArray; | ||
text: string; | ||
encodingType: "numeric" | "alphanumeric" | "byte" | "structured_append" | "eci" | "kanji"; | ||
location: { | ||
topRightCorner: Point; | ||
topLeftCorner: Point; | ||
bottomRightCorner: Point; | ||
bottomLeftCorner: Point; | ||
topRightFinderPattern: Point; | ||
topLeftFinderPattern: Point; | ||
bottomLeftFinderPattern: Point; | ||
bottomRightAlignmentPattern?: Point; | ||
}; | ||
errorRate: number; | ||
} | ||
export default function readQR(data: Uint8ClampedArray, width: number, height: number): QRCode | null; |
Oops, something went wrong.