@psdk/esc 0.2.67 → 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.
Files changed (42) hide show
  1. package/build/args/backlinedot.js +4 -8
  2. package/build/args/basic.js +2 -6
  3. package/build/args/batteryvolume.js +2 -6
  4. package/build/args/bttype.js +2 -6
  5. package/build/args/enable.js +2 -6
  6. package/build/args/getshutdowntime.js +2 -6
  7. package/build/args/image.d.ts.map +1 -1
  8. package/build/args/image.js +9 -14
  9. package/build/args/index.d.ts +0 -2
  10. package/build/args/index.d.ts.map +1 -1
  11. package/build/args/index.js +23 -41
  12. package/build/args/learnlabelgap.js +2 -6
  13. package/build/args/line.js +4 -8
  14. package/build/args/linedot.js +4 -8
  15. package/build/args/location.js +4 -8
  16. package/build/args/mac.js +2 -6
  17. package/build/args/model.js +2 -6
  18. package/build/args/name.js +2 -6
  19. package/build/args/papertype.js +6 -10
  20. package/build/args/position.js +2 -6
  21. package/build/args/printerversion.js +2 -6
  22. package/build/args/setshutdowntime.js +4 -8
  23. package/build/args/sn.js +2 -6
  24. package/build/args/state.js +2 -6
  25. package/build/args/stopjob.js +2 -6
  26. package/build/args/thickness.js +4 -8
  27. package/build/args/version.js +2 -6
  28. package/build/args/wakeup.js +2 -6
  29. package/build/impls/basic.d.ts +0 -4
  30. package/build/impls/basic.d.ts.map +1 -1
  31. package/build/impls/basic.js +27 -36
  32. package/build/impls/esc.js +3 -7
  33. package/build/impls/generic.js +2 -6
  34. package/build/impls/index.js +2 -18
  35. package/build/index.js +2 -18
  36. package/build/types/image.js +2 -5
  37. package/build/types/index.js +2 -18
  38. package/build/types/papertype.js +2 -5
  39. package/package.json +14 -33
  40. package/build/args/info.d.ts +0 -5
  41. package/build/args/info.d.ts.map +0 -1
  42. package/build/args/info.js +0 -10
@@ -1,23 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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 basic_1.BasicESCArg {
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 frame_father_1.BinaryCommand.with(this.header())
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;
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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;
@@ -1,10 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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;
@@ -1,10 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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,C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E,UAAU,CAAC;QAClB;;WAEG;QACH,KAAK,EAAE,iBAAiB,CAAC;KAC1B;IASD,MAAM,IAAI,aAAa;IA0CvB,MAAM,IAAI,UAAU;CAIrB"}
@@ -1,26 +1,22 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EImage = void 0;
4
- const basic_1 = require("./basic");
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 basic_1.BasicESCArg {
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 : types_1.EImageMode.NORMAL;
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 frame_imageb_1.Pbita({
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 frame_father_1.BinaryCommand.with(this.header())
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 frame_father_1.BinaryCommand.with(this.header())
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;
@@ -21,6 +21,4 @@ export * from './stopjob';
21
21
  export * from './thickness';
22
22
  export * from './version';
23
23
  export * from './wakeup';
24
- export * from './info';
25
- export * from './bttype';
26
24
  //# sourceMappingURL=index.d.ts.map
@@ -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;AACxB,cAAc,QAAQ,CAAA;AACtB,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"}
@@ -1,41 +1,23 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
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("./backlinedot"), exports);
18
- __exportStar(require("./basic"), exports);
19
- __exportStar(require("./batteryvolume"), exports);
20
- __exportStar(require("./enable"), exports);
21
- __exportStar(require("./getshutdowntime"), exports);
22
- __exportStar(require("./image"), exports);
23
- __exportStar(require("./learnlabelgap"), exports);
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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;
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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 basic_1.BasicESCArg {
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 frame_father_1.BinaryCommand.with(this.header())
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;
@@ -1,23 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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 basic_1.BasicESCArg {
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 frame_father_1.BinaryCommand.with(this.header())
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;
@@ -1,23 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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 basic_1.BasicESCArg {
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 frame_father_1.BinaryCommand.with(this.header())
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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;
@@ -1,10 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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;
@@ -1,10 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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;
@@ -1,21 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EPaperType = void 0;
4
- const basic_1 = require("./basic");
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 : types_1.PaperType.FOLDED_BLACK_LABEL_PAPER;
8
+ this.paperType = (_a = options.paperType) !== null && _a !== void 0 ? _a : PaperType.FOLDED_BLACK_LABEL_PAPER;
12
9
  }
13
10
  clause() {
14
- return frame_father_1.BinaryCommand.with(this.header())
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;
@@ -1,10 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ESetShutdownTime = void 0;
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 frame_father_1.BinaryCommand.with(this.header())
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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;
@@ -1,10 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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;
@@ -1,10 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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;
@@ -1,20 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EThickness = void 0;
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 frame_father_1.BinaryCommand.with(this.header())
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;
@@ -1,10 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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;
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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;
@@ -58,10 +58,6 @@ export declare abstract class BasicESC<T extends BasicESC<any>> extends PSDK<T>
58
58
  *查询MAC
59
59
  */
60
60
  mac(): T;
61
- /**
62
- * 查询打印机所有信息
63
- */
64
- info(): T;
65
61
  /**
66
62
  *查询打印机型号
67
63
  */
@@ -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;AAGhB,8BAAsB,QAAQ,CAAC,CAAC,SAAS,QAAQ,CAAC,GAAG,CAAC,CAAE,SAAQ,IAAI,CAAC,CAAC,CAAC;IAErE;;;OAGG;IACH,OAAO,CAAC,UAAU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AAC;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"}
@@ -1,14 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BasicESC = void 0;
4
- const frame_father_1 = require("@psdk/frame-father");
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, 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 = frame_father_1.Commander.make();
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 args_1.ELineDot({ dot: arg }));
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 args_1.EBackLineDot({ dot: arg }));
30
+ return super.push(new EBackLineDot({ dot: arg }));
33
31
  }
34
32
  /**
35
33
  * 查询电量
36
34
  */
37
35
  batteryVolume() {
38
- return super.push(new args_1.EBatteryVolume());
36
+ return super.push(new EBatteryVolume());
39
37
  }
40
38
  /**
41
39
  * 使能打印机
42
40
  */
43
41
  enable() {
44
- return super.push(new args_1.EEnable());
42
+ return super.push(new EEnable());
45
43
  }
46
44
  /**
47
45
  * 获取关机时间
48
46
  */
49
47
  getShutdownTime() {
50
- return super.push(new args_1.EGetShutdownTime());
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 args_1.ELearnLabelGap());
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 args_1.ELocation({ location: arg }));
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 args_1.EMac());
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 args_1.EModel());
85
+ return super.push(new EModel());
94
86
  }
95
87
  /**
96
88
  *查询蓝牙名称
97
89
  */
98
90
  name() {
99
- return super.push(new args_1.EName());
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 args_1.EPaperType({ paperType: types_1.PaperType.FOLDED_BLACK_LABEL_PAPER }));
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 args_1.EPosition());
103
+ return super.push(new EPosition());
112
104
  }
113
105
  /**
114
106
  * 查询打印机固件版本
115
107
  */
116
108
  printerVersion() {
117
- return super.push(new args_1.EPrinterVersion());
109
+ return super.push(new EPrinterVersion());
118
110
  }
119
111
  /**
120
112
  * 设置关机时间
121
113
  */
122
114
  setShutdownTime(arg) {
123
- return super.push(new args_1.ESetShutdownTime({ time: arg }));
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 args_1.ESN());
121
+ return super.push(new ESN());
130
122
  }
131
123
  /**
132
124
  *查询打印机状态
133
125
  */
134
126
  state() {
135
- return super.push(new args_1.EState());
127
+ return super.push(new EState());
136
128
  }
137
129
  /**
138
130
  *结束打印任务
139
131
  */
140
132
  stopJob() {
141
- return super.push(new args_1.EStopJob());
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 args_1.EThickness({ thickness: arg }));
140
+ return super.push(new EThickness({ thickness: arg }));
149
141
  }
150
142
  /**
151
143
  *查询蓝牙固件版本
152
144
  */
153
145
  version() {
154
- return super.push(new args_1.EVersion());
146
+ return super.push(new EVersion());
155
147
  }
156
148
  /**
157
149
  *唤醒打印机
158
150
  */
159
151
  wakeup() {
160
- return super.push(new args_1.EWakeup());
152
+ return super.push(new EWakeup());
161
153
  }
162
154
  /**
163
155
  * 设置蓝牙类型(支持压缩的机器需要调用)
164
156
  */
165
157
  setBTType() {
166
- return super.push(new args_1.EBTType());
158
+ return super.push(new EBTType());
167
159
  }
168
160
  }
169
- exports.BasicESC = BasicESC;
@@ -1,17 +1,13 @@
1
- "use strict";
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 generic_1.GenericESC(lifecycle);
11
+ return new GenericESC(lifecycle);
15
12
  }
16
13
  }
17
- exports.ESC = ESC;
@@ -1,10 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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;
@@ -1,18 +1,2 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
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
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
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';
@@ -1,10 +1,7 @@
1
- "use strict";
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 = exports.EImageMode || (exports.EImageMode = {}));
7
+ })(EImageMode || (EImageMode = {}));
@@ -1,18 +1,2 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
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';
@@ -1,7 +1,4 @@
1
- "use strict";
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 = exports.PaperType || (exports.PaperType = {}));
15
+ })(PaperType || (PaperType = {}));
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@psdk/esc",
3
- "version": "0.2.67",
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 && npx webpack",
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/plugin-proposal-class-properties": "^7.17.12",
19
- "@babel/plugin-proposal-decorators": "^7.17.12",
20
- "@babel/plugin-proposal-export-namespace-from": "^7.17.12",
21
- "@babel/plugin-proposal-function-sent": "^7.17.12",
22
- "@babel/plugin-proposal-numeric-separator": "^7.16.7",
23
- "@babel/plugin-proposal-object-rest-spread": "^7.18.0",
24
- "@babel/plugin-proposal-throw-expressions": "^7.16.7",
25
- "@babel/plugin-syntax-dynamic-import": "^7.8.3",
26
- "@babel/plugin-syntax-import-meta": "^7.10.4",
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.2.67",
49
- "@psdk/frame-imageb": "0.2.67"
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": "1b469612990a3efbf1a3fe4296ed13e8c8865988"
36
+ "gitHead": "9796259a6a24ae7e334340f6c28d5ae9b3e45401"
56
37
  }
@@ -1,5 +0,0 @@
1
- import { OnlyBinaryHeaderArg } from "@psdk/frame-father";
2
- export declare class EInfo extends OnlyBinaryHeaderArg<EInfo> {
3
- header(): Uint8Array;
4
- }
5
- //# sourceMappingURL=info.d.ts.map
@@ -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"}
@@ -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;