label-printer 0.3.0 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/dist/index.d.mts +80 -47
- package/dist/index.d.ts +80 -47
- package/dist/index.js +580 -55
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +583 -44
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -48,4 +48,10 @@ This layer contains code to interact with printers
|
|
|
48
48
|
|
|
49
49
|
- If a font is not working, make sure the extension is TTF
|
|
50
50
|
- If you want to use bold fonts, make sure you have one for weight 700
|
|
51
|
-
- Regular font weight is 400
|
|
51
|
+
- Regular font weight is 400
|
|
52
|
+
|
|
53
|
+
# Update package
|
|
54
|
+
|
|
55
|
+
- Run `pnpm changeset` to create change
|
|
56
|
+
- Run `pnpm changeset version` to create an update with all the versions
|
|
57
|
+
- PR is automatically created on push, merge it to trigger publish
|
package/dist/index.d.mts
CHANGED
|
@@ -441,52 +441,52 @@ declare class TSPLCommandGenerator implements CommandGenerator<TSPLCommand> {
|
|
|
441
441
|
}
|
|
442
442
|
declare const _default: TSPLCommandGenerator;
|
|
443
443
|
|
|
444
|
-
type
|
|
445
|
-
type
|
|
446
|
-
type
|
|
447
|
-
type
|
|
448
|
-
type
|
|
449
|
-
type
|
|
450
|
-
type
|
|
451
|
-
type
|
|
452
|
-
type
|
|
453
|
-
type
|
|
454
|
-
declare const
|
|
455
|
-
type
|
|
456
|
-
declare const
|
|
457
|
-
type
|
|
458
|
-
declare const
|
|
459
|
-
type
|
|
460
|
-
declare const
|
|
461
|
-
type
|
|
462
|
-
declare const
|
|
463
|
-
type
|
|
464
|
-
declare const
|
|
465
|
-
type
|
|
466
|
-
declare const
|
|
467
|
-
type
|
|
468
|
-
declare const
|
|
469
|
-
type
|
|
470
|
-
declare const
|
|
471
|
-
type
|
|
472
|
-
declare const
|
|
473
|
-
type
|
|
474
|
-
declare const
|
|
475
|
-
type
|
|
476
|
-
declare const
|
|
477
|
-
type
|
|
478
|
-
declare const
|
|
479
|
-
type
|
|
480
|
-
declare const
|
|
481
|
-
type
|
|
482
|
-
declare const
|
|
483
|
-
type
|
|
484
|
-
declare const
|
|
485
|
-
type
|
|
486
|
-
declare const
|
|
487
|
-
declare const
|
|
488
|
-
declare namespace index {
|
|
489
|
-
export { type
|
|
444
|
+
type index$3_Alignment = Alignment;
|
|
445
|
+
type index$3_AutoManual = AutoManual;
|
|
446
|
+
type index$3_BarcodeHumanReable = BarcodeHumanReable;
|
|
447
|
+
type index$3_BarcodeType = BarcodeType;
|
|
448
|
+
type index$3_ECCLevel = ECCLevel;
|
|
449
|
+
type index$3_GraphicMode = GraphicMode;
|
|
450
|
+
type index$3_LabelDirection = LabelDirection;
|
|
451
|
+
type index$3_QRModel = QRModel;
|
|
452
|
+
type index$3_Rotation = Rotation;
|
|
453
|
+
type index$3_TSPLBarCommand = TSPLBarCommand;
|
|
454
|
+
declare const index$3_TSPLBarCommand: typeof TSPLBarCommand;
|
|
455
|
+
type index$3_TSPLBitmapCommand = TSPLBitmapCommand;
|
|
456
|
+
declare const index$3_TSPLBitmapCommand: typeof TSPLBitmapCommand;
|
|
457
|
+
type index$3_TSPLBlockCommand = TSPLBlockCommand;
|
|
458
|
+
declare const index$3_TSPLBlockCommand: typeof TSPLBlockCommand;
|
|
459
|
+
type index$3_TSPLCLSCommand = TSPLCLSCommand;
|
|
460
|
+
declare const index$3_TSPLCLSCommand: typeof TSPLCLSCommand;
|
|
461
|
+
type index$3_TSPLCommand = TSPLCommand;
|
|
462
|
+
declare const index$3_TSPLCommand: typeof TSPLCommand;
|
|
463
|
+
type index$3_TSPLCommandGroup = TSPLCommandGroup;
|
|
464
|
+
declare const index$3_TSPLCommandGroup: typeof TSPLCommandGroup;
|
|
465
|
+
type index$3_TSPLDiagonal = TSPLDiagonal;
|
|
466
|
+
declare const index$3_TSPLDiagonal: typeof TSPLDiagonal;
|
|
467
|
+
type index$3_TSPLDirectionCommand = TSPLDirectionCommand;
|
|
468
|
+
declare const index$3_TSPLDirectionCommand: typeof TSPLDirectionCommand;
|
|
469
|
+
type index$3_TSPLDisplay = TSPLDisplay;
|
|
470
|
+
declare const index$3_TSPLDisplay: typeof TSPLDisplay;
|
|
471
|
+
type index$3_TSPLDownload = TSPLDownload;
|
|
472
|
+
declare const index$3_TSPLDownload: typeof TSPLDownload;
|
|
473
|
+
type index$3_TSPLGapCommand = TSPLGapCommand;
|
|
474
|
+
declare const index$3_TSPLGapCommand: typeof TSPLGapCommand;
|
|
475
|
+
type index$3_TSPLPrintCommand = TSPLPrintCommand;
|
|
476
|
+
declare const index$3_TSPLPrintCommand: typeof TSPLPrintCommand;
|
|
477
|
+
type index$3_TSPLQRCommand = TSPLQRCommand;
|
|
478
|
+
declare const index$3_TSPLQRCommand: typeof TSPLQRCommand;
|
|
479
|
+
type index$3_TSPLRawCommand = TSPLRawCommand;
|
|
480
|
+
declare const index$3_TSPLRawCommand: typeof TSPLRawCommand;
|
|
481
|
+
type index$3_TSPLSizeCommand = TSPLSizeCommand;
|
|
482
|
+
declare const index$3_TSPLSizeCommand: typeof TSPLSizeCommand;
|
|
483
|
+
type index$3_TSPLTextCommand = TSPLTextCommand;
|
|
484
|
+
declare const index$3_TSPLTextCommand: typeof TSPLTextCommand;
|
|
485
|
+
type index$3_TSPLVisualCommand = TSPLVisualCommand;
|
|
486
|
+
declare const index$3_TSPLVisualCommand: typeof TSPLVisualCommand;
|
|
487
|
+
declare const index$3_alignmentToNumber: typeof alignmentToNumber;
|
|
488
|
+
declare namespace index$3 {
|
|
489
|
+
export { type index$3_Alignment as Alignment, type index$3_AutoManual as AutoManual, type index$3_BarcodeHumanReable as BarcodeHumanReable, type index$3_BarcodeType as BarcodeType, type index$3_ECCLevel as ECCLevel, type index$3_GraphicMode as GraphicMode, type index$3_LabelDirection as LabelDirection, type index$3_QRModel as QRModel, type index$3_Rotation as Rotation, index$3_TSPLBarCommand as TSPLBarCommand, index$3_TSPLBitmapCommand as TSPLBitmapCommand, index$3_TSPLBlockCommand as TSPLBlockCommand, index$3_TSPLCLSCommand as TSPLCLSCommand, index$3_TSPLCommand as TSPLCommand, index$3_TSPLCommandGroup as TSPLCommandGroup, index$3_TSPLDiagonal as TSPLDiagonal, index$3_TSPLDirectionCommand as TSPLDirectionCommand, index$3_TSPLDisplay as TSPLDisplay, index$3_TSPLDownload as TSPLDownload, index$3_TSPLGapCommand as TSPLGapCommand, index$3_TSPLPrintCommand as TSPLPrintCommand, index$3_TSPLQRCommand as TSPLQRCommand, index$3_TSPLRawCommand as TSPLRawCommand, index$3_TSPLSizeCommand as TSPLSizeCommand, index$3_TSPLTextCommand as TSPLTextCommand, index$3_TSPLVisualCommand as TSPLVisualCommand, index$3_alignmentToNumber as alignmentToNumber, _default as commandGenerator };
|
|
490
490
|
}
|
|
491
491
|
|
|
492
492
|
type Point = {
|
|
@@ -497,6 +497,17 @@ type Point = {
|
|
|
497
497
|
type PrinterLanguage = "tspl";
|
|
498
498
|
type UnitSystem = "imperial" | "metric" | "dot";
|
|
499
499
|
|
|
500
|
+
type index$2_Command = Command;
|
|
501
|
+
declare const index$2_Command: typeof Command;
|
|
502
|
+
type index$2_CommandGroup<T extends Command> = CommandGroup<T>;
|
|
503
|
+
declare const index$2_CommandGroup: typeof CommandGroup;
|
|
504
|
+
type index$2_Point = Point;
|
|
505
|
+
type index$2_PrinterLanguage = PrinterLanguage;
|
|
506
|
+
type index$2_UnitSystem = UnitSystem;
|
|
507
|
+
declare namespace index$2 {
|
|
508
|
+
export { index$2_Command as Command, index$2_CommandGroup as CommandGroup, type index$2_Point as Point, type index$2_PrinterLanguage as PrinterLanguage, type index$2_UnitSystem as UnitSystem, index$3 as tspl };
|
|
509
|
+
}
|
|
510
|
+
|
|
500
511
|
type Expand<T> = T extends infer O ? {
|
|
501
512
|
[K in keyof O]: O[K];
|
|
502
513
|
} : never;
|
|
@@ -762,6 +773,20 @@ declare class QRCode extends LabelField {
|
|
|
762
773
|
commandForLanguage(language: PrinterLanguage, config?: PrintConfig | undefined): Promise<Command>;
|
|
763
774
|
}
|
|
764
775
|
|
|
776
|
+
type index$1_BarCode = BarCode;
|
|
777
|
+
declare const index$1_BarCode: typeof BarCode;
|
|
778
|
+
type index$1_Image = Image;
|
|
779
|
+
declare const index$1_Image: typeof Image;
|
|
780
|
+
type index$1_Label = Label;
|
|
781
|
+
declare const index$1_Label: typeof Label;
|
|
782
|
+
type index$1_Line = Line;
|
|
783
|
+
declare const index$1_Line: typeof Line;
|
|
784
|
+
type index$1_Text = Text;
|
|
785
|
+
declare const index$1_Text: typeof Text;
|
|
786
|
+
declare namespace index$1 {
|
|
787
|
+
export { index$1_BarCode as BarCode, index$1_Image as Image, index$1_Label as Label, index$1_Line as Line, index$1_Text as Text, QRCode as qrCode };
|
|
788
|
+
}
|
|
789
|
+
|
|
765
790
|
/**
|
|
766
791
|
* Base class that encapsulates functionality of all printers
|
|
767
792
|
*/
|
|
@@ -823,4 +848,12 @@ declare class PrinterService {
|
|
|
823
848
|
static requestPrinter(): Promise<Printer | undefined>;
|
|
824
849
|
}
|
|
825
850
|
|
|
826
|
-
|
|
851
|
+
type index_Printer = Printer;
|
|
852
|
+
declare const index_Printer: typeof Printer;
|
|
853
|
+
type index_PrinterService = PrinterService;
|
|
854
|
+
declare const index_PrinterService: typeof PrinterService;
|
|
855
|
+
declare namespace index {
|
|
856
|
+
export { index_Printer as Printer, index_PrinterService as PrinterService };
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
export { index$2 as commands, index$1 as labels, index as printers };
|
package/dist/index.d.ts
CHANGED
|
@@ -441,52 +441,52 @@ declare class TSPLCommandGenerator implements CommandGenerator<TSPLCommand> {
|
|
|
441
441
|
}
|
|
442
442
|
declare const _default: TSPLCommandGenerator;
|
|
443
443
|
|
|
444
|
-
type
|
|
445
|
-
type
|
|
446
|
-
type
|
|
447
|
-
type
|
|
448
|
-
type
|
|
449
|
-
type
|
|
450
|
-
type
|
|
451
|
-
type
|
|
452
|
-
type
|
|
453
|
-
type
|
|
454
|
-
declare const
|
|
455
|
-
type
|
|
456
|
-
declare const
|
|
457
|
-
type
|
|
458
|
-
declare const
|
|
459
|
-
type
|
|
460
|
-
declare const
|
|
461
|
-
type
|
|
462
|
-
declare const
|
|
463
|
-
type
|
|
464
|
-
declare const
|
|
465
|
-
type
|
|
466
|
-
declare const
|
|
467
|
-
type
|
|
468
|
-
declare const
|
|
469
|
-
type
|
|
470
|
-
declare const
|
|
471
|
-
type
|
|
472
|
-
declare const
|
|
473
|
-
type
|
|
474
|
-
declare const
|
|
475
|
-
type
|
|
476
|
-
declare const
|
|
477
|
-
type
|
|
478
|
-
declare const
|
|
479
|
-
type
|
|
480
|
-
declare const
|
|
481
|
-
type
|
|
482
|
-
declare const
|
|
483
|
-
type
|
|
484
|
-
declare const
|
|
485
|
-
type
|
|
486
|
-
declare const
|
|
487
|
-
declare const
|
|
488
|
-
declare namespace index {
|
|
489
|
-
export { type
|
|
444
|
+
type index$3_Alignment = Alignment;
|
|
445
|
+
type index$3_AutoManual = AutoManual;
|
|
446
|
+
type index$3_BarcodeHumanReable = BarcodeHumanReable;
|
|
447
|
+
type index$3_BarcodeType = BarcodeType;
|
|
448
|
+
type index$3_ECCLevel = ECCLevel;
|
|
449
|
+
type index$3_GraphicMode = GraphicMode;
|
|
450
|
+
type index$3_LabelDirection = LabelDirection;
|
|
451
|
+
type index$3_QRModel = QRModel;
|
|
452
|
+
type index$3_Rotation = Rotation;
|
|
453
|
+
type index$3_TSPLBarCommand = TSPLBarCommand;
|
|
454
|
+
declare const index$3_TSPLBarCommand: typeof TSPLBarCommand;
|
|
455
|
+
type index$3_TSPLBitmapCommand = TSPLBitmapCommand;
|
|
456
|
+
declare const index$3_TSPLBitmapCommand: typeof TSPLBitmapCommand;
|
|
457
|
+
type index$3_TSPLBlockCommand = TSPLBlockCommand;
|
|
458
|
+
declare const index$3_TSPLBlockCommand: typeof TSPLBlockCommand;
|
|
459
|
+
type index$3_TSPLCLSCommand = TSPLCLSCommand;
|
|
460
|
+
declare const index$3_TSPLCLSCommand: typeof TSPLCLSCommand;
|
|
461
|
+
type index$3_TSPLCommand = TSPLCommand;
|
|
462
|
+
declare const index$3_TSPLCommand: typeof TSPLCommand;
|
|
463
|
+
type index$3_TSPLCommandGroup = TSPLCommandGroup;
|
|
464
|
+
declare const index$3_TSPLCommandGroup: typeof TSPLCommandGroup;
|
|
465
|
+
type index$3_TSPLDiagonal = TSPLDiagonal;
|
|
466
|
+
declare const index$3_TSPLDiagonal: typeof TSPLDiagonal;
|
|
467
|
+
type index$3_TSPLDirectionCommand = TSPLDirectionCommand;
|
|
468
|
+
declare const index$3_TSPLDirectionCommand: typeof TSPLDirectionCommand;
|
|
469
|
+
type index$3_TSPLDisplay = TSPLDisplay;
|
|
470
|
+
declare const index$3_TSPLDisplay: typeof TSPLDisplay;
|
|
471
|
+
type index$3_TSPLDownload = TSPLDownload;
|
|
472
|
+
declare const index$3_TSPLDownload: typeof TSPLDownload;
|
|
473
|
+
type index$3_TSPLGapCommand = TSPLGapCommand;
|
|
474
|
+
declare const index$3_TSPLGapCommand: typeof TSPLGapCommand;
|
|
475
|
+
type index$3_TSPLPrintCommand = TSPLPrintCommand;
|
|
476
|
+
declare const index$3_TSPLPrintCommand: typeof TSPLPrintCommand;
|
|
477
|
+
type index$3_TSPLQRCommand = TSPLQRCommand;
|
|
478
|
+
declare const index$3_TSPLQRCommand: typeof TSPLQRCommand;
|
|
479
|
+
type index$3_TSPLRawCommand = TSPLRawCommand;
|
|
480
|
+
declare const index$3_TSPLRawCommand: typeof TSPLRawCommand;
|
|
481
|
+
type index$3_TSPLSizeCommand = TSPLSizeCommand;
|
|
482
|
+
declare const index$3_TSPLSizeCommand: typeof TSPLSizeCommand;
|
|
483
|
+
type index$3_TSPLTextCommand = TSPLTextCommand;
|
|
484
|
+
declare const index$3_TSPLTextCommand: typeof TSPLTextCommand;
|
|
485
|
+
type index$3_TSPLVisualCommand = TSPLVisualCommand;
|
|
486
|
+
declare const index$3_TSPLVisualCommand: typeof TSPLVisualCommand;
|
|
487
|
+
declare const index$3_alignmentToNumber: typeof alignmentToNumber;
|
|
488
|
+
declare namespace index$3 {
|
|
489
|
+
export { type index$3_Alignment as Alignment, type index$3_AutoManual as AutoManual, type index$3_BarcodeHumanReable as BarcodeHumanReable, type index$3_BarcodeType as BarcodeType, type index$3_ECCLevel as ECCLevel, type index$3_GraphicMode as GraphicMode, type index$3_LabelDirection as LabelDirection, type index$3_QRModel as QRModel, type index$3_Rotation as Rotation, index$3_TSPLBarCommand as TSPLBarCommand, index$3_TSPLBitmapCommand as TSPLBitmapCommand, index$3_TSPLBlockCommand as TSPLBlockCommand, index$3_TSPLCLSCommand as TSPLCLSCommand, index$3_TSPLCommand as TSPLCommand, index$3_TSPLCommandGroup as TSPLCommandGroup, index$3_TSPLDiagonal as TSPLDiagonal, index$3_TSPLDirectionCommand as TSPLDirectionCommand, index$3_TSPLDisplay as TSPLDisplay, index$3_TSPLDownload as TSPLDownload, index$3_TSPLGapCommand as TSPLGapCommand, index$3_TSPLPrintCommand as TSPLPrintCommand, index$3_TSPLQRCommand as TSPLQRCommand, index$3_TSPLRawCommand as TSPLRawCommand, index$3_TSPLSizeCommand as TSPLSizeCommand, index$3_TSPLTextCommand as TSPLTextCommand, index$3_TSPLVisualCommand as TSPLVisualCommand, index$3_alignmentToNumber as alignmentToNumber, _default as commandGenerator };
|
|
490
490
|
}
|
|
491
491
|
|
|
492
492
|
type Point = {
|
|
@@ -497,6 +497,17 @@ type Point = {
|
|
|
497
497
|
type PrinterLanguage = "tspl";
|
|
498
498
|
type UnitSystem = "imperial" | "metric" | "dot";
|
|
499
499
|
|
|
500
|
+
type index$2_Command = Command;
|
|
501
|
+
declare const index$2_Command: typeof Command;
|
|
502
|
+
type index$2_CommandGroup<T extends Command> = CommandGroup<T>;
|
|
503
|
+
declare const index$2_CommandGroup: typeof CommandGroup;
|
|
504
|
+
type index$2_Point = Point;
|
|
505
|
+
type index$2_PrinterLanguage = PrinterLanguage;
|
|
506
|
+
type index$2_UnitSystem = UnitSystem;
|
|
507
|
+
declare namespace index$2 {
|
|
508
|
+
export { index$2_Command as Command, index$2_CommandGroup as CommandGroup, type index$2_Point as Point, type index$2_PrinterLanguage as PrinterLanguage, type index$2_UnitSystem as UnitSystem, index$3 as tspl };
|
|
509
|
+
}
|
|
510
|
+
|
|
500
511
|
type Expand<T> = T extends infer O ? {
|
|
501
512
|
[K in keyof O]: O[K];
|
|
502
513
|
} : never;
|
|
@@ -762,6 +773,20 @@ declare class QRCode extends LabelField {
|
|
|
762
773
|
commandForLanguage(language: PrinterLanguage, config?: PrintConfig | undefined): Promise<Command>;
|
|
763
774
|
}
|
|
764
775
|
|
|
776
|
+
type index$1_BarCode = BarCode;
|
|
777
|
+
declare const index$1_BarCode: typeof BarCode;
|
|
778
|
+
type index$1_Image = Image;
|
|
779
|
+
declare const index$1_Image: typeof Image;
|
|
780
|
+
type index$1_Label = Label;
|
|
781
|
+
declare const index$1_Label: typeof Label;
|
|
782
|
+
type index$1_Line = Line;
|
|
783
|
+
declare const index$1_Line: typeof Line;
|
|
784
|
+
type index$1_Text = Text;
|
|
785
|
+
declare const index$1_Text: typeof Text;
|
|
786
|
+
declare namespace index$1 {
|
|
787
|
+
export { index$1_BarCode as BarCode, index$1_Image as Image, index$1_Label as Label, index$1_Line as Line, index$1_Text as Text, QRCode as qrCode };
|
|
788
|
+
}
|
|
789
|
+
|
|
765
790
|
/**
|
|
766
791
|
* Base class that encapsulates functionality of all printers
|
|
767
792
|
*/
|
|
@@ -823,4 +848,12 @@ declare class PrinterService {
|
|
|
823
848
|
static requestPrinter(): Promise<Printer | undefined>;
|
|
824
849
|
}
|
|
825
850
|
|
|
826
|
-
|
|
851
|
+
type index_Printer = Printer;
|
|
852
|
+
declare const index_Printer: typeof Printer;
|
|
853
|
+
type index_PrinterService = PrinterService;
|
|
854
|
+
declare const index_PrinterService: typeof PrinterService;
|
|
855
|
+
declare namespace index {
|
|
856
|
+
export { index_Printer as Printer, index_PrinterService as PrinterService };
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
export { index$2 as commands, index$1 as labels, index as printers };
|