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.54 to 0.2.55

build/types/font.d.ts

6

build/args/bar.d.ts
import { CommandClause } from "@psdk/frame-father";
import { BasicCPCLArg } from "./basic";
import { CodeRotation, CodeType } from "../types";
import { CCodeRotation, CCodeType } from "../types";
export declare class CBar extends BasicCPCLArg<CBar> {

@@ -36,7 +36,7 @@ private x;

*/
codeType?: CodeType;
codeType?: CCodeType;
/**
* 旋转
*/
codeRotation?: CodeRotation;
codeRotation?: CCodeRotation;
});

@@ -43,0 +43,0 @@ clause(): CommandClause;

@@ -16,4 +16,4 @@ "use strict";

this.height = (_e = options === null || options === void 0 ? void 0 : options.height) !== null && _e !== void 0 ? _e : 0;
this.codeType = (_f = options === null || options === void 0 ? void 0 : options.codeType) !== null && _f !== void 0 ? _f : types_1.CodeType.CODE128;
this.codeRotation = (_g = options.codeRotation) !== null && _g !== void 0 ? _g : types_1.CodeRotation.ROTATION_0;
this.codeType = (_f = options === null || options === void 0 ? void 0 : options.codeType) !== null && _f !== void 0 ? _f : types_1.CCodeType.CODE128;
this.codeRotation = (_g = options.codeRotation) !== null && _g !== void 0 ? _g : types_1.CCodeRotation.ROTATION_0;
}

@@ -23,27 +23,27 @@ clause() {

switch (this.codeType) {
case types_1.CodeType.CODE39:
case types_1.CCodeType.CODE39:
code = new CodeTypeEntity('39', '2');
break;
case types_1.CodeType.CODE128:
case types_1.CCodeType.CODE128:
code = new CodeTypeEntity('128', '2');
break;
case types_1.CodeType.CODE93:
case types_1.CCodeType.CODE93:
code = new CodeTypeEntity('93', '1');
break;
case types_1.CodeType.CODABAR:
case types_1.CCodeType.CODABAR:
code = new CodeTypeEntity('CODABAR', '2');
break;
case types_1.CodeType.EAN8:
case types_1.CCodeType.EAN8:
code = new CodeTypeEntity('EAN8', '2');
break;
case types_1.CodeType.EAN13:
case types_1.CCodeType.EAN13:
code = new CodeTypeEntity('EAN13', '2');
break;
case types_1.CodeType.UPCA:
case types_1.CCodeType.UPCA:
code = new CodeTypeEntity('UPCA', '2');
break;
case types_1.CodeType.UPCE:
case types_1.CCodeType.UPCE:
code = new CodeTypeEntity('UPCE', '2');
break;
case types_1.CodeType.I2OF5:
case types_1.CCodeType.I2OF5:
code = new CodeTypeEntity('I2OF5', '2');

@@ -50,0 +50,0 @@ break;

@@ -10,3 +10,3 @@ "use strict";

const print_1 = require("./print");
const mode_1 = require("../types/mode");
const types_1 = require("../types");
class CFeed extends basic_1.BasicCPCLArg {

@@ -17,3 +17,3 @@ clause() {

.append(new form_1.CForm())
.append(new print_1.CPrint({ mode: mode_1.Mode.NORMAL }));
.append(new print_1.CPrint({ mode: types_1.CMode.NORMAL }));
return frame_father_1.CPCLCommand.with(this.header()).clause();

@@ -20,0 +20,0 @@ }

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

@@ -30,3 +30,3 @@ private x;

*/
font?: Font;
font?: CFont;
});

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

@@ -15,3 +15,3 @@ "use strict";

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.Font.TSS16;
this.font = (_e = options === null || options === void 0 ? void 0 : options.font) !== null && _e !== void 0 ? _e : types_1.CFont.TSS16;
}

@@ -21,27 +21,27 @@ clause() {

switch (this.font) {
case types_1.Font.TSS16:
case types_1.CFont.TSS16:
fontEntity = new FontEntity(1, 1, 55, 0, 16);
break;
case types_1.Font.TSS20:
case types_1.CFont.TSS20:
fontEntity = new FontEntity(1, 1, 6, 1, 20);
break;
case types_1.Font.TSS24:
case types_1.CFont.TSS24:
fontEntity = new FontEntity(1, 1, 24, 0, 24);
break;
case types_1.Font.TSS32:
case types_1.CFont.TSS32:
fontEntity = new FontEntity(1, 1, 4, 0, 32);
break;
case types_1.Font.TSS24_MAX1:
case types_1.CFont.TSS24_MAX1:
fontEntity = new FontEntity(2, 2, 24, 0, 48);
break;
case types_1.Font.TSS24_MAX2:
case types_1.CFont.TSS24_MAX2:
fontEntity = new FontEntity(3, 3, 24, 0, 72);
break;
case types_1.Font.TSS28_MAX1:
case types_1.CFont.TSS28_MAX1:
fontEntity = new FontEntity(1, 1, 7, 3, 56);
break;
case types_1.Font.TSS32_MAX1:
case types_1.CFont.TSS32_MAX1:
fontEntity = new FontEntity(2, 2, 4, 0, 64);
break;
case types_1.Font.TSS32_MAX2:
case types_1.CFont.TSS32_MAX2:
fontEntity = new FontEntity(3, 3, 4, 0, 96);

@@ -48,0 +48,0 @@ break;

import { CommandClause } from "@psdk/frame-father";
import { BasicCPCLArg } from "./basic";
import { Font } from "../types";
import { CFont } from "../types";
export declare class CMag extends BasicCPCLArg<CMag> {

@@ -10,3 +10,3 @@ private font;

*/
font?: Font;
font?: CFont;
});

@@ -13,0 +13,0 @@ clause(): CommandClause;

@@ -11,3 +11,3 @@ "use strict";

super();
this.font = (_a = options === null || options === void 0 ? void 0 : options.font) !== null && _a !== void 0 ? _a : types_1.Font.TSS16;
this.font = (_a = options === null || options === void 0 ? void 0 : options.font) !== null && _a !== void 0 ? _a : types_1.CFont.TSS16;
}

