Comparing version 0.3.4 to 0.4.0
@@ -1,14 +0,17 @@ | ||
import { BasicESCArg } from "./basic"; | ||
import { BinaryCommand } from "@psdk/frame-father"; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EBackLineDot = void 0; | ||
const basic_1 = require("./basic"); | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
/** | ||
* BackLineDot | ||
*/ | ||
export class EBackLineDot extends BasicESCArg { | ||
class EBackLineDot extends basic_1.BasicESCArg { | ||
dot; | ||
constructor(options) { | ||
var _a; | ||
super(); | ||
this.dot = (_a = options.dot) !== null && _a !== void 0 ? _a : 0; | ||
this.dot = options.dot ?? 0; | ||
} | ||
clause() { | ||
return BinaryCommand.with(this.header()) | ||
return frame_father_1.BinaryCommand.with(this.header()) | ||
.appendNumber(this.dot).clause(); | ||
@@ -20,1 +23,2 @@ } | ||
} | ||
exports.EBackLineDot = EBackLineDot; |
@@ -1,3 +0,6 @@ | ||
import { EasyArg } from "@psdk/frame-father"; | ||
export class BasicESCArg extends EasyArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BasicESCArg = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class BasicESCArg extends frame_father_1.EasyArg { | ||
append(arg) { | ||
@@ -15,1 +18,2 @@ super.append(arg); | ||
} | ||
exports.BasicESCArg = BasicESCArg; |
@@ -1,3 +0,6 @@ | ||
import { OnlyBinaryHeaderArg } from "@psdk/frame-father"; | ||
export class EBatteryVolume extends OnlyBinaryHeaderArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EBatteryVolume = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class EBatteryVolume extends frame_father_1.OnlyBinaryHeaderArg { | ||
header() { | ||
@@ -7,1 +10,2 @@ return new Uint8Array([0x10, 0xFF, 0x50, 0xF1]); | ||
} | ||
exports.EBatteryVolume = EBatteryVolume; |
@@ -1,3 +0,6 @@ | ||
import { OnlyBinaryHeaderArg } from "@psdk/frame-father"; | ||
export class EBTType extends OnlyBinaryHeaderArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EBTType = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class EBTType extends frame_father_1.OnlyBinaryHeaderArg { | ||
header() { | ||
@@ -7,1 +10,2 @@ return new Uint8Array([0x1F, 0xB2, 0x10]); | ||
} | ||
exports.EBTType = EBTType; |
@@ -1,3 +0,6 @@ | ||
import { OnlyBinaryHeaderArg } from "@psdk/frame-father"; | ||
export class EEnable extends OnlyBinaryHeaderArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EEnable = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class EEnable extends frame_father_1.OnlyBinaryHeaderArg { | ||
header() { | ||
@@ -7,1 +10,2 @@ return new Uint8Array([0x10, 0xFF, 0xFE, 0x01]); | ||
} | ||
exports.EEnable = EEnable; |
@@ -1,3 +0,6 @@ | ||
import { OnlyBinaryHeaderArg } from "@psdk/frame-father"; | ||
export class EGetPaperTypeQ3 extends OnlyBinaryHeaderArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EGetPaperTypeQ3 = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class EGetPaperTypeQ3 extends frame_father_1.OnlyBinaryHeaderArg { | ||
header() { | ||
@@ -7,1 +10,2 @@ return new Uint8Array([0x10, 0xFF, 0x85]); | ||
} | ||
exports.EGetPaperTypeQ3 = EGetPaperTypeQ3; |
@@ -1,3 +0,6 @@ | ||
import { OnlyBinaryHeaderArg } from "@psdk/frame-father"; | ||
export class EGetShutdownTime extends OnlyBinaryHeaderArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EGetShutdownTime = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class EGetShutdownTime extends frame_father_1.OnlyBinaryHeaderArg { | ||
header() { | ||
@@ -7,1 +10,2 @@ return new Uint8Array([0x10, 0xFF, 0x13]); | ||
} | ||
exports.EGetShutdownTime = EGetShutdownTime; |
@@ -1,20 +0,27 @@ | ||
import { BasicESCArg } from "./basic"; | ||
import { BinaryCommand } from "@psdk/frame-father"; | ||
import { EImageMode } from "../types"; | ||
import { Pbita } from "@psdk/frame-imageb"; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EImage = void 0; | ||
const basic_1 = require("./basic"); | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
const types_1 = require("../types"); | ||
const frame_imageb_1 = require("@psdk/frame-imageb"); | ||
/** | ||
* Image | ||
*/ | ||
export class EImage extends BasicESCArg { | ||
class EImage extends basic_1.BasicESCArg { | ||
compress; | ||
mode; | ||
image; | ||
reverse; | ||
threshold; | ||
constructor(options) { | ||
var _a, _b, _c, _d; | ||
super(); | ||
this.compress = (_a = options.compress) !== null && _a !== void 0 ? _a : false; | ||
this.reverse = (_b = options.reverse) !== null && _b !== void 0 ? _b : false; | ||
this.threshold = (_c = options.threshold) !== null && _c !== void 0 ? _c : 190; | ||
this.mode = (_d = options.mode) !== null && _d !== void 0 ? _d : EImageMode.NORMAL; | ||
this.compress = options.compress ?? false; | ||
this.reverse = options.reverse ?? false; | ||
this.threshold = options.threshold ?? 190; | ||
this.mode = options.mode ?? types_1.EImageMode.NORMAL; | ||
this.image = options.image; | ||
} | ||
clause() { | ||
const processer = new Pbita({ | ||
const processer = new frame_imageb_1.Pbita({ | ||
command: 'esc', | ||
@@ -35,3 +42,3 @@ threshold: this.threshold, | ||
if (this.compress) { | ||
return BinaryCommand.with(this.header()) | ||
return frame_father_1.BinaryCommand.with(this.header()) | ||
.appendNumber(eWidth / 256) | ||
@@ -48,3 +55,3 @@ .appendNumber(eWidth % 256) | ||
} | ||
return BinaryCommand.with(this.header()) | ||
return frame_father_1.BinaryCommand.with(this.header()) | ||
.appendNumber(this.mode) | ||
@@ -62,1 +69,2 @@ .appendNumber(eWidth % 256) | ||
} | ||
exports.EImage = EImage; |
@@ -1,25 +0,41 @@ | ||
export * from './backlinedot'; | ||
export * from './basic'; | ||
export * from './batteryvolume'; | ||
export * from './enable'; | ||
export * from './getshutdowntime'; | ||
export * from './image'; | ||
export * from './learnlabelgap'; | ||
export * from './line'; | ||
export * from './linedot'; | ||
export * from './location'; | ||
export * from './mac'; | ||
export * from './model'; | ||
export * from './name'; | ||
export * from './papertype'; | ||
export * from './position'; | ||
export * from './printerversion'; | ||
export * from './setshutdowntime'; | ||
export * from './sn'; | ||
export * from './state'; | ||
export * from './stopjob'; | ||
export * from './thickness'; | ||
export * from './version'; | ||
export * from './wakeup'; | ||
export * from './info'; | ||
export * from './bttype'; | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./backlinedot"), exports); | ||
__exportStar(require("./basic"), exports); | ||
__exportStar(require("./batteryvolume"), exports); | ||
__exportStar(require("./enable"), exports); | ||
__exportStar(require("./getshutdowntime"), exports); | ||
__exportStar(require("./image"), exports); | ||
__exportStar(require("./learnlabelgap"), exports); | ||
__exportStar(require("./line"), exports); | ||
__exportStar(require("./linedot"), exports); | ||
__exportStar(require("./location"), exports); | ||
__exportStar(require("./mac"), exports); | ||
__exportStar(require("./model"), exports); | ||
__exportStar(require("./name"), exports); | ||
__exportStar(require("./papertype"), exports); | ||
__exportStar(require("./position"), exports); | ||
__exportStar(require("./printerversion"), exports); | ||
__exportStar(require("./setshutdowntime"), exports); | ||
__exportStar(require("./sn"), exports); | ||
__exportStar(require("./state"), exports); | ||
__exportStar(require("./stopjob"), exports); | ||
__exportStar(require("./thickness"), exports); | ||
__exportStar(require("./version"), exports); | ||
__exportStar(require("./wakeup"), exports); | ||
__exportStar(require("./info"), exports); | ||
__exportStar(require("./bttype"), exports); |
@@ -1,3 +0,6 @@ | ||
import { OnlyBinaryHeaderArg } from "@psdk/frame-father"; | ||
export class EInfo extends OnlyBinaryHeaderArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EInfo = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class EInfo extends frame_father_1.OnlyBinaryHeaderArg { | ||
header() { | ||
@@ -7,1 +10,2 @@ return new Uint8Array([0x10, 0xFF, 0x70]); | ||
} | ||
exports.EInfo = EInfo; |
@@ -1,3 +0,6 @@ | ||
import { OnlyBinaryHeaderArg } from "@psdk/frame-father"; | ||
export class ELearnLabelGap extends OnlyBinaryHeaderArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ELearnLabelGap = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class ELearnLabelGap extends frame_father_1.OnlyBinaryHeaderArg { | ||
header() { | ||
@@ -7,1 +10,2 @@ return new Uint8Array([0x10, 0xFF, 0x03]); | ||
} | ||
exports.ELearnLabelGap = ELearnLabelGap; |
@@ -1,15 +0,19 @@ | ||
import { BasicESCArg } from "./basic"; | ||
import { BinaryCommand } from "@psdk/frame-father"; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ELine = void 0; | ||
const basic_1 = require("./basic"); | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
/** | ||
* Line | ||
*/ | ||
export class ELine extends BasicESCArg { | ||
class ELine extends basic_1.BasicESCArg { | ||
x; | ||
y; | ||
constructor(options) { | ||
var _a, _b; | ||
super(); | ||
this.x = (_a = options.x) !== null && _a !== void 0 ? _a : 0; | ||
this.y = (_b = options.y) !== null && _b !== void 0 ? _b : 0; | ||
this.x = options.x ?? 0; | ||
this.y = options.y ?? 0; | ||
} | ||
clause() { | ||
return BinaryCommand.with(this.header()) | ||
return frame_father_1.BinaryCommand.with(this.header()) | ||
.appendNumber(this.x) | ||
@@ -23,1 +27,2 @@ .appendNumber(this.y) | ||
} | ||
exports.ELine = ELine; |
@@ -1,14 +0,17 @@ | ||
import { BasicESCArg } from "./basic"; | ||
import { BinaryCommand } from "@psdk/frame-father"; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ELineDot = void 0; | ||
const basic_1 = require("./basic"); | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
/** | ||
* LineDot | ||
*/ | ||
export class ELineDot extends BasicESCArg { | ||
class ELineDot extends basic_1.BasicESCArg { | ||
dot; | ||
constructor(options) { | ||
var _a; | ||
super(); | ||
this.dot = (_a = options.dot) !== null && _a !== void 0 ? _a : 0; | ||
this.dot = options.dot ?? 0; | ||
} | ||
clause() { | ||
return BinaryCommand.with(this.header()) | ||
return frame_father_1.BinaryCommand.with(this.header()) | ||
.appendNumber(this.dot).clause(); | ||
@@ -20,1 +23,2 @@ } | ||
} | ||
exports.ELineDot = ELineDot; |
@@ -1,14 +0,17 @@ | ||
import { BasicESCArg } from "./basic"; | ||
import { BinaryCommand } from "@psdk/frame-father"; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ELocation = void 0; | ||
const basic_1 = require("./basic"); | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
/** | ||
* Location | ||
*/ | ||
export class ELocation extends BasicESCArg { | ||
class ELocation extends basic_1.BasicESCArg { | ||
location; | ||
constructor(options) { | ||
var _a; | ||
super(); | ||
this.location = (_a = options.location) !== null && _a !== void 0 ? _a : 0; | ||
this.location = options.location ?? 0; | ||
} | ||
clause() { | ||
return BinaryCommand.with(this.header()) | ||
return frame_father_1.BinaryCommand.with(this.header()) | ||
.appendNumber(this.location).clause(); | ||
@@ -20,1 +23,2 @@ } | ||
} | ||
exports.ELocation = ELocation; |
@@ -1,3 +0,6 @@ | ||
import { OnlyBinaryHeaderArg } from "@psdk/frame-father"; | ||
export class EMac extends OnlyBinaryHeaderArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EMac = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class EMac extends frame_father_1.OnlyBinaryHeaderArg { | ||
header() { | ||
@@ -7,1 +10,2 @@ return new Uint8Array([0x10, 0xFF, 0x30, 0x12]); | ||
} | ||
exports.EMac = EMac; |
@@ -1,3 +0,6 @@ | ||
import { OnlyBinaryHeaderArg } from "@psdk/frame-father"; | ||
export class EModel extends OnlyBinaryHeaderArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EModel = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class EModel extends frame_father_1.OnlyBinaryHeaderArg { | ||
header() { | ||
@@ -7,1 +10,2 @@ return new Uint8Array([0x10, 0xFF, 0x20, 0xF0]); | ||
} | ||
exports.EModel = EModel; |
@@ -1,3 +0,6 @@ | ||
import { OnlyBinaryHeaderArg } from "@psdk/frame-father"; | ||
export class EName extends OnlyBinaryHeaderArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EName = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class EName extends frame_father_1.OnlyBinaryHeaderArg { | ||
header() { | ||
@@ -7,1 +10,2 @@ return new Uint8Array([0x10, 0xFF, 0x30, 0x11]); | ||
} | ||
exports.EName = EName; |
@@ -1,12 +0,15 @@ | ||
import { BasicESCArg } from "./basic"; | ||
import { BinaryCommand } from "@psdk/frame-father"; | ||
import { PaperType } from "../types"; | ||
export class EPaperType extends BasicESCArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EPaperType = void 0; | ||
const basic_1 = require("./basic"); | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
const types_1 = require("../types"); | ||
class EPaperType extends basic_1.BasicESCArg { | ||
paperType; | ||
constructor(options) { | ||
var _a; | ||
super(); | ||
this.paperType = (_a = options.paperType) !== null && _a !== void 0 ? _a : PaperType.FOLDED_BLACK_LABEL_PAPER; | ||
this.paperType = options.paperType ?? types_1.PaperType.FOLDED_BLACK_LABEL_PAPER; | ||
} | ||
clause() { | ||
return BinaryCommand.with(this.header()) | ||
return frame_father_1.BinaryCommand.with(this.header()) | ||
.appendNumber(this.paperType).clause(); | ||
@@ -18,1 +21,2 @@ } | ||
} | ||
exports.EPaperType = EPaperType; |
@@ -1,12 +0,15 @@ | ||
import { BasicESCArg } from "./basic"; | ||
import { BinaryCommand } from "@psdk/frame-father"; | ||
import { PaperTypeQ3 } from "../types"; | ||
export class EPaperTypeQ3 extends BasicESCArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EPaperTypeQ3 = void 0; | ||
const basic_1 = require("./basic"); | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
const types_1 = require("../types"); | ||
class EPaperTypeQ3 extends basic_1.BasicESCArg { | ||
paperType; | ||
constructor(options) { | ||
var _a; | ||
super(); | ||
this.paperType = (_a = options.paperType) !== null && _a !== void 0 ? _a : PaperTypeQ3.CONTINUOUS_REEL_PAPER; | ||
this.paperType = options.paperType ?? types_1.PaperTypeQ3.CONTINUOUS_REEL_PAPER; | ||
} | ||
clause() { | ||
return BinaryCommand.with(this.header()) | ||
return frame_father_1.BinaryCommand.with(this.header()) | ||
.appendNumber(this.paperType).clause(); | ||
@@ -18,1 +21,2 @@ } | ||
} | ||
exports.EPaperTypeQ3 = EPaperTypeQ3; |
@@ -1,3 +0,6 @@ | ||
import { OnlyBinaryHeaderArg } from "@psdk/frame-father"; | ||
export class EPosition extends OnlyBinaryHeaderArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EPosition = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class EPosition extends frame_father_1.OnlyBinaryHeaderArg { | ||
header() { | ||
@@ -7,1 +10,2 @@ return new Uint8Array([0x1d, 0x0c]); | ||
} | ||
exports.EPosition = EPosition; |
@@ -1,3 +0,6 @@ | ||
import { OnlyBinaryHeaderArg } from "@psdk/frame-father"; | ||
export class EPrinterVersion extends OnlyBinaryHeaderArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EPrinterVersion = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class EPrinterVersion extends frame_father_1.OnlyBinaryHeaderArg { | ||
header() { | ||
@@ -7,1 +10,2 @@ return new Uint8Array([0x10, 0xFF, 0x20, 0xF1]); | ||
} | ||
exports.EPrinterVersion = EPrinterVersion; |
@@ -1,11 +0,14 @@ | ||
import { BasicESCArg } from "./basic"; | ||
import { BinaryCommand } from "@psdk/frame-father"; | ||
export class ESetShutdownTime extends BasicESCArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ESetShutdownTime = void 0; | ||
const basic_1 = require("./basic"); | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class ESetShutdownTime extends basic_1.BasicESCArg { | ||
time; | ||
constructor(options) { | ||
var _a; | ||
super(); | ||
this.time = (_a = options.time) !== null && _a !== void 0 ? _a : 0; | ||
this.time = options.time ?? 0; | ||
} | ||
clause() { | ||
return BinaryCommand.with(this.header()) | ||
return frame_father_1.BinaryCommand.with(this.header()) | ||
.appendNumber(this.time / 256) | ||
@@ -19,1 +22,2 @@ .appendNumber(this.time % 256) | ||
} | ||
exports.ESetShutdownTime = ESetShutdownTime; |
@@ -1,3 +0,6 @@ | ||
import { OnlyBinaryHeaderArg } from "@psdk/frame-father"; | ||
export class ESN extends OnlyBinaryHeaderArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ESN = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class ESN extends frame_father_1.OnlyBinaryHeaderArg { | ||
header() { | ||
@@ -7,1 +10,2 @@ return new Uint8Array([0x10, 0xFF, 0x20, 0xF2]); | ||
} | ||
exports.ESN = ESN; |
@@ -1,3 +0,6 @@ | ||
import { OnlyBinaryHeaderArg } from "@psdk/frame-father"; | ||
export class EState extends OnlyBinaryHeaderArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EState = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class EState extends frame_father_1.OnlyBinaryHeaderArg { | ||
header() { | ||
@@ -7,1 +10,2 @@ return new Uint8Array([0x10, 0xFF, 0x40]); | ||
} | ||
exports.EState = EState; |
@@ -1,3 +0,6 @@ | ||
import { OnlyBinaryHeaderArg } from "@psdk/frame-father"; | ||
export class EStopJob extends OnlyBinaryHeaderArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EStopJob = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class EStopJob extends frame_father_1.OnlyBinaryHeaderArg { | ||
header() { | ||
@@ -7,1 +10,2 @@ return new Uint8Array([0x10, 0xFF, 0xFE, 0x45]); | ||
} | ||
exports.EStopJob = EStopJob; |
@@ -1,11 +0,14 @@ | ||
import { BasicESCArg } from "./basic"; | ||
import { BinaryCommand } from "@psdk/frame-father"; | ||
export class EThickness extends BasicESCArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EThickness = void 0; | ||
const basic_1 = require("./basic"); | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class EThickness extends basic_1.BasicESCArg { | ||
thickness; | ||
constructor(options) { | ||
var _a; | ||
super(); | ||
this.thickness = (_a = options.thickness) !== null && _a !== void 0 ? _a : 0; | ||
this.thickness = options.thickness ?? 0; | ||
} | ||
clause() { | ||
return BinaryCommand.with(this.header()) | ||
return frame_father_1.BinaryCommand.with(this.header()) | ||
.appendNumber(this.thickness).clause(); | ||
@@ -17,1 +20,2 @@ } | ||
} | ||
exports.EThickness = EThickness; |
@@ -1,3 +0,6 @@ | ||
import { OnlyBinaryHeaderArg } from "@psdk/frame-father"; | ||
export class EVersion extends OnlyBinaryHeaderArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EVersion = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class EVersion extends frame_father_1.OnlyBinaryHeaderArg { | ||
header() { | ||
@@ -7,1 +10,2 @@ return new Uint8Array([0x10, 0xFF, 0x30, 0x10]); | ||
} | ||
exports.EVersion = EVersion; |
@@ -1,3 +0,6 @@ | ||
import { OnlyBinaryHeaderArg } from "@psdk/frame-father"; | ||
export class EWakeup extends OnlyBinaryHeaderArg { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EWakeup = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
class EWakeup extends frame_father_1.OnlyBinaryHeaderArg { | ||
header() { | ||
@@ -10,1 +13,2 @@ return new Uint8Array([ | ||
} | ||
exports.EWakeup = EWakeup; |
@@ -1,9 +0,22 @@ | ||
import { Commander, PSDK } from '@psdk/frame-father'; | ||
import { EBackLineDot, EBatteryVolume, EEnable, EGetShutdownTime, ELearnLabelGap, ELineDot, ELocation, EMac, EModel, EName, EPosition, EPrinterVersion, ESetShutdownTime, ESN, EState, EStopJob, EThickness, EVersion, EWakeup, EBTType, EInfo, } from '../args'; | ||
import { EGetPaperTypeQ3 } from "../args/getpapertypeq3"; | ||
export class BasicESC extends PSDK { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BasicESC = void 0; | ||
const frame_father_1 = require("@psdk/frame-father"); | ||
const args_1 = require("../args"); | ||
const getpapertypeq3_1 = require("../args/getpapertypeq3"); | ||
class BasicESC extends frame_father_1.PSDK { | ||
/** | ||
* lifecycle | ||
* @private | ||
*/ | ||
_lifecycle; | ||
/** | ||
* commander | ||
* @private | ||
*/ | ||
_commander; | ||
constructor(lifecycle) { | ||
super(); | ||
this._lifecycle = lifecycle; | ||
this._commander = Commander.make(); | ||
this._commander = frame_father_1.Commander.make(); | ||
} | ||
@@ -21,3 +34,3 @@ connectedDevice() { | ||
lineDot(arg) { | ||
return super.push(new ELineDot({ dot: arg })); | ||
return super.push(new args_1.ELineDot({ dot: arg })); | ||
} | ||
@@ -30,3 +43,3 @@ /** | ||
backLineDot(arg) { | ||
return super.push(new EBackLineDot({ dot: arg })); | ||
return super.push(new args_1.EBackLineDot({ dot: arg })); | ||
} | ||
@@ -37,3 +50,3 @@ /** | ||
batteryVolume() { | ||
return super.push(new EBatteryVolume()); | ||
return super.push(new args_1.EBatteryVolume()); | ||
} | ||
@@ -44,3 +57,3 @@ /** | ||
enable() { | ||
return super.push(new EEnable()); | ||
return super.push(new args_1.EEnable()); | ||
} | ||
@@ -51,3 +64,3 @@ /** | ||
getShutdownTime() { | ||
return super.push(new EGetShutdownTime()); | ||
return super.push(new args_1.EGetShutdownTime()); | ||
} | ||
@@ -64,3 +77,3 @@ /** | ||
learnLabelGap() { | ||
return super.push(new ELearnLabelGap()); | ||
return super.push(new args_1.ELearnLabelGap()); | ||
} | ||
@@ -78,3 +91,3 @@ /** | ||
location(arg) { | ||
return super.push(new ELocation({ location: arg })); | ||
return super.push(new args_1.ELocation({ location: arg })); | ||
} | ||
@@ -85,3 +98,3 @@ /** | ||
mac() { | ||
return super.push(new EMac()); | ||
return super.push(new args_1.EMac()); | ||
} | ||
@@ -92,3 +105,3 @@ /** | ||
info() { | ||
return super.push(new EInfo()); | ||
return super.push(new args_1.EInfo()); | ||
} | ||
@@ -99,3 +112,3 @@ /** | ||
model() { | ||
return super.push(new EModel()); | ||
return super.push(new args_1.EModel()); | ||
} | ||
@@ -106,3 +119,3 @@ /** | ||
name() { | ||
return super.push(new EName()); | ||
return super.push(new args_1.EName()); | ||
} | ||
@@ -126,3 +139,3 @@ /** | ||
getPaperTypeQ3() { | ||
return super.push(new EGetPaperTypeQ3()); | ||
return super.push(new getpapertypeq3_1.EGetPaperTypeQ3()); | ||
} | ||
@@ -133,3 +146,3 @@ /** | ||
position() { | ||
return super.push(new EPosition()); | ||
return super.push(new args_1.EPosition()); | ||
} | ||
@@ -140,3 +153,3 @@ /** | ||
printerVersion() { | ||
return super.push(new EPrinterVersion()); | ||
return super.push(new args_1.EPrinterVersion()); | ||
} | ||
@@ -147,3 +160,3 @@ /** | ||
setShutdownTime(arg) { | ||
return super.push(new ESetShutdownTime({ time: arg })); | ||
return super.push(new args_1.ESetShutdownTime({ time: arg })); | ||
} | ||
@@ -154,3 +167,3 @@ /** | ||
sn() { | ||
return super.push(new ESN()); | ||
return super.push(new args_1.ESN()); | ||
} | ||
@@ -161,3 +174,3 @@ /** | ||
state() { | ||
return super.push(new EState()); | ||
return super.push(new args_1.EState()); | ||
} | ||
@@ -168,3 +181,3 @@ /** | ||
stopJob() { | ||
return super.push(new EStopJob()); | ||
return super.push(new args_1.EStopJob()); | ||
} | ||
@@ -176,3 +189,3 @@ /** | ||
thickness(arg) { | ||
return super.push(new EThickness({ thickness: arg })); | ||
return super.push(new args_1.EThickness({ thickness: arg })); | ||
} | ||
@@ -183,3 +196,3 @@ /** | ||
version() { | ||
return super.push(new EVersion()); | ||
return super.push(new args_1.EVersion()); | ||
} | ||
@@ -190,3 +203,3 @@ /** | ||
wakeup() { | ||
return super.push(new EWakeup()); | ||
return super.push(new args_1.EWakeup()); | ||
} | ||
@@ -197,4 +210,5 @@ /** | ||
setBTType() { | ||
return super.push(new EBTType()); | ||
return super.push(new args_1.EBTType()); | ||
} | ||
} | ||
exports.BasicESC = BasicESC; |
@@ -1,6 +0,9 @@ | ||
import { GenericESC } from "./generic"; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ESC = void 0; | ||
const generic_1 = require("./generic"); | ||
/** | ||
* ESC entrypoint | ||
*/ | ||
export class ESC { | ||
class ESC { | ||
/** | ||
@@ -11,4 +14,5 @@ * Generic esc command | ||
static generic(lifecycle) { | ||
return new GenericESC(lifecycle); | ||
return new generic_1.GenericESC(lifecycle); | ||
} | ||
} | ||
exports.ESC = ESC; |
@@ -1,3 +0,6 @@ | ||
import { BasicESC } from "./basic"; | ||
export class GenericESC extends BasicESC { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.GenericESC = void 0; | ||
const basic_1 = require("./basic"); | ||
class GenericESC extends basic_1.BasicESC { | ||
constructor(lifecycle) { | ||
@@ -7,1 +10,2 @@ super(lifecycle); | ||
} | ||
exports.GenericESC = GenericESC; |
@@ -1,2 +0,18 @@ | ||
export * from './generic'; | ||
export * from './esc'; | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./generic"), exports); | ||
__exportStar(require("./esc"), exports); |
@@ -1,2 +0,18 @@ | ||
export * from './impls'; | ||
export * from './args'; | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./impls"), exports); | ||
__exportStar(require("./args"), exports); |
@@ -1,2 +0,5 @@ | ||
export var EImageMode; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EImageMode = void 0; | ||
var EImageMode; | ||
(function (EImageMode) { | ||
@@ -7,2 +10,2 @@ EImageMode[EImageMode["NORMAL"] = 0] = "NORMAL"; | ||
EImageMode[EImageMode["DOUBLE_WIDTH_HEIGHT"] = 3] = "DOUBLE_WIDTH_HEIGHT"; | ||
})(EImageMode || (EImageMode = {})); | ||
})(EImageMode || (exports.EImageMode = EImageMode = {})); |
@@ -1,3 +0,19 @@ | ||
export * from './image'; | ||
export * from './papertype'; | ||
export * from './papertypeq3'; | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./image"), exports); | ||
__exportStar(require("./papertype"), exports); | ||
__exportStar(require("./papertypeq3"), exports); |
@@ -1,2 +0,5 @@ | ||
export var PaperType; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PaperType = void 0; | ||
var PaperType; | ||
(function (PaperType) { | ||
@@ -23,2 +26,2 @@ /** | ||
PaperType[PaperType["TATTOO_PAPER"] = 4] = "TATTOO_PAPER"; | ||
})(PaperType || (PaperType = {})); | ||
})(PaperType || (exports.PaperType = PaperType = {})); |
@@ -1,2 +0,5 @@ | ||
export var PaperTypeQ3; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PaperTypeQ3 = void 0; | ||
var PaperTypeQ3; | ||
(function (PaperTypeQ3) { | ||
@@ -15,2 +18,2 @@ /** | ||
PaperTypeQ3[PaperTypeQ3["CONTINUOUS_REEL_PAPER"] = 2] = "CONTINUOUS_REEL_PAPER"; | ||
})(PaperTypeQ3 || (PaperTypeQ3 = {})); | ||
})(PaperTypeQ3 || (exports.PaperTypeQ3 = PaperTypeQ3 = {})); |
{ | ||
"name": "@psdk/esc", | ||
"version": "0.3.4", | ||
"version": "0.4.0", | ||
"description": "psdk", | ||
@@ -18,15 +18,13 @@ "main": "build/index.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.24.5", | ||
"@babel/preset-env": "^7.24.5", | ||
"@babel/preset-typescript": "^7.24.1", | ||
"@types/jest": "^29.5.12", | ||
"@vercel/ncc": "^0.38.1", | ||
"babel-jest": "^29.7.0", | ||
"jest": "^29.7.0", | ||
"typedoc": "^0.25.13", | ||
"typescript": "^5.4.5" | ||
"ts-jest": "^29.1.5", | ||
"ts-node": "^10.9.2", | ||
"typedoc": "^0.26.4", | ||
"typescript": "^5.5.3" | ||
}, | ||
"dependencies": { | ||
"@psdk/frame-father": "0.3.4", | ||
"@psdk/frame-imageb": "0.3.4" | ||
"@psdk/frame-father": "0.4.0", | ||
"@psdk/frame-imageb": "0.4.0" | ||
}, | ||
@@ -37,3 +35,3 @@ "files": [ | ||
], | ||
"gitHead": "b8c2fdcb52f1bd3e9d75d004d37d717bd465b4c9" | ||
"gitHead": "13fa8cc6aacbf8f6bacb5f485da11a7610001f61" | ||
} |
50051
7
1237
+ Added@psdk/frame-father@0.4.0(transitive)
+ Added@psdk/frame-imageb@0.4.0(transitive)
- Removed@psdk/frame-father@0.3.4(transitive)
- Removed@psdk/frame-imageb@0.3.4(transitive)
Updated@psdk/frame-father@0.4.0
Updated@psdk/frame-imageb@0.4.0