@psdk/esc 0.2.67 → 0.3.1
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/build/args/backlinedot.js +4 -8
- package/build/args/basic.js +2 -6
- package/build/args/batteryvolume.js +2 -6
- package/build/args/bttype.js +2 -6
- package/build/args/enable.js +2 -6
- package/build/args/getpapertypeq3.d.ts +5 -0
- package/build/args/getpapertypeq3.d.ts.map +1 -0
- package/build/args/getpapertypeq3.js +6 -0
- package/build/args/getshutdowntime.js +2 -6
- package/build/args/image.js +9 -13
- package/build/args/index.js +25 -41
- package/build/args/info.js +2 -6
- package/build/args/learnlabelgap.js +2 -6
- package/build/args/line.js +4 -8
- package/build/args/linedot.js +4 -8
- package/build/args/location.js +4 -8
- package/build/args/mac.js +2 -6
- package/build/args/model.js +2 -6
- package/build/args/name.js +2 -6
- package/build/args/papertype.js +6 -10
- package/build/args/papertypeq3.d.ts +12 -0
- package/build/args/papertypeq3.d.ts.map +1 -0
- package/build/args/papertypeq3.js +17 -0
- package/build/args/position.js +2 -6
- package/build/args/printerversion.js +2 -6
- package/build/args/setshutdowntime.js +4 -8
- package/build/args/sn.js +2 -6
- package/build/args/state.js +2 -6
- package/build/args/stopjob.js +2 -6
- package/build/args/thickness.js +4 -8
- package/build/args/version.js +2 -6
- package/build/args/wakeup.js +2 -6
- package/build/impls/basic.d.ts +11 -1
- package/build/impls/basic.d.ts.map +1 -1
- package/build/impls/basic.js +40 -31
- package/build/impls/esc.js +3 -7
- package/build/impls/generic.js +2 -6
- package/build/impls/index.js +2 -18
- package/build/index.js +2 -18
- package/build/types/image.js +2 -5
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/index.js +3 -18
- package/build/types/papertype.js +2 -5
- package/build/types/papertypeq3.d.ts +15 -0
- package/build/types/papertypeq3.d.ts.map +1 -0
- package/build/types/papertypeq3.js +15 -0
- package/package.json +14 -33
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.EBackLineDot = void 0;
|
|
4
|
-
const basic_1 = require("./basic");
|
|
5
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
1
|
+
import { BasicESCArg } from "./basic";
|
|
2
|
+
import { BinaryCommand } from "@psdk/frame-father";
|
|
6
3
|
/**
|
|
7
4
|
* BackLineDot
|
|
8
5
|
*/
|
|
9
|
-
class EBackLineDot extends
|
|
6
|
+
export class EBackLineDot extends BasicESCArg {
|
|
10
7
|
constructor(options) {
|
|
11
8
|
var _a;
|
|
12
9
|
super();
|
|
13
10
|
this.dot = (_a = options.dot) !== null && _a !== void 0 ? _a : 0;
|
|
14
11
|
}
|
|
15
12
|
clause() {
|
|
16
|
-
return
|
|
13
|
+
return BinaryCommand.with(this.header())
|
|
17
14
|
.appendNumber(this.dot).clause();
|
|
18
15
|
}
|
|
19
16
|
header() {
|
|
20
17
|
return new Uint8Array([0x10, 0xFF, 0x81]);
|
|
21
18
|
}
|
|
22
19
|
}
|
|
23
|
-
exports.EBackLineDot = EBackLineDot;
|
package/build/args/basic.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.BasicESCArg = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class BasicESCArg extends frame_father_1.EasyArg {
|
|
1
|
+
import { EasyArg } from "@psdk/frame-father";
|
|
2
|
+
export class BasicESCArg extends EasyArg {
|
|
6
3
|
append(arg) {
|
|
7
4
|
super.append(arg);
|
|
8
5
|
return this;
|
|
@@ -15,4 +12,3 @@ class BasicESCArg extends frame_father_1.EasyArg {
|
|
|
15
12
|
return false;
|
|
16
13
|
}
|
|
17
14
|
}
|
|
18
|
-
exports.BasicESCArg = BasicESCArg;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.EBatteryVolume = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class EBatteryVolume extends frame_father_1.OnlyBinaryHeaderArg {
|
|
1
|
+
import { OnlyBinaryHeaderArg } from "@psdk/frame-father";
|
|
2
|
+
export class EBatteryVolume extends OnlyBinaryHeaderArg {
|
|
6
3
|
header() {
|
|
7
4
|
return new Uint8Array([0x10, 0xFF, 0x50, 0xF1]);
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.EBatteryVolume = EBatteryVolume;
|
package/build/args/bttype.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.EBTType = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class EBTType extends frame_father_1.OnlyBinaryHeaderArg {
|
|
1
|
+
import { OnlyBinaryHeaderArg } from "@psdk/frame-father";
|
|
2
|
+
export class EBTType extends OnlyBinaryHeaderArg {
|
|
6
3
|
header() {
|
|
7
4
|
return new Uint8Array([0x1F, 0xB2, 0x10]);
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.EBTType = EBTType;
|
package/build/args/enable.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.EEnable = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class EEnable extends frame_father_1.OnlyBinaryHeaderArg {
|
|
1
|
+
import { OnlyBinaryHeaderArg } from "@psdk/frame-father";
|
|
2
|
+
export class EEnable extends OnlyBinaryHeaderArg {
|
|
6
3
|
header() {
|
|
7
4
|
return new Uint8Array([0x10, 0xFF, 0xFE, 0x01]);
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.EEnable = EEnable;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getpapertypeq3.d.ts","sourceRoot":"","sources":["../../src/args/getpapertypeq3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAEvD,qBAAa,eAAgB,SAAQ,mBAAmB,CAAC,eAAe,CAAC;IAEvE,MAAM,IAAI,UAAU;CAGrB"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.EGetShutdownTime = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class EGetShutdownTime extends frame_father_1.OnlyBinaryHeaderArg {
|
|
1
|
+
import { OnlyBinaryHeaderArg } from "@psdk/frame-father";
|
|
2
|
+
export class EGetShutdownTime extends OnlyBinaryHeaderArg {
|
|
6
3
|
header() {
|
|
7
4
|
return new Uint8Array([0x10, 0xFF, 0x13]);
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.EGetShutdownTime = EGetShutdownTime;
|
package/build/args/image.js
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
6
|
-
const types_1 = require("../types");
|
|
7
|
-
const frame_imageb_1 = require("@psdk/frame-imageb");
|
|
1
|
+
import { BasicESCArg } from "./basic";
|
|
2
|
+
import { BinaryCommand } from "@psdk/frame-father";
|
|
3
|
+
import { EImageMode } from "../types";
|
|
4
|
+
import { Pbita } from "@psdk/frame-imageb";
|
|
8
5
|
/**
|
|
9
6
|
* Image
|
|
10
7
|
*/
|
|
11
|
-
class EImage extends
|
|
8
|
+
export class EImage extends BasicESCArg {
|
|
12
9
|
constructor(options) {
|
|
13
10
|
var _a, _b, _c, _d;
|
|
14
11
|
super();
|
|
15
12
|
this.compress = (_a = options.compress) !== null && _a !== void 0 ? _a : false;
|
|
16
13
|
this.reverse = (_b = options.reverse) !== null && _b !== void 0 ? _b : false;
|
|
17
14
|
this.threshold = (_c = options.threshold) !== null && _c !== void 0 ? _c : 190;
|
|
18
|
-
this.mode = (_d = options.mode) !== null && _d !== void 0 ? _d :
|
|
15
|
+
this.mode = (_d = options.mode) !== null && _d !== void 0 ? _d : EImageMode.NORMAL;
|
|
19
16
|
this.image = options.image;
|
|
20
17
|
}
|
|
21
18
|
clause() {
|
|
22
|
-
const processer = new
|
|
19
|
+
const processer = new Pbita({
|
|
23
20
|
command: 'esc',
|
|
24
21
|
threshold: this.threshold,
|
|
25
22
|
compress: this.compress,
|
|
@@ -35,7 +32,7 @@ class EImage extends basic_1.BasicESCArg {
|
|
|
35
32
|
let height = fimage.height;
|
|
36
33
|
const eWidth = Math.floor((width % 8 === 0) ? (width / 8) : (width / 8 + 1));
|
|
37
34
|
if (this.compress) {
|
|
38
|
-
return
|
|
35
|
+
return BinaryCommand.with(this.header())
|
|
39
36
|
.appendNumber(eWidth / 256)
|
|
40
37
|
.appendNumber(eWidth % 256)
|
|
41
38
|
.appendNumber(height / 256)
|
|
@@ -47,7 +44,7 @@ class EImage extends basic_1.BasicESCArg {
|
|
|
47
44
|
.appendU8A(fbytes.subarray(2, fbytes.length))
|
|
48
45
|
.clause();
|
|
49
46
|
}
|
|
50
|
-
return
|
|
47
|
+
return BinaryCommand.with(this.header())
|
|
51
48
|
.appendNumber(this.mode)
|
|
52
49
|
.appendNumber(eWidth % 256)
|
|
53
50
|
.appendNumber(eWidth / 256)
|
|
@@ -60,4 +57,3 @@ class EImage extends basic_1.BasicESCArg {
|
|
|
60
57
|
return new Uint8Array(this.compress ? [0x1F, 0x00] : [0x1D, 0x76, 0x30]);
|
|
61
58
|
}
|
|
62
59
|
}
|
|
63
|
-
exports.EImage = EImage;
|
package/build/args/index.js
CHANGED
|
@@ -1,41 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
__exportStar(require("./location"), exports);
|
|
27
|
-
__exportStar(require("./mac"), exports);
|
|
28
|
-
__exportStar(require("./model"), exports);
|
|
29
|
-
__exportStar(require("./name"), exports);
|
|
30
|
-
__exportStar(require("./papertype"), exports);
|
|
31
|
-
__exportStar(require("./position"), exports);
|
|
32
|
-
__exportStar(require("./printerversion"), exports);
|
|
33
|
-
__exportStar(require("./setshutdowntime"), exports);
|
|
34
|
-
__exportStar(require("./sn"), exports);
|
|
35
|
-
__exportStar(require("./state"), exports);
|
|
36
|
-
__exportStar(require("./stopjob"), exports);
|
|
37
|
-
__exportStar(require("./thickness"), exports);
|
|
38
|
-
__exportStar(require("./version"), exports);
|
|
39
|
-
__exportStar(require("./wakeup"), exports);
|
|
40
|
-
__exportStar(require("./info"), exports);
|
|
41
|
-
__exportStar(require("./bttype"), exports);
|
|
1
|
+
export * from './backlinedot';
|
|
2
|
+
export * from './basic';
|
|
3
|
+
export * from './batteryvolume';
|
|
4
|
+
export * from './enable';
|
|
5
|
+
export * from './getshutdowntime';
|
|
6
|
+
export * from './image';
|
|
7
|
+
export * from './learnlabelgap';
|
|
8
|
+
export * from './line';
|
|
9
|
+
export * from './linedot';
|
|
10
|
+
export * from './location';
|
|
11
|
+
export * from './mac';
|
|
12
|
+
export * from './model';
|
|
13
|
+
export * from './name';
|
|
14
|
+
export * from './papertype';
|
|
15
|
+
export * from './position';
|
|
16
|
+
export * from './printerversion';
|
|
17
|
+
export * from './setshutdowntime';
|
|
18
|
+
export * from './sn';
|
|
19
|
+
export * from './state';
|
|
20
|
+
export * from './stopjob';
|
|
21
|
+
export * from './thickness';
|
|
22
|
+
export * from './version';
|
|
23
|
+
export * from './wakeup';
|
|
24
|
+
export * from './info';
|
|
25
|
+
export * from './bttype';
|
package/build/args/info.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.EInfo = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class EInfo extends frame_father_1.OnlyBinaryHeaderArg {
|
|
1
|
+
import { OnlyBinaryHeaderArg } from "@psdk/frame-father";
|
|
2
|
+
export class EInfo extends OnlyBinaryHeaderArg {
|
|
6
3
|
header() {
|
|
7
4
|
return new Uint8Array([0x10, 0xFF, 0x70]);
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.EInfo = EInfo;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.ELearnLabelGap = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class ELearnLabelGap extends frame_father_1.OnlyBinaryHeaderArg {
|
|
1
|
+
import { OnlyBinaryHeaderArg } from "@psdk/frame-father";
|
|
2
|
+
export class ELearnLabelGap extends OnlyBinaryHeaderArg {
|
|
6
3
|
header() {
|
|
7
4
|
return new Uint8Array([0x10, 0xFF, 0x03]);
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.ELearnLabelGap = ELearnLabelGap;
|
package/build/args/line.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.ELine = void 0;
|
|
4
|
-
const basic_1 = require("./basic");
|
|
5
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
1
|
+
import { BasicESCArg } from "./basic";
|
|
2
|
+
import { BinaryCommand } from "@psdk/frame-father";
|
|
6
3
|
/**
|
|
7
4
|
* Line
|
|
8
5
|
*/
|
|
9
|
-
class ELine extends
|
|
6
|
+
export class ELine extends BasicESCArg {
|
|
10
7
|
constructor(options) {
|
|
11
8
|
var _a, _b;
|
|
12
9
|
super();
|
|
@@ -14,7 +11,7 @@ class ELine extends basic_1.BasicESCArg {
|
|
|
14
11
|
this.y = (_b = options.y) !== null && _b !== void 0 ? _b : 0;
|
|
15
12
|
}
|
|
16
13
|
clause() {
|
|
17
|
-
return
|
|
14
|
+
return BinaryCommand.with(this.header())
|
|
18
15
|
.appendNumber(this.x)
|
|
19
16
|
.appendNumber(this.y)
|
|
20
17
|
.clause();
|
|
@@ -23,4 +20,3 @@ class ELine extends basic_1.BasicESCArg {
|
|
|
23
20
|
return new Uint8Array([0x00, 0x01]);
|
|
24
21
|
}
|
|
25
22
|
}
|
|
26
|
-
exports.ELine = ELine;
|
package/build/args/linedot.js
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.ELineDot = void 0;
|
|
4
|
-
const basic_1 = require("./basic");
|
|
5
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
1
|
+
import { BasicESCArg } from "./basic";
|
|
2
|
+
import { BinaryCommand } from "@psdk/frame-father";
|
|
6
3
|
/**
|
|
7
4
|
* LineDot
|
|
8
5
|
*/
|
|
9
|
-
class ELineDot extends
|
|
6
|
+
export class ELineDot extends BasicESCArg {
|
|
10
7
|
constructor(options) {
|
|
11
8
|
var _a;
|
|
12
9
|
super();
|
|
13
10
|
this.dot = (_a = options.dot) !== null && _a !== void 0 ? _a : 0;
|
|
14
11
|
}
|
|
15
12
|
clause() {
|
|
16
|
-
return
|
|
13
|
+
return BinaryCommand.with(this.header())
|
|
17
14
|
.appendNumber(this.dot).clause();
|
|
18
15
|
}
|
|
19
16
|
header() {
|
|
20
17
|
return new Uint8Array([0x1B, 0x4A]);
|
|
21
18
|
}
|
|
22
19
|
}
|
|
23
|
-
exports.ELineDot = ELineDot;
|
package/build/args/location.js
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.ELocation = void 0;
|
|
4
|
-
const basic_1 = require("./basic");
|
|
5
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
1
|
+
import { BasicESCArg } from "./basic";
|
|
2
|
+
import { BinaryCommand } from "@psdk/frame-father";
|
|
6
3
|
/**
|
|
7
4
|
* Location
|
|
8
5
|
*/
|
|
9
|
-
class ELocation extends
|
|
6
|
+
export class ELocation extends BasicESCArg {
|
|
10
7
|
constructor(options) {
|
|
11
8
|
var _a;
|
|
12
9
|
super();
|
|
13
10
|
this.location = (_a = options.location) !== null && _a !== void 0 ? _a : 0;
|
|
14
11
|
}
|
|
15
12
|
clause() {
|
|
16
|
-
return
|
|
13
|
+
return BinaryCommand.with(this.header())
|
|
17
14
|
.appendNumber(this.location).clause();
|
|
18
15
|
}
|
|
19
16
|
header() {
|
|
20
17
|
return new Uint8Array([0x1b, 0x61]);
|
|
21
18
|
}
|
|
22
19
|
}
|
|
23
|
-
exports.ELocation = ELocation;
|
package/build/args/mac.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.EMac = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class EMac extends frame_father_1.OnlyBinaryHeaderArg {
|
|
1
|
+
import { OnlyBinaryHeaderArg } from "@psdk/frame-father";
|
|
2
|
+
export class EMac extends OnlyBinaryHeaderArg {
|
|
6
3
|
header() {
|
|
7
4
|
return new Uint8Array([0x10, 0xFF, 0x30, 0x12]);
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.EMac = EMac;
|
package/build/args/model.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.EModel = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class EModel extends frame_father_1.OnlyBinaryHeaderArg {
|
|
1
|
+
import { OnlyBinaryHeaderArg } from "@psdk/frame-father";
|
|
2
|
+
export class EModel extends OnlyBinaryHeaderArg {
|
|
6
3
|
header() {
|
|
7
4
|
return new Uint8Array([0x10, 0xFF, 0x20, 0xF0]);
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.EModel = EModel;
|
package/build/args/name.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.EName = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class EName extends frame_father_1.OnlyBinaryHeaderArg {
|
|
1
|
+
import { OnlyBinaryHeaderArg } from "@psdk/frame-father";
|
|
2
|
+
export class EName extends OnlyBinaryHeaderArg {
|
|
6
3
|
header() {
|
|
7
4
|
return new Uint8Array([0x10, 0xFF, 0x30, 0x11]);
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.EName = EName;
|
package/build/args/papertype.js
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
6
|
-
const types_1 = require("../types");
|
|
7
|
-
class EPaperType extends basic_1.BasicESCArg {
|
|
1
|
+
import { BasicESCArg } from "./basic";
|
|
2
|
+
import { BinaryCommand } from "@psdk/frame-father";
|
|
3
|
+
import { PaperType } from "../types";
|
|
4
|
+
export class EPaperType extends BasicESCArg {
|
|
8
5
|
constructor(options) {
|
|
9
6
|
var _a;
|
|
10
7
|
super();
|
|
11
|
-
this.paperType = (_a = options.paperType) !== null && _a !== void 0 ? _a :
|
|
8
|
+
this.paperType = (_a = options.paperType) !== null && _a !== void 0 ? _a : PaperType.FOLDED_BLACK_LABEL_PAPER;
|
|
12
9
|
}
|
|
13
10
|
clause() {
|
|
14
|
-
return
|
|
11
|
+
return BinaryCommand.with(this.header())
|
|
15
12
|
.appendNumber(this.paperType).clause();
|
|
16
13
|
}
|
|
17
14
|
header() {
|
|
18
15
|
return new Uint8Array([0x10, 0xff, 0x10, 0x03]);
|
|
19
16
|
}
|
|
20
17
|
}
|
|
21
|
-
exports.EPaperType = EPaperType;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BasicESCArg } from "./basic";
|
|
2
|
+
import { CommandClause } from "@psdk/frame-father";
|
|
3
|
+
import { PaperTypeQ3 } from "../types";
|
|
4
|
+
export declare class EPaperTypeQ3 extends BasicESCArg<EPaperTypeQ3> {
|
|
5
|
+
private readonly paperType;
|
|
6
|
+
constructor(options: {
|
|
7
|
+
paperType?: PaperTypeQ3;
|
|
8
|
+
});
|
|
9
|
+
clause(): CommandClause;
|
|
10
|
+
header(): Uint8Array;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=papertypeq3.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"papertypeq3.d.ts","sourceRoot":"","sources":["../../src/args/papertypeq3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AACpC,OAAO,EAAC,aAAa,EAAgB,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AAIrC,qBAAa,YAAa,SAAQ,WAAW,CAAC,YAAY,CAAC;IACzD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAc;gBAE5B,OAAO,EAAE;QACnB,SAAS,CAAC,EAAE,WAAW,CAAC;KACzB;IAKD,MAAM,IAAI,aAAa;IAKvB,MAAM,IAAI,UAAU;CAIrB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BasicESCArg } from "./basic";
|
|
2
|
+
import { BinaryCommand } from "@psdk/frame-father";
|
|
3
|
+
import { PaperTypeQ3 } from "../types";
|
|
4
|
+
export class EPaperTypeQ3 extends BasicESCArg {
|
|
5
|
+
constructor(options) {
|
|
6
|
+
var _a;
|
|
7
|
+
super();
|
|
8
|
+
this.paperType = (_a = options.paperType) !== null && _a !== void 0 ? _a : PaperTypeQ3.CONTINUOUS_REEL_PAPER;
|
|
9
|
+
}
|
|
10
|
+
clause() {
|
|
11
|
+
return BinaryCommand.with(this.header())
|
|
12
|
+
.appendNumber(this.paperType).clause();
|
|
13
|
+
}
|
|
14
|
+
header() {
|
|
15
|
+
return new Uint8Array([0x10, 0xff, 0x84]);
|
|
16
|
+
}
|
|
17
|
+
}
|
package/build/args/position.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.EPosition = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class EPosition extends frame_father_1.OnlyBinaryHeaderArg {
|
|
1
|
+
import { OnlyBinaryHeaderArg } from "@psdk/frame-father";
|
|
2
|
+
export class EPosition extends OnlyBinaryHeaderArg {
|
|
6
3
|
header() {
|
|
7
4
|
return new Uint8Array([0x1d, 0x0c]);
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.EPosition = EPosition;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.EPrinterVersion = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class EPrinterVersion extends frame_father_1.OnlyBinaryHeaderArg {
|
|
1
|
+
import { OnlyBinaryHeaderArg } from "@psdk/frame-father";
|
|
2
|
+
export class EPrinterVersion extends OnlyBinaryHeaderArg {
|
|
6
3
|
header() {
|
|
7
4
|
return new Uint8Array([0x10, 0xFF, 0x20, 0xF1]);
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.EPrinterVersion = EPrinterVersion;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const basic_1 = require("./basic");
|
|
5
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
6
|
-
class ESetShutdownTime extends basic_1.BasicESCArg {
|
|
1
|
+
import { BasicESCArg } from "./basic";
|
|
2
|
+
import { BinaryCommand } from "@psdk/frame-father";
|
|
3
|
+
export class ESetShutdownTime extends BasicESCArg {
|
|
7
4
|
constructor(options) {
|
|
8
5
|
var _a;
|
|
9
6
|
super();
|
|
10
7
|
this.time = (_a = options.time) !== null && _a !== void 0 ? _a : 0;
|
|
11
8
|
}
|
|
12
9
|
clause() {
|
|
13
|
-
return
|
|
10
|
+
return BinaryCommand.with(this.header())
|
|
14
11
|
.appendNumber(this.time / 256)
|
|
15
12
|
.appendNumber(this.time % 256)
|
|
16
13
|
.clause();
|
|
@@ -19,4 +16,3 @@ class ESetShutdownTime extends basic_1.BasicESCArg {
|
|
|
19
16
|
return new Uint8Array([0x10, 0xFF, 0x12]);
|
|
20
17
|
}
|
|
21
18
|
}
|
|
22
|
-
exports.ESetShutdownTime = ESetShutdownTime;
|
package/build/args/sn.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.ESN = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class ESN extends frame_father_1.OnlyBinaryHeaderArg {
|
|
1
|
+
import { OnlyBinaryHeaderArg } from "@psdk/frame-father";
|
|
2
|
+
export class ESN extends OnlyBinaryHeaderArg {
|
|
6
3
|
header() {
|
|
7
4
|
return new Uint8Array([0x10, 0xFF, 0x20, 0xF2]);
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.ESN = ESN;
|
package/build/args/state.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.EState = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class EState extends frame_father_1.OnlyBinaryHeaderArg {
|
|
1
|
+
import { OnlyBinaryHeaderArg } from "@psdk/frame-father";
|
|
2
|
+
export class EState extends OnlyBinaryHeaderArg {
|
|
6
3
|
header() {
|
|
7
4
|
return new Uint8Array([0x10, 0xFF, 0x40]);
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.EState = EState;
|
package/build/args/stopjob.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.EStopJob = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class EStopJob extends frame_father_1.OnlyBinaryHeaderArg {
|
|
1
|
+
import { OnlyBinaryHeaderArg } from "@psdk/frame-father";
|
|
2
|
+
export class EStopJob extends OnlyBinaryHeaderArg {
|
|
6
3
|
header() {
|
|
7
4
|
return new Uint8Array([0x10, 0xFF, 0xFE, 0x45]);
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.EStopJob = EStopJob;
|
package/build/args/thickness.js
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const basic_1 = require("./basic");
|
|
5
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
6
|
-
class EThickness extends basic_1.BasicESCArg {
|
|
1
|
+
import { BasicESCArg } from "./basic";
|
|
2
|
+
import { BinaryCommand } from "@psdk/frame-father";
|
|
3
|
+
export class EThickness extends BasicESCArg {
|
|
7
4
|
constructor(options) {
|
|
8
5
|
var _a;
|
|
9
6
|
super();
|
|
10
7
|
this.thickness = (_a = options.thickness) !== null && _a !== void 0 ? _a : 0;
|
|
11
8
|
}
|
|
12
9
|
clause() {
|
|
13
|
-
return
|
|
10
|
+
return BinaryCommand.with(this.header())
|
|
14
11
|
.appendNumber(this.thickness).clause();
|
|
15
12
|
}
|
|
16
13
|
header() {
|
|
17
14
|
return new Uint8Array([0x10, 0xFF, 0x10, 0x00]);
|
|
18
15
|
}
|
|
19
16
|
}
|
|
20
|
-
exports.EThickness = EThickness;
|
package/build/args/version.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.EVersion = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class EVersion extends frame_father_1.OnlyBinaryHeaderArg {
|
|
1
|
+
import { OnlyBinaryHeaderArg } from "@psdk/frame-father";
|
|
2
|
+
export class EVersion extends OnlyBinaryHeaderArg {
|
|
6
3
|
header() {
|
|
7
4
|
return new Uint8Array([0x10, 0xFF, 0x30, 0x10]);
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.EVersion = EVersion;
|
package/build/args/wakeup.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.EWakeup = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class EWakeup extends frame_father_1.OnlyBinaryHeaderArg {
|
|
1
|
+
import { OnlyBinaryHeaderArg } from "@psdk/frame-father";
|
|
2
|
+
export class EWakeup extends OnlyBinaryHeaderArg {
|
|
6
3
|
header() {
|
|
7
4
|
return new Uint8Array([
|
|
8
5
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
@@ -10,4 +7,3 @@ class EWakeup extends frame_father_1.OnlyBinaryHeaderArg {
|
|
|
10
7
|
]);
|
|
11
8
|
}
|
|
12
9
|
}
|
|
13
|
-
exports.EWakeup = EWakeup;
|
package/build/impls/basic.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Commander, ConnectedDevice, Lifecycle, PSDK } from '@psdk/frame-father';
|
|
2
2
|
import { EImage, ELine, EPaperType } from '../args';
|
|
3
|
+
import { EPaperTypeQ3 } from "../args/papertypeq3";
|
|
3
4
|
export declare abstract class BasicESC<T extends BasicESC<any>> extends PSDK<T> {
|
|
4
5
|
/**
|
|
5
6
|
* lifecycle
|
|
@@ -73,7 +74,16 @@ export declare abstract class BasicESC<T extends BasicESC<any>> extends PSDK<T>
|
|
|
73
74
|
/**
|
|
74
75
|
*纸张类型
|
|
75
76
|
*/
|
|
76
|
-
paperType(arg
|
|
77
|
+
paperType(arg: EPaperType): T;
|
|
78
|
+
/**
|
|
79
|
+
* 纸张类型(Q1 Q2 Q3 D11 D30 B21 B22用这个)
|
|
80
|
+
*/
|
|
81
|
+
paperTypeQ3(arg: EPaperTypeQ3): T;
|
|
82
|
+
/**
|
|
83
|
+
* 获取当前设备纸张类型(Q1 Q2 Q3 D11 D30 B21 B22用这个)
|
|
84
|
+
* 返回值:0X01 黑标纸,0x02 连续纸,否则:间隙
|
|
85
|
+
*/
|
|
86
|
+
getPaperTypeQ3(): T;
|
|
77
87
|
/**
|
|
78
88
|
* 打印定位
|
|
79
89
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic.d.ts","sourceRoot":"","sources":["../../src/impls/basic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,EAAC,MAAM,oBAAoB,CAAA;AAC9E,OAAO,EAKL,MAAM,EAEN,KAAK,EAML,UAAU,EAYX,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"basic.d.ts","sourceRoot":"","sources":["../../src/impls/basic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,EAAC,MAAM,oBAAoB,CAAA;AAC9E,OAAO,EAKL,MAAM,EAEN,KAAK,EAML,UAAU,EAYX,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAGjD,8BAAsB,QAAQ,CAAC,CAAC,SAAS,QAAQ,CAAC,GAAG,CAAC,CAAE,SAAQ,IAAI,CAAC,CAAC,CAAC;IAErE;;;OAGG;IACH,OAAO,CAAC,UAAU,CAAY;IAC9B;;;OAGG;IACH,OAAO,CAAC,UAAU,CAAY;IAE9B,SAAS,aAAa,SAAS,EAAE,SAAS;IAM1C,eAAe,IAAI,eAAe;IAIlC,SAAS,IAAI,SAAS;IAItB;;;OAGG;IAEI,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC;IAI9B;;;;OAIG;IACI,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC;IAIlC;;OAEG;IACI,aAAa,IAAI,CAAC;IAIzB;;OAEG;IACI,MAAM,IAAI,CAAC;IAIlB;;OAEG;IACI,eAAe,IAAI,CAAC;IAI3B;;OAEG;IACI,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC;IAI5B;;OAEG;IACI,aAAa,IAAI,CAAC;IAIzB;;OAEG;IACI,IAAI,CAAC,GAAG,EAAE,KAAK,GAAG,CAAC;IAI1B;;;OAGG;IACI,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC;IAI/B;;OAEG;IACI,GAAG,IAAI,CAAC;IAIf;;OAEG;IACI,IAAI,IAAI,CAAC;IAIhB;;OAEG;IACI,KAAK,IAAI,CAAC;IAIjB;;OAEG;IACI,IAAI,IAAI,CAAC;IAIhB;;OAEG;IACI,SAAS,CAAC,GAAG,EAAE,UAAU,GAAG,CAAC;IAIpC;;OAEG;IACI,WAAW,CAAC,GAAG,EAAE,YAAY,GAAG,CAAC;IAIxC;;;OAGG;IACI,cAAc,IAAI,CAAC;IAI1B;;OAEG;IACI,QAAQ,IAAI,CAAC;IAIpB;;OAEG;IACI,cAAc,IAAI,CAAC;IAI1B;;OAEG;IAEI,eAAe,CAAC,GAAG,EAAE,MAAM;IAIlC;;OAEG;IAEI,EAAE,IAAI,CAAC;IAId;;OAEG;IACI,KAAK,IAAI,CAAC;IAIjB;;OAEG;IAEI,OAAO,IAAI,CAAC;IAInB;;;OAGG;IACI,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC;IAIhC;;OAEG;IAEI,OAAO,IAAI,CAAC;IAInB;;OAEG;IAEI,MAAM,IAAI,CAAC;IAIlB;;OAEG;IACI,SAAS,IAAI,CAAC;CAGtB"}
|
package/build/impls/basic.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const args_1 = require("../args");
|
|
6
|
-
const types_1 = require("../types");
|
|
7
|
-
class BasicESC extends frame_father_1.PSDK {
|
|
1
|
+
import { Commander, PSDK } from '@psdk/frame-father';
|
|
2
|
+
import { EBackLineDot, EBatteryVolume, EEnable, EGetShutdownTime, ELearnLabelGap, ELineDot, ELocation, EMac, EModel, EName, EPosition, EPrinterVersion, ESetShutdownTime, ESN, EState, EStopJob, EThickness, EVersion, EWakeup, EBTType, EInfo, } from '../args';
|
|
3
|
+
import { EGetPaperTypeQ3 } from "../args/getpapertypeq3";
|
|
4
|
+
export class BasicESC extends PSDK {
|
|
8
5
|
constructor(lifecycle) {
|
|
9
6
|
super();
|
|
10
7
|
this._lifecycle = lifecycle;
|
|
11
|
-
this._commander =
|
|
8
|
+
this._commander = Commander.make();
|
|
12
9
|
}
|
|
13
10
|
connectedDevice() {
|
|
14
11
|
return this._lifecycle.connectedDevice;
|
|
@@ -21,7 +18,7 @@ class BasicESC extends frame_father_1.PSDK {
|
|
|
21
18
|
* @param arg
|
|
22
19
|
*/
|
|
23
20
|
lineDot(arg) {
|
|
24
|
-
return super.push(new
|
|
21
|
+
return super.push(new ELineDot({ dot: arg }));
|
|
25
22
|
}
|
|
26
23
|
/**
|
|
27
24
|
* 回纸命令
|
|
@@ -29,25 +26,25 @@ class BasicESC extends frame_father_1.PSDK {
|
|
|
29
26
|
* @param arg
|
|
30
27
|
*/
|
|
31
28
|
backLineDot(arg) {
|
|
32
|
-
return super.push(new
|
|
29
|
+
return super.push(new EBackLineDot({ dot: arg }));
|
|
33
30
|
}
|
|
34
31
|
/**
|
|
35
32
|
* 查询电量
|
|
36
33
|
*/
|
|
37
34
|
batteryVolume() {
|
|
38
|
-
return super.push(new
|
|
35
|
+
return super.push(new EBatteryVolume());
|
|
39
36
|
}
|
|
40
37
|
/**
|
|
41
38
|
* 使能打印机
|
|
42
39
|
*/
|
|
43
40
|
enable() {
|
|
44
|
-
return super.push(new
|
|
41
|
+
return super.push(new EEnable());
|
|
45
42
|
}
|
|
46
43
|
/**
|
|
47
44
|
* 获取关机时间
|
|
48
45
|
*/
|
|
49
46
|
getShutdownTime() {
|
|
50
|
-
return super.push(new
|
|
47
|
+
return super.push(new EGetShutdownTime());
|
|
51
48
|
}
|
|
52
49
|
/**
|
|
53
50
|
* 打印图片
|
|
@@ -59,7 +56,7 @@ class BasicESC extends frame_father_1.PSDK {
|
|
|
59
56
|
*学习缝隙
|
|
60
57
|
*/
|
|
61
58
|
learnLabelGap() {
|
|
62
|
-
return super.push(new
|
|
59
|
+
return super.push(new ELearnLabelGap());
|
|
63
60
|
}
|
|
64
61
|
/**
|
|
65
62
|
*画线
|
|
@@ -72,98 +69,110 @@ class BasicESC extends frame_father_1.PSDK {
|
|
|
72
69
|
* @param arg 0:居左 1:居中 2:居右
|
|
73
70
|
*/
|
|
74
71
|
location(arg) {
|
|
75
|
-
return super.push(new
|
|
72
|
+
return super.push(new ELocation({ location: arg }));
|
|
76
73
|
}
|
|
77
74
|
/**
|
|
78
75
|
*查询MAC
|
|
79
76
|
*/
|
|
80
77
|
mac() {
|
|
81
|
-
return super.push(new
|
|
78
|
+
return super.push(new EMac());
|
|
82
79
|
}
|
|
83
80
|
/**
|
|
84
81
|
* 查询打印机所有信息
|
|
85
82
|
*/
|
|
86
83
|
info() {
|
|
87
|
-
return super.push(new
|
|
84
|
+
return super.push(new EInfo());
|
|
88
85
|
}
|
|
89
86
|
/**
|
|
90
87
|
*查询打印机型号
|
|
91
88
|
*/
|
|
92
89
|
model() {
|
|
93
|
-
return super.push(new
|
|
90
|
+
return super.push(new EModel());
|
|
94
91
|
}
|
|
95
92
|
/**
|
|
96
93
|
*查询蓝牙名称
|
|
97
94
|
*/
|
|
98
95
|
name() {
|
|
99
|
-
return super.push(new
|
|
96
|
+
return super.push(new EName());
|
|
100
97
|
}
|
|
101
98
|
/**
|
|
102
99
|
*纸张类型
|
|
103
100
|
*/
|
|
104
101
|
paperType(arg) {
|
|
105
|
-
return super.push(arg
|
|
102
|
+
return super.push(arg);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* 纸张类型(Q1 Q2 Q3 D11 D30 B21 B22用这个)
|
|
106
|
+
*/
|
|
107
|
+
paperTypeQ3(arg) {
|
|
108
|
+
return super.push(arg);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* 获取当前设备纸张类型(Q1 Q2 Q3 D11 D30 B21 B22用这个)
|
|
112
|
+
* 返回值:0X01 黑标纸,0x02 连续纸,否则:间隙
|
|
113
|
+
*/
|
|
114
|
+
getPaperTypeQ3() {
|
|
115
|
+
return super.push(new EGetPaperTypeQ3());
|
|
106
116
|
}
|
|
107
117
|
/**
|
|
108
118
|
* 打印定位
|
|
109
119
|
*/
|
|
110
120
|
position() {
|
|
111
|
-
return super.push(new
|
|
121
|
+
return super.push(new EPosition());
|
|
112
122
|
}
|
|
113
123
|
/**
|
|
114
124
|
* 查询打印机固件版本
|
|
115
125
|
*/
|
|
116
126
|
printerVersion() {
|
|
117
|
-
return super.push(new
|
|
127
|
+
return super.push(new EPrinterVersion());
|
|
118
128
|
}
|
|
119
129
|
/**
|
|
120
130
|
* 设置关机时间
|
|
121
131
|
*/
|
|
122
132
|
setShutdownTime(arg) {
|
|
123
|
-
return super.push(new
|
|
133
|
+
return super.push(new ESetShutdownTime({ time: arg }));
|
|
124
134
|
}
|
|
125
135
|
/**
|
|
126
136
|
*查询SN
|
|
127
137
|
*/
|
|
128
138
|
sn() {
|
|
129
|
-
return super.push(new
|
|
139
|
+
return super.push(new ESN());
|
|
130
140
|
}
|
|
131
141
|
/**
|
|
132
142
|
*查询打印机状态
|
|
133
143
|
*/
|
|
134
144
|
state() {
|
|
135
|
-
return super.push(new
|
|
145
|
+
return super.push(new EState());
|
|
136
146
|
}
|
|
137
147
|
/**
|
|
138
148
|
*结束打印任务
|
|
139
149
|
*/
|
|
140
150
|
stopJob() {
|
|
141
|
-
return super.push(new
|
|
151
|
+
return super.push(new EStopJob());
|
|
142
152
|
}
|
|
143
153
|
/**
|
|
144
154
|
* 设置打印机浓度(0-2)
|
|
145
155
|
* @param arg 0:低浓度 1:中浓度 2:高浓度
|
|
146
156
|
*/
|
|
147
157
|
thickness(arg) {
|
|
148
|
-
return super.push(new
|
|
158
|
+
return super.push(new EThickness({ thickness: arg }));
|
|
149
159
|
}
|
|
150
160
|
/**
|
|
151
161
|
*查询蓝牙固件版本
|
|
152
162
|
*/
|
|
153
163
|
version() {
|
|
154
|
-
return super.push(new
|
|
164
|
+
return super.push(new EVersion());
|
|
155
165
|
}
|
|
156
166
|
/**
|
|
157
167
|
*唤醒打印机
|
|
158
168
|
*/
|
|
159
169
|
wakeup() {
|
|
160
|
-
return super.push(new
|
|
170
|
+
return super.push(new EWakeup());
|
|
161
171
|
}
|
|
162
172
|
/**
|
|
163
173
|
* 设置蓝牙类型(支持压缩的机器需要调用)
|
|
164
174
|
*/
|
|
165
175
|
setBTType() {
|
|
166
|
-
return super.push(new
|
|
176
|
+
return super.push(new EBTType());
|
|
167
177
|
}
|
|
168
178
|
}
|
|
169
|
-
exports.BasicESC = BasicESC;
|
package/build/impls/esc.js
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ESC = void 0;
|
|
4
|
-
const generic_1 = require("./generic");
|
|
1
|
+
import { GenericESC } from "./generic";
|
|
5
2
|
/**
|
|
6
3
|
* ESC entrypoint
|
|
7
4
|
*/
|
|
8
|
-
class ESC {
|
|
5
|
+
export class ESC {
|
|
9
6
|
/**
|
|
10
7
|
* Generic esc command
|
|
11
8
|
* @param lifecycle lifecycle
|
|
12
9
|
*/
|
|
13
10
|
static generic(lifecycle) {
|
|
14
|
-
return new
|
|
11
|
+
return new GenericESC(lifecycle);
|
|
15
12
|
}
|
|
16
13
|
}
|
|
17
|
-
exports.ESC = ESC;
|
package/build/impls/generic.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.GenericESC = void 0;
|
|
4
|
-
const basic_1 = require("./basic");
|
|
5
|
-
class GenericESC extends basic_1.BasicESC {
|
|
1
|
+
import { BasicESC } from "./basic";
|
|
2
|
+
export class GenericESC extends BasicESC {
|
|
6
3
|
constructor(lifecycle) {
|
|
7
4
|
super(lifecycle);
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
exports.GenericESC = GenericESC;
|
package/build/impls/index.js
CHANGED
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./generic"), exports);
|
|
18
|
-
__exportStar(require("./esc"), exports);
|
|
1
|
+
export * from './generic';
|
|
2
|
+
export * from './esc';
|
package/build/index.js
CHANGED
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./impls"), exports);
|
|
18
|
-
__exportStar(require("./args"), exports);
|
|
1
|
+
export * from './impls';
|
|
2
|
+
export * from './args';
|
package/build/types/image.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EImageMode = void 0;
|
|
4
|
-
var EImageMode;
|
|
1
|
+
export var EImageMode;
|
|
5
2
|
(function (EImageMode) {
|
|
6
3
|
EImageMode[EImageMode["NORMAL"] = 0] = "NORMAL";
|
|
7
4
|
EImageMode[EImageMode["DOUBLE_WIDTH"] = 1] = "DOUBLE_WIDTH";
|
|
8
5
|
EImageMode[EImageMode["DOUBLE_HEIGHT"] = 2] = "DOUBLE_HEIGHT";
|
|
9
6
|
EImageMode[EImageMode["DOUBLE_WIDTH_HEIGHT"] = 3] = "DOUBLE_WIDTH_HEIGHT";
|
|
10
|
-
})(EImageMode
|
|
7
|
+
})(EImageMode || (EImageMode = {}));
|
package/build/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA"}
|
package/build/types/index.js
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./image"), exports);
|
|
18
|
-
__exportStar(require("./papertype"), exports);
|
|
1
|
+
export * from './image';
|
|
2
|
+
export * from './papertype';
|
|
3
|
+
export * from './papertypeq3';
|
package/build/types/papertype.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PaperType = void 0;
|
|
4
|
-
var PaperType;
|
|
1
|
+
export var PaperType;
|
|
5
2
|
(function (PaperType) {
|
|
6
3
|
/**
|
|
7
4
|
* 折叠黑标纸
|
|
@@ -15,4 +12,4 @@ var PaperType;
|
|
|
15
12
|
* 不干胶缝隙纸
|
|
16
13
|
*/
|
|
17
14
|
PaperType[PaperType["NO_DRY_ADHESIVE_PAPER"] = 2] = "NO_DRY_ADHESIVE_PAPER";
|
|
18
|
-
})(PaperType
|
|
15
|
+
})(PaperType || (PaperType = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"papertypeq3.d.ts","sourceRoot":"","sources":["../../src/types/papertypeq3.ts"],"names":[],"mappings":"AACA,oBAAY,WAAW;IACrB;;OAEG;IACH,qBAAqB,IAAE;IACvB;;OAEG;IACH,wBAAwB,IAAE;IAC1B;;OAEG;IACH,qBAAqB,IAAE;CACxB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export var PaperTypeQ3;
|
|
2
|
+
(function (PaperTypeQ3) {
|
|
3
|
+
/**
|
|
4
|
+
* 不干胶缝隙纸
|
|
5
|
+
*/
|
|
6
|
+
PaperTypeQ3[PaperTypeQ3["NO_DRY_ADHESIVE_PAPER"] = 0] = "NO_DRY_ADHESIVE_PAPER";
|
|
7
|
+
/**
|
|
8
|
+
* 折叠黑标纸
|
|
9
|
+
*/
|
|
10
|
+
PaperTypeQ3[PaperTypeQ3["FOLDED_BLACK_LABEL_PAPER"] = 1] = "FOLDED_BLACK_LABEL_PAPER";
|
|
11
|
+
/**
|
|
12
|
+
* 连续卷筒纸
|
|
13
|
+
*/
|
|
14
|
+
PaperTypeQ3[PaperTypeQ3["CONTINUOUS_REEL_PAPER"] = 2] = "CONTINUOUS_REEL_PAPER";
|
|
15
|
+
})(PaperTypeQ3 || (PaperTypeQ3 = {}));
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@psdk/esc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "psdk",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc",
|
|
9
|
-
"package": "tsc && ncc build --source-map build/index.js -m -C -o dist
|
|
9
|
+
"package": "tsc && ncc build --source-map build/index.js -m -C -o dist",
|
|
10
10
|
"test": "jest",
|
|
11
11
|
"docs": "npx typedoc --out dist/docs index.ts"
|
|
12
12
|
},
|
|
@@ -15,42 +15,23 @@
|
|
|
15
15
|
},
|
|
16
16
|
"author": "",
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@babel/
|
|
19
|
-
"@babel/
|
|
20
|
-
"@babel/
|
|
21
|
-
"@
|
|
22
|
-
"@
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"@babel/plugin-transform-modules-commonjs": "^7.18.0",
|
|
28
|
-
"@babel/plugin-transform-object-assign": "^7.16.7",
|
|
29
|
-
"@babel/plugin-transform-runtime": "^7.18.0",
|
|
30
|
-
"@babel/preset-env": "^7.18.0",
|
|
31
|
-
"@babel/preset-typescript": "^7.17.12",
|
|
32
|
-
"@babel/register": "^7.17.7",
|
|
33
|
-
"@babel/runtime-corejs3": "^7.18.0",
|
|
34
|
-
"@types/jest": "^27.5.1",
|
|
35
|
-
"@types/node": "^17.0.35",
|
|
36
|
-
"@vercel/ncc": "^0.33.4",
|
|
37
|
-
"babel-loader": "^8.2.5",
|
|
38
|
-
"buffer": "^6.0.3",
|
|
39
|
-
"jest": "^28.1.0",
|
|
40
|
-
"string_decoder": "^1.3.0",
|
|
41
|
-
"ts-jest": "^28.0.2",
|
|
42
|
-
"typedoc": "^0.22.15",
|
|
43
|
-
"typescript": "^4.6.4",
|
|
44
|
-
"webpack": "^5.72.1",
|
|
45
|
-
"webpack-cli": "^4.9.2"
|
|
18
|
+
"@babel/core": "^7.24.5",
|
|
19
|
+
"@babel/preset-env": "^7.24.5",
|
|
20
|
+
"@babel/preset-typescript": "^7.24.1",
|
|
21
|
+
"@types/jest": "^29.5.12",
|
|
22
|
+
"@vercel/ncc": "^0.38.1",
|
|
23
|
+
"babel-jest": "^29.7.0",
|
|
24
|
+
"jest": "^29.7.0",
|
|
25
|
+
"typedoc": "^0.25.13",
|
|
26
|
+
"typescript": "^5.4.5"
|
|
46
27
|
},
|
|
47
28
|
"dependencies": {
|
|
48
|
-
"@psdk/frame-father": "0.
|
|
49
|
-
"@psdk/frame-imageb": "0.
|
|
29
|
+
"@psdk/frame-father": "0.3.1",
|
|
30
|
+
"@psdk/frame-imageb": "0.3.1"
|
|
50
31
|
},
|
|
51
32
|
"files": [
|
|
52
33
|
"build",
|
|
53
34
|
"!build/browser/psdk*"
|
|
54
35
|
],
|
|
55
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "e6a5cd6d59ef0ae61226a47d72fbe059a787d291"
|
|
56
37
|
}
|