@@ -17,27 +17,27 @@ clause() {

switch (this.font) {
case types_1.Font.TSS16:
case types_1.CFont.TSS16:
fontEntity = new FontEntity(1, 1, 55, 0, 16);
break;
case types_1.Font.TSS20:
case types_1.CFont.TSS20:
fontEntity = new FontEntity(1, 1, 6, 1, 20);
break;
case types_1.Font.TSS24:
case types_1.CFont.TSS24:
fontEntity = new FontEntity(1, 1, 24, 0, 24);
break;
case types_1.Font.TSS32:
case types_1.CFont.TSS32:
fontEntity = new FontEntity(1, 1, 4, 0, 32);
break;
case types_1.Font.TSS24_MAX1:
case types_1.CFont.TSS24_MAX1:
fontEntity = new FontEntity(2, 2, 24, 0, 48);
break;
case types_1.Font.TSS24_MAX2:
case types_1.CFont.TSS24_MAX2:
fontEntity = new FontEntity(3, 3, 24, 0, 72);
break;
case types_1.Font.TSS28_MAX1:
case types_1.CFont.TSS28_MAX1:
fontEntity = new FontEntity(1, 1, 7, 3, 56);
break;
case types_1.Font.TSS32_MAX1:
case types_1.CFont.TSS32_MAX1:
fontEntity = new FontEntity(2, 2, 4, 0, 64);
break;
case types_1.Font.TSS32_MAX2:
case types_1.CFont.TSS32_MAX2:
fontEntity = new FontEntity(3, 3, 4, 0, 96);

@@ -44,0 +44,0 @@ break;

import { CommandClause } from "@psdk/frame-father";
import { BasicCPCLArg } from "./basic";
import { CLocation } from "../types/location";
import { CLocation } from "../types";
export declare class CPageMode extends BasicCPCLArg<CPageMode> {

@@ -5,0 +5,0 @@ private location;

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

const basic_1 = require("./basic");
const location_1 = require("../types/location");
const types_1 = require("../types");
const gap_1 = require("./gap");

@@ -14,3 +14,3 @@ const form_1 = require("./form");

super();
this.location = (_a = options === null || options === void 0 ? void 0 : options.location) !== null && _a !== void 0 ? _a : location_1.CLocation.NO_LOCATION;
this.location = (_a = options === null || options === void 0 ? void 0 : options.location) !== null && _a !== void 0 ? _a : types_1.CLocation.NO_LOCATION;
}

@@ -17,0 +17,0 @@ clause() {

import { OnlyTextHeaderArg } from "@psdk/frame-father";
import { Mode } from "../types/mode";
import { CMode } from "../types";
export declare class CPrint extends OnlyTextHeaderArg<CPrint> {
private readonly mode;
constructor(options?: {
mode?: Mode;
mode?: CMode;
});

@@ -8,0 +8,0 @@ header(): string;

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

const frame_father_1 = require("@psdk/frame-father");
const mode_1 = require("../types/mode");
const types_1 = require("../types");
class CPrint extends frame_father_1.OnlyTextHeaderArg {

@@ -11,8 +11,8 @@ constructor(options) {

super();
this.mode = (_a = options === null || options === void 0 ? void 0 : options.mode) !== null && _a !== void 0 ? _a : mode_1.Mode.NORMAL;
this.mode = (_a = options === null || options === void 0 ? void 0 : options.mode) !== null && _a !== void 0 ? _a : types_1.CMode.NORMAL;
}
header() {
return this.mode == mode_1.Mode.HORIZONTAL ? "POPRINT" : "PRINT";
return this.mode == types_1.CMode.HORIZONTAL ? "POPRINT" : "PRINT";
}
}
exports.CPrint = CPrint;
import { CommandClause } from "@psdk/frame-father";
import { BasicCPCLArg } from "./basic";
import { CodeRotation, CorrectLevel } from "../types";
import { CCodeRotation, CCorrectLevel } from "../types";
export declare class CQRCode extends BasicCPCLArg<CQRCode> {

@@ -28,3 +28,3 @@ private x;

*/
codeRotation?: CodeRotation;
codeRotation?: CCodeRotation;
/**

@@ -37,3 +37,3 @@ * 二维码小黑点宽度(2-20)

*/
level?: CorrectLevel;
level?: CCorrectLevel;
/**

@@ -40,0 +40,0 @@ * 编码

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

this.content = (_c = options.content) !== null && _c !== void 0 ? _c : '';
this.codeRotation = (_d = options.codeRotation) !== null && _d !== void 0 ? _d : types_1.CodeRotation.ROTATION_0;
this.codeRotation = (_d = options.codeRotation) !== null && _d !== void 0 ? _d : types_1.CCodeRotation.ROTATION_0;
this.width = (_e = options.width) !== null && _e !== void 0 ? _e : 0;
this.level = (_f = options.level) !== null && _f !== void 0 ? _f : types_1.CorrectLevel.H;
this.level = (_f = options.level) !== null && _f !== void 0 ? _f : types_1.CCorrectLevel.H;
this.charset = (_g = options.charset) !== null && _g !== void 0 ? _g : 'gbk';

@@ -19,0 +19,0 @@ }

import { CommandClause } from "@psdk/frame-father";
import { BasicCPCLArg } from "./basic";
import { Font, Rotation } from "../types";
import { CFont, CRotation } from "../types";
export declare class CText extends BasicCPCLArg<CText> {

@@ -27,7 +27,7 @@ private x;

*/
font?: Font;
font?: CFont;
/**
* 旋转
*/
rotation?: Rotation;
rotation?: CRotation;
/**

@@ -34,0 +34,0 @@ * 编码

@@ -14,4 +14,4 @@ "use strict";

this.content = (_c = options === null || options === void 0 ? void 0 : options.content) !== null && _c !== void 0 ? _c : '';
this.font = (_d = options === null || options === void 0 ? void 0 : options.font) !== null && _d !== void 0 ? _d : types_1.Font.TSS16;
this.rotation = (_e = options === null || options === void 0 ? void 0 : options.rotation) !== null && _e !== void 0 ? _e : types_1.Rotation.ROTATION_0;
this.font = (_d = options === null || options === void 0 ? void 0 : options.font) !== null && _d !== void 0 ? _d : types_1.CFont.TSS16;
this.rotation = (_e = options === null || options === void 0 ? void 0 : options.rotation) !== null && _e !== void 0 ? _e : types_1.CRotation.ROTATION_0;
this.charset = (_f = options === null || options === void 0 ? void 0 : options.charset) !== null && _f !== void 0 ? _f : 'gbk';

@@ -22,27 +22,27 @@ }

switch (this.font) {
case types_1.Font.TSS16:
case types_1.CFont.TSS16:
fontEntity = new FontEntity(1, 1, 55, 0, 16);
break;
case types_1.Font.TSS20:
case types_1.CFont.TSS20:
fontEntity = new FontEntity(1, 1, 6, 1, 20);
break;
case types_1.Font.TSS24:
case types_1.CFont.TSS24:
fontEntity = new FontEntity(1, 1, 24, 0, 24);
break;
case types_1.Font.TSS32:
case types_1.CFont.TSS32:
fontEntity = new FontEntity(1, 1, 4, 0, 32);
break;
case types_1.Font.TSS24_MAX1:
case types_1.CFont.TSS24_MAX1:
fontEntity = new FontEntity(2, 2, 24, 0, 48);
break;
case types_1.Font.TSS24_MAX2:
case types_1.CFont.TSS24_MAX2:
fontEntity = new FontEntity(3, 3, 24, 0, 72);
break;
case types_1.Font.TSS28_MAX1:
case types_1.CFont.TSS28_MAX1:
fontEntity = new FontEntity(1, 1, 7, 3, 56);
break;
case types_1.Font.TSS32_MAX1:
case types_1.CFont.TSS32_MAX1:
fontEntity = new FontEntity(2, 2, 4, 0, 64);
break;
case types_1.Font.TSS32_MAX2:
case types_1.CFont.TSS32_MAX2:
fontEntity = new FontEntity(3, 3, 4, 0, 96);

@@ -49,0 +49,0 @@ break;

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

const args_1 = require("../args");
const mode_1 = require("../types/mode");
const types_1 = require("../types");
class BasicCPCL extends frame_father_1.PSDK {

@@ -54,23 +54,23 @@ constructor(lifecycle) {

print(arg) {
return this.push(arg !== null && arg !== void 0 ? arg : new args_1.CPrint({ mode: mode_1.Mode.NORMAL }));
return super.push(arg !== null && arg !== void 0 ? arg : new args_1.CPrint({ mode: types_1.CMode.NORMAL }));
}
qrcode(arg) {
return this.push(arg);
return super.push(arg);
}
text(arg) {
return this.push(arg);
return super.push(arg);
}
underline(arg) {
return this.push(arg);
return super.push(arg);
}
waterMark(arg) {
return this.push(arg);
return super.push(arg);
}
status(arg) {
return this.push(arg);
return super.push(arg);
}
sn(arg) {
return this.push(arg);
return super.push(arg);
}
}
exports.BasicCPCL = BasicCPCL;

@@ -1,2 +0,2 @@

export declare enum CodeRotation {
export declare enum CCodeRotation {
/**

@@ -3,0 +3,0 @@ * 旋转0度

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CodeRotation = void 0;
var CodeRotation;
(function (CodeRotation) {
exports.CCodeRotation = void 0;
var CCodeRotation;
(function (CCodeRotation) {
/**
* 旋转0度
*/
CodeRotation["ROTATION_0"] = "B";
CCodeRotation["ROTATION_0"] = "B";
/**
* 旋转90度
*/
CodeRotation["ROTATION_90"] = "VB";
})(CodeRotation = exports.CodeRotation || (exports.CodeRotation = {}));
CCodeRotation["ROTATION_90"] = "VB";
})(CCodeRotation = exports.CCodeRotation || (exports.CCodeRotation = {}));
/**
* CodeType
*/
export declare enum CodeType {
export declare enum CCodeType {
/**

@@ -6,0 +6,0 @@ * CODE39

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CodeType = void 0;
exports.CCodeType = void 0;
/**
* CodeType
*/
var CodeType;
(function (CodeType) {
var CCodeType;
(function (CCodeType) {
/**
* CODE39
*/
CodeType[CodeType["CODE39"] = 0] = "CODE39";
CCodeType[CCodeType["CODE39"] = 0] = "CODE39";
/**
* CODE128
*/
CodeType[CodeType["CODE128"] = 1] = "CODE128";
CCodeType[CCodeType["CODE128"] = 1] = "CODE128";
/**
* CODE93
*/
CodeType[CodeType["CODE93"] = 2] = "CODE93";
CCodeType[CCodeType["CODE93"] = 2] = "CODE93";
/**
* CODABAR
*/
CodeType[CodeType["CODABAR"] = 3] = "CODABAR";
CCodeType[CCodeType["CODABAR"] = 3] = "CODABAR";
/**
* EAN8
*/
CodeType[CodeType["EAN8"] = 4] = "EAN8";
CCodeType[CCodeType["EAN8"] = 4] = "EAN8";
/**
* EAN13
*/
CodeType[CodeType["EAN13"] = 5] = "EAN13";
CCodeType[CCodeType["EAN13"] = 5] = "EAN13";
/**
* UPCA
*/
CodeType[CodeType["UPCA"] = 6] = "UPCA";
CCodeType[CCodeType["UPCA"] = 6] = "UPCA";
/**
* UPCE
*/
CodeType[CodeType["UPCE"] = 7] = "UPCE";
CCodeType[CCodeType["UPCE"] = 7] = "UPCE";
/**
* I2OF5
*/
CodeType[CodeType["I2OF5"] = 8] = "I2OF5";
})(CodeType = exports.CodeType || (exports.CodeType = {}));
CCodeType[CCodeType["I2OF5"] = 8] = "I2OF5";
})(CCodeType = exports.CCodeType || (exports.CCodeType = {}));

@@ -1,2 +0,2 @@

export declare enum CorrectLevel {
export declare enum CCorrectLevel {
/**

@@ -3,0 +3,0 @@ * 纠错等级:L

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CorrectLevel = void 0;
var CorrectLevel;
(function (CorrectLevel) {
exports.CCorrectLevel = void 0;
var CCorrectLevel;
(function (CCorrectLevel) {
/**
* 纠错等级:L
*/
CorrectLevel["L"] = "L";
CCorrectLevel["L"] = "L";
/**
* 纠错等级:M
*/
CorrectLevel["M"] = "M";
CCorrectLevel["M"] = "M";
/**
* 纠错等级:Q
*/
CorrectLevel["Q"] = "Q";
CCorrectLevel["Q"] = "Q";
/**
* 纠错等级:H
*/
CorrectLevel["H"] = "H";
})(CorrectLevel = exports.CorrectLevel || (exports.CorrectLevel = {}));
CCorrectLevel["H"] = "H";
})(CCorrectLevel = exports.CCorrectLevel || (exports.CCorrectLevel = {}));

@@ -1,6 +0,8 @@

export * from './text';
export * from './coderotation';
export * from './codetype';
export * from './correctlevel';
export * from './font';
export * from './location';
export * from './mode';
export * from './rotation';
//# sourceMappingURL=index.d.ts.map

@@ -17,6 +17,8 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./text"), exports);
__exportStar(require("./coderotation"), exports);
__exportStar(require("./codetype"), exports);
__exportStar(require("./correctlevel"), exports);
__exportStar(require("./font"), exports);
__exportStar(require("./location"), exports);
__exportStar(require("./mode"), exports);
__exportStar(require("./rotation"), exports);

@@ -1,2 +0,2 @@

export declare enum Mode {
export declare enum CMode {
/**

@@ -3,0 +3,0 @@ * 正常打印,不旋转

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Mode = void 0;
var Mode;
(function (Mode) {
exports.CMode = void 0;
var CMode;
(function (CMode) {
/**
* 正常打印,不旋转
*/
Mode[Mode["NORMAL"] = 0] = "NORMAL";
CMode[CMode["NORMAL"] = 0] = "NORMAL";
/**
* 整个页面顺时针旋转180°后,再打印
*/
Mode[Mode["HORIZONTAL"] = 1] = "HORIZONTAL";
})(Mode = exports.Mode || (exports.Mode = {}));
CMode[CMode["HORIZONTAL"] = 1] = "HORIZONTAL";
})(CMode = exports.CMode || (exports.CMode = {}));

