Socket
Socket
Sign inDemoInstall

@psdk/cpcl

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@psdk/cpcl - npm Package Compare versions

Comparing version 0.2.56 to 0.2.57

14

build/args/inverse.d.ts
import { CommandClause } from "@psdk/frame-father";
import { BasicCPCLArg } from "./basic";
import { CFont } from "../types";
export declare class CInverse extends BasicCPCLArg<CInverse> {

@@ -9,24 +8,19 @@ private x;

private height;
private font;
constructor(options?: {
/**
* 边框线条宽度
* 反色区域起始X坐标
*/
x?: number;
/**
* 矩形框左上角x坐标
* 反色区域起始Y坐标
*/
y?: number;
/**
* 矩形框左上角y坐标
* 反色区域宽
*/
width?: number;
/**
* 矩形框右下角x坐标
* 反色区域高
*/
height?: number;
/**
* 字体
*/
font?: CFont;
});

@@ -33,0 +27,0 @@ clause(): CommandClause;

@@ -6,6 +6,5 @@ "use strict";

const basic_1 = require("./basic");
const types_1 = require("../types");
class CInverse extends basic_1.BasicCPCLArg {
constructor(options) {
var _a, _b, _c, _d, _e;
var _a, _b, _c, _d;
super();

@@ -16,35 +15,4 @@ this.x = (_a = options === null || options === void 0 ? void 0 : options.x) !== null && _a !== void 0 ? _a : 0;

this.height = (_d = options === null || options === void 0 ? void 0 : options.height) !== null && _d !== void 0 ? _d : 0;
this.font = (_e = options === null || options === void 0 ? void 0 : options.font) !== null && _e !== void 0 ? _e : types_1.CFont.TSS16;
}
clause() {
let fontEntity;
switch (this.font) {
case types_1.CFont.TSS16:
fontEntity = new FontEntity(1, 1, 55, 0, 16);
break;
case types_1.CFont.TSS20:
fontEntity = new FontEntity(1, 1, 6, 1, 20);
break;
case types_1.CFont.TSS24:
fontEntity = new FontEntity(1, 1, 24, 0, 24);
break;
case types_1.CFont.TSS32:
fontEntity = new FontEntity(1, 1, 4, 0, 32);
break;
case types_1.CFont.TSS24_MAX1:
fontEntity = new FontEntity(2, 2, 24, 0, 48);
break;
case types_1.CFont.TSS24_MAX2:
fontEntity = new FontEntity(3, 3, 24, 0, 72);
break;
case types_1.CFont.TSS28_MAX1:
fontEntity = new FontEntity(1, 1, 7, 3, 56);
break;
case types_1.CFont.TSS32_MAX1:
fontEntity = new FontEntity(2, 2, 4, 0, 64);
break;
case types_1.CFont.TSS32_MAX2:
fontEntity = new FontEntity(3, 3, 4, 0, 96);
break;
}
return frame_father_1.CPCLCommand.with(this.header())

@@ -54,3 +22,3 @@ .appendNumber(this.x)

.appendNumber(this.x + this.width)
.appendNumber(this.y + fontEntity.height)
.appendNumber(this.y)
.appendNumber(this.height)

@@ -64,10 +32,1 @@ .clause();

exports.CInverse = CInverse;
class FontEntity {
constructor(ex, ey, family, size, height) {
this.ex = ex;
this.ey = ey;
this.family = family;
this.size = size;
this.height = height;
}
}

@@ -25,4 +25,7 @@ "use strict";

case types_1.CFont.TSS20:
fontEntity = new FontEntity(1, 1, 6, 1, 20);
fontEntity = new FontEntity(1, 1, 6, 0, 20);
break;
case types_1.CFont.TSS20_MAX1:
fontEntity = new FontEntity(1, 1, 6, 0, 40);
break;
case types_1.CFont.TSS24:

@@ -59,3 +62,3 @@ fontEntity = new FontEntity(1, 1, 24, 0, 24);

header() {
return 'TEXT';
return 'T' + this.rotation;
}

@@ -62,0 +65,0 @@ }

import { Commander, ConnectedDevice, Lifecycle, PSDK } from '@psdk/frame-father';
import { CBar, CBox, CBold, CFeed, CForm, CImage, CInverse, CLine, CMag, CPageMode, CPage, CPrint, CQRCode, CText, CUnderLine, CWaterMark, CStatus, CSN } from "../args";
import { CBar, CBox, CFeed, CForm, CImage, CInverse, CLine, CMag, CPageMode, CPage, CPrint, CQRCode, CText, CWaterMark, CStatus, CSN } from "../args";
export declare abstract class BasicCPCL<T extends BasicCPCL<any>> extends PSDK<T> {

@@ -17,21 +17,76 @@ /**

commander(): Commander;
/**
* 一维码
*/
bar(arg: CBar): T;
/**
* 画矩形边框
*/
box(arg: CBox): T;
bold(arg: CBold): T;
/**
* 加粗
* @param bold true 加粗 false 不加粗
*/
bold(bold: boolean): T;
/**
* 定位到标签(print指令之前调用)
*/
feed(arg: CFeed): T;
/**
* 定位到标签(可以放在print指令之后调用)
*/
form(arg: CForm): T;
/**
* 打印图片
*/
image(arg: CImage): T;
/**
* 文字反白
*/
inverse(arg: CInverse): T;
/**
* 画线(能画斜线)
*/
line(arg: CLine): T;
mag(arg: CMag): T;
/**
* 打印模式(是否定位)
*/
pageMode(arg: CPageMode): T;
/**
* 创建打印页面大小
*/
page(arg: CPage): T;
/**
* 打印
*/
print(arg?: CPrint): T;
/**
* 打印二维码
*/
qrcode(arg: CQRCode): T;
/**
* 打印文本
*/
text(arg: CText): T;
underline(arg: CUnderLine): T;
/**
* 下划线
*
* @param underline true 画下划线 false 不画下划线
*/
underline(underline: boolean): T;
/**
* 水印
* @param arg
*/
waterMark(arg: CWaterMark): T;
/**
* 查询打印机状态
*/
status(arg: CStatus): T;
/**
* 查询打印机SN
*/
sn(arg: CSN): T;
}
//# sourceMappingURL=basic.d.ts.map

@@ -19,23 +19,48 @@ "use strict";

}
/**
* 一维码
*/
bar(arg) {
return super.push(arg);
}
/**
* 画矩形边框
*/
box(arg) {
return super.push(arg);
}
bold(arg) {
return super.push(arg);
/**
* 加粗
* @param bold true 加粗 false 不加粗
*/
bold(bold) {
return super.push(new args_1.CBold({ bold: bold }));
}
/**
* 定位到标签(print指令之前调用)
*/
feed(arg) {
return super.push(arg);
}
/**
* 定位到标签(可以放在print指令之后调用)
*/
form(arg) {
return super.push(arg);
}
/**
* 打印图片
*/
image(arg) {
return super.push(arg);
}
/**
* 文字反白
*/
inverse(arg) {
return super.push(arg);
}
/**
* 画线(能画斜线)
*/
line(arg) {

@@ -47,26 +72,56 @@ return super.push(arg);

}
/**
* 打印模式(是否定位)
*/
pageMode(arg) {
return super.push(arg);
}
/**
* 创建打印页面大小
*/
page(arg) {
return super.push(arg);
}
/**
* 打印
*/
print(arg) {
return super.push(arg !== null && arg !== void 0 ? arg : new args_1.CPrint({ mode: types_1.CMode.NORMAL }));
}
/**
* 打印二维码
*/
qrcode(arg) {
return super.push(arg);
}
/**
* 打印文本
*/
text(arg) {
return super.push(arg);
}
underline(arg) {
return super.push(arg);
/**
* 下划线
*
* @param underline true 画下划线 false 不画下划线
*/
underline(underline) {
return super.push(new args_1.CUnderLine({ underline: underline }));
}
/**
* 水印
* @param arg
*/
waterMark(arg) {
return super.push(arg);
}
/**
* 查询打印机状态
*/
status(arg) {
return super.push(arg);
}
/**
* 查询打印机SN
*/
sn(arg) {

@@ -73,0 +128,0 @@ return super.push(arg);

@@ -14,30 +14,34 @@ /**

/**
* 20点阵放大一倍
*/
TSS20_MAX1 = 2,
/**
* 24点阵
*/
TSS24 = 2,
TSS24 = 3,
/**
* 32点阵
*/
TSS32 = 3,
TSS32 = 4,
/**
* 24点阵放大一倍
*/
TSS24_MAX1 = 4,
TSS24_MAX1 = 5,
/**
* 32点阵放大一倍
*/
TSS32_MAX1 = 5,
TSS32_MAX1 = 6,
/**
* 24点阵放大两倍
*/
TSS24_MAX2 = 6,
TSS24_MAX2 = 7,
/**
* 32点阵放大两倍
*/
TSS32_MAX2 = 7,
TSS32_MAX2 = 8,
/**
* 28点阵放大一倍
*/
TSS28_MAX1 = 8
TSS28_MAX1 = 9
}
//# sourceMappingURL=font.d.ts.map

@@ -18,29 +18,33 @@ "use strict";

/**
* 20点阵放大一倍
*/
CFont[CFont["TSS20_MAX1"] = 2] = "TSS20_MAX1";
/**
* 24点阵
*/
CFont[CFont["TSS24"] = 2] = "TSS24";
CFont[CFont["TSS24"] = 3] = "TSS24";
/**
* 32点阵
*/
CFont[CFont["TSS32"] = 3] = "TSS32";
CFont[CFont["TSS32"] = 4] = "TSS32";
/**
* 24点阵放大一倍
*/
CFont[CFont["TSS24_MAX1"] = 4] = "TSS24_MAX1";
CFont[CFont["TSS24_MAX1"] = 5] = "TSS24_MAX1";
/**
* 32点阵放大一倍
*/
CFont[CFont["TSS32_MAX1"] = 5] = "TSS32_MAX1";
CFont[CFont["TSS32_MAX1"] = 6] = "TSS32_MAX1";
/**
* 24点阵放大两倍
*/
CFont[CFont["TSS24_MAX2"] = 6] = "TSS24_MAX2";
CFont[CFont["TSS24_MAX2"] = 7] = "TSS24_MAX2";
/**
* 32点阵放大两倍
*/
CFont[CFont["TSS32_MAX2"] = 7] = "TSS32_MAX2";
CFont[CFont["TSS32_MAX2"] = 8] = "TSS32_MAX2";
/**
* 28点阵放大一倍
*/
CFont[CFont["TSS28_MAX1"] = 8] = "TSS28_MAX1";
CFont[CFont["TSS28_MAX1"] = 9] = "TSS28_MAX1";
})(CFont = exports.CFont || (exports.CFont = {}));
{
"name": "@psdk/cpcl",
"version": "0.2.56",
"version": "0.2.57",
"description": "psdk",

@@ -48,4 +48,4 @@ "main": "build/index.js",

"dependencies": {
"@psdk/frame-father": "0.2.56",
"@psdk/frame-imageb": "0.2.56"
"@psdk/frame-father": "0.2.57",
"@psdk/frame-imageb": "0.2.57"
},

@@ -56,3 +56,3 @@ "files": [

],
"gitHead": "d9f7956fc95c14f3986caa8209f496326ecdd8b5"
"gitHead": "9f9f4a756c4cddbfd4a81300ea7fd66a4c28b0fb"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc