@levischuck/receiptline 0.0.1 → 0.0.4
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.
- package/package.json +3 -2
- package/dist/barcode.d.ts +0 -71
- package/dist/index.d.ts +0 -14
- package/dist/index.js +0 -1003
- package/dist/parse.d.ts +0 -73
- package/dist/targets/base.d.ts +0 -168
- package/dist/targets/index.d.ts +0 -7
- package/dist/targets/svg.d.ts +0 -52
- package/dist/types.d.ts +0 -65
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": "Open Foodservice System Consortium, Levi Schuck",
|
|
8
|
-
"version": "0.0.
|
|
8
|
+
"version": "0.0.4",
|
|
9
9
|
"devDependencies": {
|
|
10
10
|
"@types/bun": "latest",
|
|
11
11
|
"unplugin-dts": "^1.0.0-beta.6",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"typescript": "^5"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
+
"@levischuck/tiny-encodings": "^0.2.11",
|
|
18
19
|
"@levischuck/tiny-qr": "^0.0.5",
|
|
19
20
|
"@levischuck/tiny-qr-svg": "^0.0.5"
|
|
20
21
|
},
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
],
|
|
35
36
|
"repository": {
|
|
36
37
|
"type": "git",
|
|
37
|
-
"url": "
|
|
38
|
+
"url": "https://github.com/LeviSchuck/receiptline"
|
|
38
39
|
},
|
|
39
40
|
"scripts": {
|
|
40
41
|
"build": "vite build",
|
package/dist/barcode.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
export type BarcodeSymbolType = 'upc' | 'ean' | 'jan' | 'code39' | 'itf' | 'codabar' | 'nw7' | 'code93' | 'code128';
|
|
2
|
-
export type BarcodeCode128Symbol = {
|
|
3
|
-
type: 'code128';
|
|
4
|
-
data: string;
|
|
5
|
-
hri: boolean;
|
|
6
|
-
width: number;
|
|
7
|
-
height: number;
|
|
8
|
-
quietZone: boolean;
|
|
9
|
-
};
|
|
10
|
-
export type BarcodeCode93Symbol = {
|
|
11
|
-
type: 'code93';
|
|
12
|
-
data: string;
|
|
13
|
-
hri: boolean;
|
|
14
|
-
width: number;
|
|
15
|
-
height: number;
|
|
16
|
-
quietZone: boolean;
|
|
17
|
-
};
|
|
18
|
-
export type BarcodeCodabarSymbol = {
|
|
19
|
-
type: 'codabar' | 'nw7';
|
|
20
|
-
data: string;
|
|
21
|
-
hri: boolean;
|
|
22
|
-
width: number;
|
|
23
|
-
height: number;
|
|
24
|
-
quietZone: boolean;
|
|
25
|
-
};
|
|
26
|
-
export type BarcodeItfSymbol = {
|
|
27
|
-
type: 'itf';
|
|
28
|
-
data: string;
|
|
29
|
-
hri: boolean;
|
|
30
|
-
width: number;
|
|
31
|
-
height: number;
|
|
32
|
-
quietZone: boolean;
|
|
33
|
-
};
|
|
34
|
-
export type BarcodeCode39Symbol = {
|
|
35
|
-
type: 'code39';
|
|
36
|
-
data: string;
|
|
37
|
-
hri: boolean;
|
|
38
|
-
width: number;
|
|
39
|
-
height: number;
|
|
40
|
-
quietZone: boolean;
|
|
41
|
-
};
|
|
42
|
-
export type BarcodeUpcSymbol = {
|
|
43
|
-
type: 'upc';
|
|
44
|
-
data: string;
|
|
45
|
-
hri: boolean;
|
|
46
|
-
width: number;
|
|
47
|
-
height: number;
|
|
48
|
-
quietZone: boolean;
|
|
49
|
-
};
|
|
50
|
-
export type BarcodeEanSymbol = {
|
|
51
|
-
type: 'ean' | 'jan';
|
|
52
|
-
data: string;
|
|
53
|
-
hri: boolean;
|
|
54
|
-
width: number;
|
|
55
|
-
height: number;
|
|
56
|
-
quietZone: boolean;
|
|
57
|
-
};
|
|
58
|
-
export type BarcodeSymbol = BarcodeCode128Symbol | BarcodeCode93Symbol | BarcodeCodabarSymbol | BarcodeItfSymbol | BarcodeCode39Symbol | BarcodeUpcSymbol | BarcodeEanSymbol;
|
|
59
|
-
export type BarcodeResult = {
|
|
60
|
-
hri?: boolean;
|
|
61
|
-
text?: string;
|
|
62
|
-
widths?: number[];
|
|
63
|
-
length?: number;
|
|
64
|
-
height?: number;
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* Generate barcode.
|
|
68
|
-
* @param symbol barcode information (data, type, width, height, hri, quietZone)
|
|
69
|
-
* @returns barcode form
|
|
70
|
-
*/
|
|
71
|
-
export declare function generate(symbol: BarcodeSymbol): BarcodeResult;
|
package/dist/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Printer } from './types.ts';
|
|
2
|
-
export { BaseTarget } from './targets/base.ts';
|
|
3
|
-
export { SvgTarget } from './targets/svg.ts';
|
|
4
|
-
/**
|
|
5
|
-
* Transform ReceiptLine document to printer commands or SVG images.
|
|
6
|
-
* @param {string} doc ReceiptLine document
|
|
7
|
-
* @param {object} [printer] printer configuration
|
|
8
|
-
* @returns {string} printer command or SVG image
|
|
9
|
-
*/
|
|
10
|
-
export declare function transform(doc: string, printer: Printer): {
|
|
11
|
-
svg: string;
|
|
12
|
-
width: number;
|
|
13
|
-
height: number;
|
|
14
|
-
};
|