@@ -1,2 +0,2 @@

export declare enum Rotation {
export declare enum CRotation {
/**

@@ -3,0 +3,0 @@ * 旋转0度

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Rotation = void 0;
var Rotation;
(function (Rotation) {
exports.CRotation = void 0;
var CRotation;
(function (CRotation) {
/**
* 旋转0度
*/
Rotation["ROTATION_0"] = "";
CRotation["ROTATION_0"] = "";
/**
* 旋转90度
*/
Rotation["ROTATION_90"] = "90";
CRotation["ROTATION_90"] = "90";
/**
* 旋转180度
*/
Rotation["ROTATION_180"] = "180";
CRotation["ROTATION_180"] = "180";
/**
* 旋转270度
*/
Rotation["ROTATION_270"] = "270";
})(Rotation = exports.Rotation || (exports.Rotation = {}));
CRotation["ROTATION_270"] = "270";
})(CRotation = exports.CRotation || (exports.CRotation = {}));
{
"name": "@psdk/cpcl",
"version": "0.2.54",
"version": "0.2.55",
"description": "psdk",

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

"dependencies": {
"@psdk/frame-father": "0.2.54",
"@psdk/frame-imageb": "0.2.54"
"@psdk/frame-father": "0.2.55",
"@psdk/frame-imageb": "0.2.55"
},

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

],
"gitHead": "62cb14655c164faa513796fc2311e210b64d9326"
"gitHead": "7c6391f1508dfee01d447694aef4200d3741414f"
}

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

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

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

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