@psdk/esc 0.2.65 → 0.3.0
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/getshutdowntime.js +2 -6
- package/build/args/image.d.ts.map +1 -1
- package/build/args/image.js +9 -14
- package/build/args/index.d.ts +0 -2
- package/build/args/index.d.ts.map +1 -1
- package/build/args/index.js +23 -41
- 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/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 +0 -4
- package/build/impls/basic.d.ts.map +1 -1
- package/build/impls/basic.js +27 -36
- 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.js +2 -18
- package/build/types/papertype.js +2 -5
- package/package.json +14 -33
- package/build/args/info.d.ts +0 -5
- package/build/args/info.d.ts.map +0 -1
- package/build/args/info.js +0 -10
|
@@ -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;
|
|
@@ -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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/args/image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AACpC,OAAO,EAAC,aAAa,EAAgB,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAGpC;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW,CAAC,MAAM,CAAC;IAE7C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IACnC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAoB;IAC1C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;gBAEvB,OAAO,EAAE;QAEnB;;WAEG;QACH,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB;;WAEG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB;;;;;;WAMG;QACH,IAAI,CAAC,EAAE,UAAU,CAAC;QAClB;;WAEG;QACH,KAAK,EAAE,iBAAiB,CAAC;KAC1B;IASD,MAAM,IAAI,aAAa;
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/args/image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AACpC,OAAO,EAAC,aAAa,EAAgB,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAGpC;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW,CAAC,MAAM,CAAC;IAE7C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IACnC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAoB;IAC1C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;gBAEvB,OAAO,EAAE;QAEnB;;WAEG;QACH,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB;;WAEG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB;;;;;;WAMG;QACH,IAAI,CAAC,EAAE,UAAU,CAAC;QAClB;;WAEG;QACH,KAAK,EAAE,iBAAiB,CAAC;KAC1B;IASD,MAAM,IAAI,aAAa;IA0CvB,MAAM,IAAI,UAAU;CAIrB"}
|
package/build/args/image.js
CHANGED
|
@@ -1,26 +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
|
|
23
|
-
command: 'esc',
|
|
19
|
+
const processer = new Pbita({
|
|
24
20
|
threshold: this.threshold,
|
|
25
21
|
compress: this.compress,
|
|
26
22
|
reverse: this.reverse,
|
|
@@ -35,7 +31,7 @@ class EImage extends basic_1.BasicESCArg {
|
|
|
35
31
|
let height = fimage.height;
|
|
36
32
|
const eWidth = Math.floor((width % 8 === 0) ? (width / 8) : (width / 8 + 1));
|
|
37
33
|
if (this.compress) {
|
|
38
|
-
return
|
|
34
|
+
return BinaryCommand.with(this.header())
|
|
39
35
|
.appendNumber(eWidth / 256)
|
|
40
36
|
.appendNumber(eWidth % 256)
|
|
41
37
|
.appendNumber(height / 256)
|
|
@@ -47,7 +43,7 @@ class EImage extends basic_1.BasicESCArg {
|
|
|
47
43
|
.appendU8A(fbytes.subarray(2, fbytes.length))
|
|
48
44
|
.clause();
|
|
49
45
|
}
|
|
50
|
-
return
|
|
46
|
+
return BinaryCommand.with(this.header())
|
|
51
47
|
.appendNumber(this.mode)
|
|
52
48
|
.appendNumber(eWidth % 256)
|
|
53
49
|
.appendNumber(eWidth / 256)
|
|
@@ -60,4 +56,3 @@ class EImage extends basic_1.BasicESCArg {
|
|
|
60
56
|
return new Uint8Array(this.compress ? [0x1F, 0x00] : [0x1D, 0x76, 0x30]);
|
|
61
57
|
}
|
|
62
58
|
}
|
|
63
|
-
exports.EImage = EImage;
|
package/build/args/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/args/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,MAAM,CAAA;AACpB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/args/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,MAAM,CAAA;AACpB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA"}
|
package/build/args/index.js
CHANGED
|
@@ -1,41 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
__exportStar(require("./line"), exports);
|
|
25
|
-
__exportStar(require("./linedot"), exports);
|
|
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';
|
|
@@ -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;
|
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 +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,
|
|
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,EAUX,MAAM,SAAS,CAAA;AAIhB,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;IAEI,IAAI,CAAC,GAAG,EAAE,KAAK,GAAG,CAAC;IAI1B;;;OAGG;IACI,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC;IAI/B;;OAEG;IAEI,GAAG,IAAI,CAAC;IAIf;;OAEG;IAEI,KAAK,IAAI,CAAC;IAIjB;;OAEG;IACI,IAAI,IAAI,CAAC;IAIhB;;OAEG;IACI,SAAS,CAAC,GAAG,CAAC,EAAE,UAAU,GAAG,CAAC;IAIrC;;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,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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, EPaperType, EPosition, EPrinterVersion, ESetShutdownTime, ESN, EState, EStopJob, EThickness, EVersion, EWakeup, } from '../args';
|
|
3
|
+
import { PaperType } from "../types";
|
|
4
|
+
import { EBTType } from "../args/bttype";
|
|
5
|
+
export class BasicESC extends PSDK {
|
|
8
6
|
constructor(lifecycle) {
|
|
9
7
|
super();
|
|
10
8
|
this._lifecycle = lifecycle;
|
|
11
|
-
this._commander =
|
|
9
|
+
this._commander = Commander.make();
|
|
12
10
|
}
|
|
13
11
|
connectedDevice() {
|
|
14
12
|
return this._lifecycle.connectedDevice;
|
|
@@ -21,7 +19,7 @@ class BasicESC extends frame_father_1.PSDK {
|
|
|
21
19
|
* @param arg
|
|
22
20
|
*/
|
|
23
21
|
lineDot(arg) {
|
|
24
|
-
return super.push(new
|
|
22
|
+
return super.push(new ELineDot({ dot: arg }));
|
|
25
23
|
}
|
|
26
24
|
/**
|
|
27
25
|
* 回纸命令
|
|
@@ -29,25 +27,25 @@ class BasicESC extends frame_father_1.PSDK {
|
|
|
29
27
|
* @param arg
|
|
30
28
|
*/
|
|
31
29
|
backLineDot(arg) {
|
|
32
|
-
return super.push(new
|
|
30
|
+
return super.push(new EBackLineDot({ dot: arg }));
|
|
33
31
|
}
|
|
34
32
|
/**
|
|
35
33
|
* 查询电量
|
|
36
34
|
*/
|
|
37
35
|
batteryVolume() {
|
|
38
|
-
return super.push(new
|
|
36
|
+
return super.push(new EBatteryVolume());
|
|
39
37
|
}
|
|
40
38
|
/**
|
|
41
39
|
* 使能打印机
|
|
42
40
|
*/
|
|
43
41
|
enable() {
|
|
44
|
-
return super.push(new
|
|
42
|
+
return super.push(new EEnable());
|
|
45
43
|
}
|
|
46
44
|
/**
|
|
47
45
|
* 获取关机时间
|
|
48
46
|
*/
|
|
49
47
|
getShutdownTime() {
|
|
50
|
-
return super.push(new
|
|
48
|
+
return super.push(new EGetShutdownTime());
|
|
51
49
|
}
|
|
52
50
|
/**
|
|
53
51
|
* 打印图片
|
|
@@ -59,7 +57,7 @@ class BasicESC extends frame_father_1.PSDK {
|
|
|
59
57
|
*学习缝隙
|
|
60
58
|
*/
|
|
61
59
|
learnLabelGap() {
|
|
62
|
-
return super.push(new
|
|
60
|
+
return super.push(new ELearnLabelGap());
|
|
63
61
|
}
|
|
64
62
|
/**
|
|
65
63
|
*画线
|
|
@@ -72,98 +70,91 @@ class BasicESC extends frame_father_1.PSDK {
|
|
|
72
70
|
* @param arg 0:居左 1:居中 2:居右
|
|
73
71
|
*/
|
|
74
72
|
location(arg) {
|
|
75
|
-
return super.push(new
|
|
73
|
+
return super.push(new ELocation({ location: arg }));
|
|
76
74
|
}
|
|
77
75
|
/**
|
|
78
76
|
*查询MAC
|
|
79
77
|
*/
|
|
80
78
|
mac() {
|
|
81
|
-
return super.push(new
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* 查询打印机所有信息
|
|
85
|
-
*/
|
|
86
|
-
info() {
|
|
87
|
-
return super.push(new args_1.EInfo());
|
|
79
|
+
return super.push(new EMac());
|
|
88
80
|
}
|
|
89
81
|
/**
|
|
90
82
|
*查询打印机型号
|
|
91
83
|
*/
|
|
92
84
|
model() {
|
|
93
|
-
return super.push(new
|
|
85
|
+
return super.push(new EModel());
|
|
94
86
|
}
|
|
95
87
|
/**
|
|
96
88
|
*查询蓝牙名称
|
|
97
89
|
*/
|
|
98
90
|
name() {
|
|
99
|
-
return super.push(new
|
|
91
|
+
return super.push(new EName());
|
|
100
92
|
}
|
|
101
93
|
/**
|
|
102
94
|
*纸张类型
|
|
103
95
|
*/
|
|
104
96
|
paperType(arg) {
|
|
105
|
-
return super.push(arg !== null && arg !== void 0 ? arg : new
|
|
97
|
+
return super.push(arg !== null && arg !== void 0 ? arg : new EPaperType({ paperType: PaperType.FOLDED_BLACK_LABEL_PAPER }));
|
|
106
98
|
}
|
|
107
99
|
/**
|
|
108
100
|
* 打印定位
|
|
109
101
|
*/
|
|
110
102
|
position() {
|
|
111
|
-
return super.push(new
|
|
103
|
+
return super.push(new EPosition());
|
|
112
104
|
}
|
|
113
105
|
/**
|
|
114
106
|
* 查询打印机固件版本
|
|
115
107
|
*/
|
|
116
108
|
printerVersion() {
|
|
117
|
-
return super.push(new
|
|
109
|
+
return super.push(new EPrinterVersion());
|
|
118
110
|
}
|
|
119
111
|
/**
|
|
120
112
|
* 设置关机时间
|
|
121
113
|
*/
|
|
122
114
|
setShutdownTime(arg) {
|
|
123
|
-
return super.push(new
|
|
115
|
+
return super.push(new ESetShutdownTime({ time: arg }));
|
|
124
116
|
}
|
|
125
117
|
/**
|
|
126
118
|
*查询SN
|
|
127
119
|
*/
|
|
128
120
|
sn() {
|
|
129
|
-
return super.push(new
|
|
121
|
+
return super.push(new ESN());
|
|
130
122
|
}
|
|
131
123
|
/**
|
|
132
124
|
*查询打印机状态
|
|
133
125
|
*/
|
|
134
126
|
state() {
|
|
135
|
-
return super.push(new
|
|
127
|
+
return super.push(new EState());
|
|
136
128
|
}
|
|
137
129
|
/**
|
|
138
130
|
*结束打印任务
|
|
139
131
|
*/
|
|
140
132
|
stopJob() {
|
|
141
|
-
return super.push(new
|
|
133
|
+
return super.push(new EStopJob());
|
|
142
134
|
}
|
|
143
135
|
/**
|
|
144
136
|
* 设置打印机浓度(0-2)
|
|
145
137
|
* @param arg 0:低浓度 1:中浓度 2:高浓度
|
|
146
138
|
*/
|
|
147
139
|
thickness(arg) {
|
|
148
|
-
return super.push(new
|
|
140
|
+
return super.push(new EThickness({ thickness: arg }));
|
|
149
141
|
}
|
|
150
142
|
/**
|
|
151
143
|
*查询蓝牙固件版本
|
|
152
144
|
*/
|
|
153
145
|
version() {
|
|
154
|
-
return super.push(new
|
|
146
|
+
return super.push(new EVersion());
|
|
155
147
|
}
|
|
156
148
|
/**
|
|
157
149
|
*唤醒打印机
|
|
158
150
|
*/
|
|
159
151
|
wakeup() {
|
|
160
|
-
return super.push(new
|
|
152
|
+
return super.push(new EWakeup());
|
|
161
153
|
}
|
|
162
154
|
/**
|
|
163
155
|
* 设置蓝牙类型(支持压缩的机器需要调用)
|
|
164
156
|
*/
|
|
165
157
|
setBTType() {
|
|
166
|
-
return super.push(new
|
|
158
|
+
return super.push(new EBTType());
|
|
167
159
|
}
|
|
168
160
|
}
|
|
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.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("./image"), exports);
|
|
18
|
-
__exportStar(require("./papertype"), exports);
|
|
1
|
+
export * from './image';
|
|
2
|
+
export * from './papertype';
|
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 = {}));
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@psdk/esc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
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.0",
|
|
30
|
+
"@psdk/frame-imageb": "0.3.0"
|
|
50
31
|
},
|
|
51
32
|
"files": [
|
|
52
33
|
"build",
|
|
53
34
|
"!build/browser/psdk*"
|
|
54
35
|
],
|
|
55
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "9796259a6a24ae7e334340f6c28d5ae9b3e45401"
|
|
56
37
|
}
|
package/build/args/info.d.ts
DELETED
package/build/args/info.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../src/args/info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAEvD,qBAAa,KAAM,SAAQ,mBAAmB,CAAC,KAAK,CAAC;IAEnD,MAAM,IAAI,UAAU;CAGrB"}
|
package/build/args/info.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EInfo = void 0;
|
|
4
|
-
const frame_father_1 = require("@psdk/frame-father");
|
|
5
|
-
class EInfo extends frame_father_1.OnlyBinaryHeaderArg {
|
|
6
|
-
header() {
|
|
7
|
-
return new Uint8Array([0x10, 0xFF, 0x70]);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.EInfo = EInfo;
|