@node-projects/web-component-designer-zpl 0.2.1 → 0.3.2
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 +16 -2
- package/THIRD-PARTY-LICENSES.md +432 -0
- package/dist/assets/fonts/LICENSE-APACHE-2.0.txt +202 -0
- package/dist/assets/fonts/NOTICE.md +27 -0
- package/dist/assets/fonts/OCRA-NOTICE.md +27 -0
- package/dist/assets/fonts/OCRA.ttf +0 -0
- package/dist/assets/fonts/OCRB-NOTICE.md +21 -0
- package/dist/assets/fonts/OCRB.ttf +0 -0
- package/dist/assets/fonts/PrintLabMono-NOTICE.md +24 -0
- package/dist/assets/fonts/PrintLabMono.ttf +0 -0
- package/dist/assets/fonts/PrintLabZPL-Bold.ttf +0 -0
- package/dist/assets/fonts/PrintLabZPL-Bold.woff2 +0 -0
- package/dist/assets/fonts/VeraMono-Bold.ttf +0 -0
- package/dist/assets/fonts/VeraMono-NOTICE.md +57 -0
- package/dist/assets/fonts/VeraMono.ttf +0 -0
- package/dist/assets/licenses/BWIP-JS-LICENSE.txt +23 -0
- package/dist/assets/licenses/ZPLab-LICENSE.txt +21 -0
- package/dist/barcodes/barcodeRegistry.d.ts +124 -0
- package/dist/barcodes/barcodeRegistry.js +357 -0
- package/dist/barcodes/bwipRenderer.d.ts +90 -0
- package/dist/barcodes/bwipRenderer.js +630 -0
- package/dist/fonts/zplFonts.d.ts +27 -0
- package/dist/fonts/zplFonts.js +85 -0
- package/dist/index.d.ts +10 -3
- package/dist/index.js +10 -3
- package/dist/services/ZplBarcodeElementsService.d.ts +5 -0
- package/dist/services/ZplBarcodeElementsService.js +16 -0
- package/dist/services/ZplBarcodePropertiesService.d.ts +10 -0
- package/dist/services/ZplBarcodePropertiesService.js +59 -0
- package/dist/services/ZplDiagonalLineExtension.d.ts +46 -0
- package/dist/services/ZplDiagonalLineExtension.js +255 -0
- package/dist/services/ZplElementResizeStrategy.d.ts +20 -0
- package/dist/services/ZplElementResizeStrategy.js +182 -0
- package/dist/services/ZplGraphicResizeStrategy.d.ts +18 -0
- package/dist/services/ZplGraphicResizeStrategy.js +81 -0
- package/dist/services/ZplIncludeInOutputPropertiesService.d.ts +12 -0
- package/dist/services/ZplIncludeInOutputPropertiesService.js +50 -0
- package/dist/services/ZplParserService.d.ts +7 -4
- package/dist/services/ZplParserService.js +214 -249
- package/dist/services/ZplSelectionExtensionProvider.d.ts +9 -0
- package/dist/services/ZplSelectionExtensionProvider.js +15 -0
- package/dist/services/ZplTextEditExtension.d.ts +20 -0
- package/dist/services/ZplTextEditExtension.js +80 -0
- package/dist/services/ZplTextPropertiesService.d.ts +8 -0
- package/dist/services/ZplTextPropertiesService.js +24 -0
- package/dist/services/hiddenMetadata.d.ts +17 -0
- package/dist/services/hiddenMetadata.js +95 -0
- package/dist/services/zplResizeGeometry.d.ts +6 -0
- package/dist/services/zplResizeGeometry.js +8 -0
- package/dist/setupZplServiceContainer.js +22 -4
- package/dist/widgets/elements.json +0 -24
- package/dist/widgets/views/zpl-demo-view.js +27 -2
- package/dist/widgets/zpl-barcode.d.ts +68 -14
- package/dist/widgets/zpl-barcode.js +189 -74
- package/dist/widgets/zpl-comment.d.ts +2 -0
- package/dist/widgets/zpl-comment.js +6 -3
- package/dist/widgets/zpl-graphic-box.d.ts +12 -0
- package/dist/widgets/zpl-graphic-box.js +49 -15
- package/dist/widgets/zpl-graphic-circle.d.ts +2 -0
- package/dist/widgets/zpl-graphic-circle.js +7 -0
- package/dist/widgets/zpl-graphic-diagonal-line.d.ts +2 -0
- package/dist/widgets/zpl-graphic-diagonal-line.js +7 -0
- package/dist/widgets/zpl-image.d.ts +4 -1
- package/dist/widgets/zpl-image.js +17 -14
- package/dist/widgets/zpl-text.d.ts +38 -8
- package/dist/widgets/zpl-text.js +183 -49
- package/dist/zplHelper.d.ts +1 -1
- package/dist/zplHelper.js +5 -1
- package/package.json +9 -4
- package/dist/extensions/ZplLayoutResizeExtensionProvider.d.ts +0 -4
- package/dist/extensions/ZplLayoutResizeExtensionProvider.js +0 -16
- package/dist/jsBarcodeOptions.d.ts +0 -27
- package/dist/jsBarcodeOptions.js +0 -14
- package/dist/qr.d.ts +0 -11
- package/dist/qr.js +0 -759
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# PrintLab ZPL Bold
|
|
2
|
+
|
|
3
|
+
PrintLab ZPL Bold is a derivative work of Roboto Condensed by
|
|
4
|
+
Christian Robertson, distributed by Google Fonts under the Apache
|
|
5
|
+
License, Version 2.0.
|
|
6
|
+
|
|
7
|
+
## Modifications
|
|
8
|
+
|
|
9
|
+
Relative to upstream Roboto Condensed:
|
|
10
|
+
|
|
11
|
+
- Built from the `wght=900` instance of the variable font.
|
|
12
|
+
- Per-glyph horizontal advance widths (`hmtx`) and outlines scaled
|
|
13
|
+
individually to match the metrics of Zebra firmware's CG Triumvirate
|
|
14
|
+
Condensed Bold, so layout positions agree with ZPL `^A0` rendering.
|
|
15
|
+
- Vertical outlines scaled to align cap heights with the same target.
|
|
16
|
+
- TrueType hinting tables (`prep`, `fpgm`, `cvt`) removed so the
|
|
17
|
+
modified outlines render unhinted.
|
|
18
|
+
- Family and PostScript names renamed from "Roboto Condensed" to
|
|
19
|
+
"PrintLab ZPL".
|
|
20
|
+
|
|
21
|
+
## License
|
|
22
|
+
|
|
23
|
+
Apache License, Version 2.0. Full text in `LICENSE-APACHE-2.0.txt`
|
|
24
|
+
next to this file, or at https://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
+
|
|
26
|
+
Upstream source:
|
|
27
|
+
https://github.com/google/fonts/tree/main/ofl/robotocondensed
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# OCR-A
|
|
2
|
+
|
|
3
|
+
OCR-A TrueType font by Matthew Skala (2011-12, 2021), built from a METAFONT
|
|
4
|
+
definition originally by Richard B. Wales (1988-89), with later work by Tor
|
|
5
|
+
Lillqvist. The bundled file reports "Version 2" (built 2021-03-28).
|
|
6
|
+
|
|
7
|
+
Source: https://tsukurimashou.org/ocr.php.en
|
|
8
|
+
|
|
9
|
+
## License
|
|
10
|
+
|
|
11
|
+
The TrueType file carries no embedded license record. Two upstream parties'
|
|
12
|
+
terms apply and are reproduced here as required.
|
|
13
|
+
|
|
14
|
+
**Matthew Skala** (TrueType/OpenType conversion) places his own contributions in
|
|
15
|
+
the public domain and states they are "available for free use, including in
|
|
16
|
+
commercial applications" (https://tsukurimashou.org/ocr.php.en). His
|
|
17
|
+
documentation adds: "I make no copyright claim on these fonts myself ... I
|
|
18
|
+
cannot give any kind of binding legal opinion" (https://tsukurimashou.org/ocr.pdf).
|
|
19
|
+
|
|
20
|
+
**Richard B. Wales** (original OCR-A METAFONT, 1988-89) requires that his
|
|
21
|
+
copyright notice and credit be retained, and that no fee be charged for
|
|
22
|
+
distribution beyond a reasonable copying or communications charge. CTAN
|
|
23
|
+
catalogues the upstream `ocr-a` package as "Do Not Sell Except by Arrangement"
|
|
24
|
+
(https://ctan.org/pkg/ocr-a; source notice: https://tug.ctan.org/fonts/oca/ocra.mf).
|
|
25
|
+
|
|
26
|
+
This font ships as part of this free, open-source project and is not sold
|
|
27
|
+
separately; the credits above are retained as the Wales terms require.
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# OCR-B
|
|
2
|
+
|
|
3
|
+
OCR-B TrueType font by Matthew Skala (2011, 2021), derived from METAFONT
|
|
4
|
+
definitions by Norbert Schwarz.
|
|
5
|
+
|
|
6
|
+
Source: https://tsukurimashou.org/ocr.php.en
|
|
7
|
+
|
|
8
|
+
## License
|
|
9
|
+
|
|
10
|
+
The font carries no embedded license record. The author's documentation
|
|
11
|
+
("OCR-A and OCR-B fonts version 0.4pre", Matthew Skala, 2021-07-01,
|
|
12
|
+
https://tsukurimashou.org/ocr.pdf, section 3) states:
|
|
13
|
+
|
|
14
|
+
> He [Schwarz] originally distributed it under a "non-commercial use
|
|
15
|
+
> only" restriction but has since released it for unrestricted use and
|
|
16
|
+
> distribution.
|
|
17
|
+
|
|
18
|
+
> I make no copyright claim on these fonts myself. I do not believe
|
|
19
|
+
> anyone else makes a copyright claim that would conflict with the use
|
|
20
|
+
> of these fonts in a commercial project, but I cannot speak for any
|
|
21
|
+
> party other than myself.
|
|
Binary file
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# PrintLab Mono
|
|
2
|
+
|
|
3
|
+
PrintLab Mono is a derivative work of **Bitstream Vera Sans Mono**
|
|
4
|
+
(Copyright (c) 2003 by Bitstream, Inc.), used as the canvas substitute for
|
|
5
|
+
ZPL device fonts A/C/D/F/G.
|
|
6
|
+
|
|
7
|
+
## Modifications
|
|
8
|
+
|
|
9
|
+
Relative to upstream Bitstream Vera Sans Mono:
|
|
10
|
+
|
|
11
|
+
- The dash glyphs (hyphen, en-dash, em-dash) are replaced with a wider,
|
|
12
|
+
taller bar matching Zebra's device-font dash (the upstream hyphen is too
|
|
13
|
+
narrow/short for ZPL fidelity). All other glyphs and metrics are unchanged.
|
|
14
|
+
- Renamed from "Bitstream Vera Sans Mono" to "PrintLab Mono" as the license
|
|
15
|
+
requires for modified fonts. The original copyright, trademark and
|
|
16
|
+
permission notices are retained in the font's `name` table and below.
|
|
17
|
+
|
|
18
|
+
## License (Bitstream Vera Fonts Copyright)
|
|
19
|
+
|
|
20
|
+
The Bitstream Vera license permits modification provided the font is renamed
|
|
21
|
+
to a name containing neither "Bitstream" nor "Vera", and that the copyright
|
|
22
|
+
and permission notice accompany all copies. Full license text is in
|
|
23
|
+
`VeraMono-NOTICE.md` next to this file and embedded in the font's `name`
|
|
24
|
+
record (ID 13).
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Bitstream Vera Sans Mono
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2003 by Bitstream, Inc. "Bitstream Vera" is a trademark of
|
|
4
|
+
Bitstream, Inc. Bundled weights: `VeraMono.ttf` (regular) and
|
|
5
|
+
`VeraMono-Bold.ttf` (bold); both ship unmodified under the license below.
|
|
6
|
+
|
|
7
|
+
Source (DejaVu fork; the original gnome.org/fonts distribution is gone):
|
|
8
|
+
https://github.com/dejavu-fonts/dejavu-fonts
|
|
9
|
+
|
|
10
|
+
## License (Bitstream Vera Fonts Copyright)
|
|
11
|
+
|
|
12
|
+
Reproduced verbatim from the font's embedded license record (name ID 13):
|
|
13
|
+
|
|
14
|
+
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream
|
|
15
|
+
Vera is a trademark of Bitstream, Inc.
|
|
16
|
+
|
|
17
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
18
|
+
copy of the fonts accompanying this license ("Fonts") and associated
|
|
19
|
+
documentation files (the "Font Software"), to reproduce and distribute
|
|
20
|
+
the Font Software, including without limitation the rights to use, copy,
|
|
21
|
+
merge, publish, distribute, and/or sell copies of the Font Software, and
|
|
22
|
+
to permit persons to whom the Font Software is furnished to do so,
|
|
23
|
+
subject to the following conditions:
|
|
24
|
+
|
|
25
|
+
The above copyright and trademark notices and this permission notice
|
|
26
|
+
shall be included in all copies of one or more of the Font Software
|
|
27
|
+
typefaces.
|
|
28
|
+
|
|
29
|
+
The Font Software may be modified, altered, or added to, and in
|
|
30
|
+
particular the designs of glyphs or characters in the Fonts may be
|
|
31
|
+
modified and additional glyphs or characters may be added to the Fonts,
|
|
32
|
+
only if the fonts are renamed to names not containing either the words
|
|
33
|
+
"Bitstream" or the word "Vera".
|
|
34
|
+
|
|
35
|
+
This License becomes null and void to the extent applicable to Fonts or
|
|
36
|
+
Font Software that has been modified and is distributed under the
|
|
37
|
+
"Bitstream Vera" names.
|
|
38
|
+
|
|
39
|
+
The Font Software may be sold as part of a larger software package but no
|
|
40
|
+
copy of one or more of the Font Software typefaces may be sold by itself.
|
|
41
|
+
|
|
42
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
43
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
44
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
|
45
|
+
COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM
|
|
46
|
+
OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
47
|
+
LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR
|
|
48
|
+
CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
49
|
+
OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT
|
|
50
|
+
SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
51
|
+
|
|
52
|
+
Except as contained in this notice, the names of Gnome, the Gnome
|
|
53
|
+
Foundation, and Bitstream Inc., shall not be used in advertising or
|
|
54
|
+
otherwise to promote the sale, use or other dealings in this Font
|
|
55
|
+
Software without prior written authorization from the Gnome Foundation
|
|
56
|
+
or Bitstream Inc., respectively. For further information, contact: fonts
|
|
57
|
+
at gnome dot org.
|
|
Binary file
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
bwip-js : Barcode Writer in Pure JavaScript
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2011-2026 Mark Warren
|
|
4
|
+
|
|
5
|
+
The MIT License
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in
|
|
15
|
+
all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 u8array
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
export declare const barcodeTypes: readonly ["code128", "code39", "code93", "code11", "interleaved2of5", "standard2of5", "industrial2of5", "codabar", "logmars", "msi", "plessey", "gs1databar", "planet", "postnet", "ean13", "ean8", "upca", "upce", "upceanextension", "code49", "qrcode", "datamatrix", "pdf417", "micropdf417", "aztec", "codablock", "maxicode", "tlc39"];
|
|
2
|
+
export type BarcodeType = typeof barcodeTypes[number];
|
|
3
|
+
export type BarcodeRotation = 'N' | 'R' | 'I' | 'B';
|
|
4
|
+
export type BarcodeResizeKind = 'linear' | 'uniform-2d' | 'stacked-2d' | 'intrinsic' | 'tlc39';
|
|
5
|
+
export interface BarcodeByState {
|
|
6
|
+
moduleWidth: number;
|
|
7
|
+
wideRatio: number;
|
|
8
|
+
barHeight: number;
|
|
9
|
+
}
|
|
10
|
+
interface BarcodePropsBase {
|
|
11
|
+
type: BarcodeType;
|
|
12
|
+
content: string;
|
|
13
|
+
rotation: BarcodeRotation;
|
|
14
|
+
}
|
|
15
|
+
export interface LinearBarcodeProps extends BarcodePropsBase {
|
|
16
|
+
type: 'code128' | 'code39' | 'code93' | 'code11' | 'interleaved2of5' | 'standard2of5' | 'industrial2of5' | 'codabar' | 'logmars' | 'msi' | 'plessey' | 'planet' | 'postnet' | 'ean13' | 'ean8' | 'upca' | 'upce' | 'upceanextension' | 'code49';
|
|
17
|
+
moduleWidth: number;
|
|
18
|
+
wideRatio: number;
|
|
19
|
+
barHeight: number;
|
|
20
|
+
printInterpretation: boolean;
|
|
21
|
+
printInterpretationAbove: boolean;
|
|
22
|
+
checkDigit: boolean;
|
|
23
|
+
mode: string;
|
|
24
|
+
gs1: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface Gs1DataBarProps extends BarcodePropsBase {
|
|
27
|
+
type: 'gs1databar';
|
|
28
|
+
magnification: number;
|
|
29
|
+
symbology: number;
|
|
30
|
+
segments: number;
|
|
31
|
+
}
|
|
32
|
+
export interface QrBarcodeProps extends BarcodePropsBase {
|
|
33
|
+
type: 'qrcode';
|
|
34
|
+
magnification: number;
|
|
35
|
+
errorCorrection: 'H' | 'Q' | 'M' | 'L';
|
|
36
|
+
model: number;
|
|
37
|
+
}
|
|
38
|
+
export interface DataMatrixBarcodeProps extends BarcodePropsBase {
|
|
39
|
+
type: 'datamatrix';
|
|
40
|
+
dimension: number;
|
|
41
|
+
quality: number;
|
|
42
|
+
columns: number;
|
|
43
|
+
rows: number;
|
|
44
|
+
gs1: boolean;
|
|
45
|
+
aspectRatio: number;
|
|
46
|
+
}
|
|
47
|
+
export interface StackedBarcodeProps extends BarcodePropsBase {
|
|
48
|
+
type: 'pdf417' | 'micropdf417' | 'codablock';
|
|
49
|
+
moduleWidth: number;
|
|
50
|
+
rowHeight: number;
|
|
51
|
+
securityLevel: number | string;
|
|
52
|
+
columns: number;
|
|
53
|
+
mode: number;
|
|
54
|
+
}
|
|
55
|
+
export interface AztecBarcodeProps extends BarcodePropsBase {
|
|
56
|
+
type: 'aztec';
|
|
57
|
+
magnification: number;
|
|
58
|
+
ecLevel: number;
|
|
59
|
+
}
|
|
60
|
+
export interface MaxiCodeBarcodeProps extends BarcodePropsBase {
|
|
61
|
+
type: 'maxicode';
|
|
62
|
+
mode: number;
|
|
63
|
+
symbolNumber: number;
|
|
64
|
+
symbolTotal: number;
|
|
65
|
+
}
|
|
66
|
+
export interface Tlc39BarcodeProps extends BarcodePropsBase {
|
|
67
|
+
type: 'tlc39';
|
|
68
|
+
moduleWidth: number;
|
|
69
|
+
wideRatio: number;
|
|
70
|
+
barHeight: number;
|
|
71
|
+
microPdfModuleWidth: number;
|
|
72
|
+
microPdfRowHeight: number;
|
|
73
|
+
}
|
|
74
|
+
export type BarcodeProps = LinearBarcodeProps | Gs1DataBarProps | QrBarcodeProps | DataMatrixBarcodeProps | StackedBarcodeProps | AztecBarcodeProps | MaxiCodeBarcodeProps | Tlc39BarcodeProps;
|
|
75
|
+
export interface BarcodePropertyDefinition {
|
|
76
|
+
readonly name: string;
|
|
77
|
+
readonly attributeName: string;
|
|
78
|
+
readonly type: 'string' | 'number' | 'boolean' | 'enum';
|
|
79
|
+
readonly min?: number;
|
|
80
|
+
readonly max?: number;
|
|
81
|
+
readonly step?: number;
|
|
82
|
+
readonly values?: readonly string[];
|
|
83
|
+
}
|
|
84
|
+
export interface BarcodeDefinition<T extends BarcodeType = BarcodeType> {
|
|
85
|
+
readonly type: T;
|
|
86
|
+
readonly label: string;
|
|
87
|
+
readonly command: string;
|
|
88
|
+
readonly bcid: string;
|
|
89
|
+
readonly resizeKind: BarcodeResizeKind;
|
|
90
|
+
readonly defaultContent: string;
|
|
91
|
+
readonly defaults: Readonly<Record<string, string | number | boolean>>;
|
|
92
|
+
readonly properties: readonly BarcodePropertyDefinition[];
|
|
93
|
+
readonly validate: (props: BarcodeProps) => string | null;
|
|
94
|
+
readonly emit: (props: BarcodeProps) => {
|
|
95
|
+
by?: string;
|
|
96
|
+
command: string;
|
|
97
|
+
fieldData: string;
|
|
98
|
+
};
|
|
99
|
+
readonly parse: (fields: string[], by: BarcodeByState) => Record<string, string | number | boolean>;
|
|
100
|
+
readonly bwipOptions?: (props: BarcodeProps) => Record<string, unknown>;
|
|
101
|
+
/** ZPL field-origin correction required to align preview ink with printer ink. */
|
|
102
|
+
readonly fieldOriginOffset?: (rotation: BarcodeRotation) => Readonly<{
|
|
103
|
+
x: number;
|
|
104
|
+
y: number;
|
|
105
|
+
}>;
|
|
106
|
+
}
|
|
107
|
+
export declare const dataMatrixSquareSizes: readonly [10, 12, 14, 16, 18, 20, 22, 24, 26, 32, 36, 40, 44, 48, 52, 64, 72, 80, 88, 96, 104, 120, 132, 144];
|
|
108
|
+
export declare const dataMatrixRectangularSizes: readonly [readonly [8, 18], readonly [8, 32], readonly [12, 26], readonly [12, 36], readonly [16, 36], readonly [16, 48]];
|
|
109
|
+
export declare function isDataMatrixRectangular(props: DataMatrixBarcodeProps): boolean;
|
|
110
|
+
/** Returns a BWIP version only for a symbol size Zebra accepts for ECC 200. */
|
|
111
|
+
export declare function getDataMatrixVersion(props: DataMatrixBarcodeProps): string | undefined;
|
|
112
|
+
export declare const barcodeRegistry: Readonly<Record<BarcodeType, BarcodeDefinition>>;
|
|
113
|
+
export declare const barcodeCommandRegistry: Readonly<Record<string, BarcodeDefinition>>;
|
|
114
|
+
export declare function getBarcodeFieldOriginOffset(type: BarcodeType, rotation: BarcodeRotation): Readonly<{
|
|
115
|
+
x: number;
|
|
116
|
+
y: number;
|
|
117
|
+
}>;
|
|
118
|
+
/** Every attribute that can affect a barcode preview. Keeping this list
|
|
119
|
+
* registry-derived makes custom-element reactivity follow the property grid. */
|
|
120
|
+
export declare const barcodeObservedAttributes: readonly string[];
|
|
121
|
+
export declare function getBarcodeDefinition(type: string | null | undefined): BarcodeDefinition;
|
|
122
|
+
export declare function readBarcodeProps(element: Element): BarcodeProps;
|
|
123
|
+
export declare function attributesForBarcode(type: BarcodeType, values?: Record<string, string | number | boolean>): Record<string, string>;
|
|
124
|
+
export {};
|