@thermal-label/brother-ql-core 0.2.1 → 0.3.0
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/dist/__tests__/media.test.js +23 -3
- package/dist/__tests__/media.test.js.map +1 -1
- package/dist/__tests__/pack-bits.test.d.ts +2 -0
- package/dist/__tests__/pack-bits.test.d.ts.map +1 -0
- package/dist/__tests__/pack-bits.test.js +90 -0
- package/dist/__tests__/pack-bits.test.js.map +1 -0
- package/dist/__tests__/preview.test.js +1 -1
- package/dist/__tests__/preview.test.js.map +1 -1
- package/dist/__tests__/protocol.test.js +46 -1
- package/dist/__tests__/protocol.test.js.map +1 -1
- package/dist/devices.d.ts +1 -1
- package/dist/devices.d.ts.map +1 -1
- package/dist/devices.js +0 -1
- package/dist/devices.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/media.d.ts +18 -6
- package/dist/media.d.ts.map +1 -1
- package/dist/media.js +47 -29
- package/dist/media.js.map +1 -1
- package/dist/orientation.d.ts +11 -0
- package/dist/orientation.d.ts.map +1 -0
- package/dist/orientation.js +10 -0
- package/dist/orientation.js.map +1 -0
- package/dist/pack-bits.d.ts +20 -0
- package/dist/pack-bits.d.ts.map +1 -0
- package/dist/pack-bits.js +61 -0
- package/dist/pack-bits.js.map +1 -0
- package/dist/preview.d.ts +6 -6
- package/dist/preview.d.ts.map +1 -1
- package/dist/preview.js +11 -12
- package/dist/preview.js.map +1 -1
- package/dist/protocol.d.ts +1 -1
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +13 -7
- package/dist/protocol.js.map +1 -1
- package/dist/status.d.ts +1 -1
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +0 -1
- package/dist/status.js.map +1 -1
- package/dist/types.d.ts +15 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -2
- package/dist/types.js.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/media.test.ts +25 -3
- package/src/__tests__/pack-bits.test.ts +92 -0
- package/src/__tests__/preview.test.ts +1 -1
- package/src/__tests__/protocol.test.ts +47 -1
- package/src/devices.ts +1 -1
- package/src/index.ts +16 -4
- package/src/media.ts +48 -29
- package/src/orientation.ts +11 -0
- package/src/pack-bits.ts +64 -0
- package/src/preview.ts +13 -12
- package/src/protocol.ts +14 -7
- package/src/status.ts +1 -2
- package/src/types.ts +21 -6
- package/dist/__tests__/colour.test.d.ts +0 -2
- package/dist/__tests__/colour.test.d.ts.map +0 -1
- package/dist/__tests__/colour.test.js +0 -106
- package/dist/__tests__/colour.test.js.map +0 -1
- package/dist/colour.d.ts +0 -26
- package/dist/colour.d.ts.map +0 -1
- package/dist/colour.js +0 -84
- package/dist/colour.js.map +0 -1
- package/src/__tests__/colour.test.ts +0 -126
- package/src/colour.ts +0 -101
package/dist/media.js
CHANGED
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
import {} from './types.js';
|
|
2
1
|
/**
|
|
3
2
|
* Registry of supported Brother QL consumables.
|
|
4
3
|
*
|
|
5
4
|
* Entries are keyed by the firmware media id — the same number the
|
|
6
|
-
* printer reports in the 32-byte status response. `heightMm` is
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
5
|
+
* printer reports in the 32-byte status response. `heightMm` is omitted
|
|
6
|
+
* for continuous media (variable length) and set for die-cut labels
|
|
7
|
+
* (fixed length).
|
|
8
|
+
*
|
|
9
|
+
* `palette` is set on multi-ink media (DK-22251, today's only entry) —
|
|
10
|
+
* the driver routes those through `renderMultiPlaneImage` and emits the
|
|
11
|
+
* second plane in the raster job. Single-ink rolls leave it undefined
|
|
12
|
+
* and route through `renderImage` (dithered single-plane).
|
|
13
|
+
*
|
|
14
|
+
* Rectangular die-cut entries declare `defaultOrientation: 'horizontal'`
|
|
15
|
+
* so landscape input auto-rotates to read along the tape feed direction.
|
|
16
|
+
* Continuous wide tape leaves the hint undefined — users may go either
|
|
17
|
+
* way.
|
|
18
|
+
*
|
|
19
|
+
* `cornerRadiusMm` is informational; previews use it to render the
|
|
20
|
+
* actual paper outline. Round die-cut labels set the radius to
|
|
21
|
+
* `widthMm / 2` so the rounded rectangle degenerates to a circle.
|
|
11
22
|
*/
|
|
12
23
|
export const MEDIA = {
|
|
13
24
|
// Continuous length tape
|
|
@@ -16,7 +27,6 @@ export const MEDIA = {
|
|
|
16
27
|
name: '12mm continuous',
|
|
17
28
|
type: 'continuous',
|
|
18
29
|
widthMm: 12,
|
|
19
|
-
colorCapable: false,
|
|
20
30
|
printAreaDots: 106,
|
|
21
31
|
leftMarginPins: 585,
|
|
22
32
|
rightMarginPins: 29,
|
|
@@ -26,7 +36,6 @@ export const MEDIA = {
|
|
|
26
36
|
name: '29mm continuous (DK-22210)',
|
|
27
37
|
type: 'continuous',
|
|
28
38
|
widthMm: 29,
|
|
29
|
-
colorCapable: false,
|
|
30
39
|
printAreaDots: 306,
|
|
31
40
|
leftMarginPins: 408,
|
|
32
41
|
rightMarginPins: 6,
|
|
@@ -36,7 +45,6 @@ export const MEDIA = {
|
|
|
36
45
|
name: '38mm continuous (DK-22225)',
|
|
37
46
|
type: 'continuous',
|
|
38
47
|
widthMm: 38,
|
|
39
|
-
colorCapable: false,
|
|
40
48
|
printAreaDots: 413,
|
|
41
49
|
leftMarginPins: 295,
|
|
42
50
|
rightMarginPins: 12,
|
|
@@ -46,7 +54,6 @@ export const MEDIA = {
|
|
|
46
54
|
name: '50mm continuous (DK-22246)',
|
|
47
55
|
type: 'continuous',
|
|
48
56
|
widthMm: 50,
|
|
49
|
-
colorCapable: false,
|
|
50
57
|
printAreaDots: 554,
|
|
51
58
|
leftMarginPins: 154,
|
|
52
59
|
rightMarginPins: 12,
|
|
@@ -56,7 +63,6 @@ export const MEDIA = {
|
|
|
56
63
|
name: '54mm continuous (DK-22214)',
|
|
57
64
|
type: 'continuous',
|
|
58
65
|
widthMm: 54,
|
|
59
|
-
colorCapable: false,
|
|
60
66
|
printAreaDots: 590,
|
|
61
67
|
leftMarginPins: 130,
|
|
62
68
|
rightMarginPins: 0,
|
|
@@ -66,7 +72,6 @@ export const MEDIA = {
|
|
|
66
72
|
name: '62mm continuous (DK-22205)',
|
|
67
73
|
type: 'continuous',
|
|
68
74
|
widthMm: 62,
|
|
69
|
-
colorCapable: false,
|
|
70
75
|
printAreaDots: 696,
|
|
71
76
|
leftMarginPins: 12,
|
|
72
77
|
rightMarginPins: 12,
|
|
@@ -76,7 +81,10 @@ export const MEDIA = {
|
|
|
76
81
|
name: '62mm continuous two-color (DK-22251)',
|
|
77
82
|
type: 'continuous',
|
|
78
83
|
widthMm: 62,
|
|
79
|
-
|
|
84
|
+
palette: [
|
|
85
|
+
{ name: 'black', rgb: [0, 0, 0] },
|
|
86
|
+
{ name: 'red', rgb: [255, 0, 0] },
|
|
87
|
+
],
|
|
80
88
|
printAreaDots: 696,
|
|
81
89
|
leftMarginPins: 12,
|
|
82
90
|
rightMarginPins: 12,
|
|
@@ -86,7 +94,6 @@ export const MEDIA = {
|
|
|
86
94
|
name: '102mm continuous (DK-22243)',
|
|
87
95
|
type: 'continuous',
|
|
88
96
|
widthMm: 102,
|
|
89
|
-
colorCapable: false,
|
|
90
97
|
printAreaDots: 1164,
|
|
91
98
|
leftMarginPins: 76,
|
|
92
99
|
rightMarginPins: 56,
|
|
@@ -98,7 +105,8 @@ export const MEDIA = {
|
|
|
98
105
|
type: 'die-cut',
|
|
99
106
|
widthMm: 17,
|
|
100
107
|
heightMm: 54,
|
|
101
|
-
|
|
108
|
+
defaultOrientation: 'horizontal',
|
|
109
|
+
cornerRadiusMm: 3,
|
|
102
110
|
printAreaDots: 165,
|
|
103
111
|
leftMarginPins: 0,
|
|
104
112
|
rightMarginPins: 0,
|
|
@@ -110,7 +118,8 @@ export const MEDIA = {
|
|
|
110
118
|
type: 'die-cut',
|
|
111
119
|
widthMm: 17,
|
|
112
120
|
heightMm: 87,
|
|
113
|
-
|
|
121
|
+
defaultOrientation: 'horizontal',
|
|
122
|
+
cornerRadiusMm: 3,
|
|
114
123
|
printAreaDots: 165,
|
|
115
124
|
leftMarginPins: 0,
|
|
116
125
|
rightMarginPins: 0,
|
|
@@ -122,7 +131,8 @@ export const MEDIA = {
|
|
|
122
131
|
type: 'die-cut',
|
|
123
132
|
widthMm: 23,
|
|
124
133
|
heightMm: 23,
|
|
125
|
-
|
|
134
|
+
defaultOrientation: 'horizontal',
|
|
135
|
+
cornerRadiusMm: 3,
|
|
126
136
|
printAreaDots: 236,
|
|
127
137
|
leftMarginPins: 0,
|
|
128
138
|
rightMarginPins: 0,
|
|
@@ -134,7 +144,8 @@ export const MEDIA = {
|
|
|
134
144
|
type: 'die-cut',
|
|
135
145
|
widthMm: 29,
|
|
136
146
|
heightMm: 90,
|
|
137
|
-
|
|
147
|
+
defaultOrientation: 'horizontal',
|
|
148
|
+
cornerRadiusMm: 3,
|
|
138
149
|
printAreaDots: 306,
|
|
139
150
|
leftMarginPins: 0,
|
|
140
151
|
rightMarginPins: 0,
|
|
@@ -146,7 +157,8 @@ export const MEDIA = {
|
|
|
146
157
|
type: 'die-cut',
|
|
147
158
|
widthMm: 38,
|
|
148
159
|
heightMm: 90,
|
|
149
|
-
|
|
160
|
+
defaultOrientation: 'horizontal',
|
|
161
|
+
cornerRadiusMm: 3,
|
|
150
162
|
printAreaDots: 413,
|
|
151
163
|
leftMarginPins: 0,
|
|
152
164
|
rightMarginPins: 0,
|
|
@@ -158,7 +170,8 @@ export const MEDIA = {
|
|
|
158
170
|
type: 'die-cut',
|
|
159
171
|
widthMm: 39,
|
|
160
172
|
heightMm: 48,
|
|
161
|
-
|
|
173
|
+
defaultOrientation: 'horizontal',
|
|
174
|
+
cornerRadiusMm: 3,
|
|
162
175
|
printAreaDots: 425,
|
|
163
176
|
leftMarginPins: 0,
|
|
164
177
|
rightMarginPins: 0,
|
|
@@ -170,7 +183,8 @@ export const MEDIA = {
|
|
|
170
183
|
type: 'die-cut',
|
|
171
184
|
widthMm: 52,
|
|
172
185
|
heightMm: 29,
|
|
173
|
-
|
|
186
|
+
defaultOrientation: 'horizontal',
|
|
187
|
+
cornerRadiusMm: 3,
|
|
174
188
|
printAreaDots: 578,
|
|
175
189
|
leftMarginPins: 0,
|
|
176
190
|
rightMarginPins: 0,
|
|
@@ -182,7 +196,8 @@ export const MEDIA = {
|
|
|
182
196
|
type: 'die-cut',
|
|
183
197
|
widthMm: 62,
|
|
184
198
|
heightMm: 29,
|
|
185
|
-
|
|
199
|
+
defaultOrientation: 'horizontal',
|
|
200
|
+
cornerRadiusMm: 3,
|
|
186
201
|
printAreaDots: 696,
|
|
187
202
|
leftMarginPins: 0,
|
|
188
203
|
rightMarginPins: 0,
|
|
@@ -194,7 +209,8 @@ export const MEDIA = {
|
|
|
194
209
|
type: 'die-cut',
|
|
195
210
|
widthMm: 62,
|
|
196
211
|
heightMm: 100,
|
|
197
|
-
|
|
212
|
+
defaultOrientation: 'horizontal',
|
|
213
|
+
cornerRadiusMm: 3,
|
|
198
214
|
printAreaDots: 696,
|
|
199
215
|
leftMarginPins: 0,
|
|
200
216
|
rightMarginPins: 0,
|
|
@@ -206,7 +222,8 @@ export const MEDIA = {
|
|
|
206
222
|
type: 'die-cut',
|
|
207
223
|
widthMm: 102,
|
|
208
224
|
heightMm: 51,
|
|
209
|
-
|
|
225
|
+
defaultOrientation: 'horizontal',
|
|
226
|
+
cornerRadiusMm: 3,
|
|
210
227
|
printAreaDots: 1164,
|
|
211
228
|
leftMarginPins: 0,
|
|
212
229
|
rightMarginPins: 0,
|
|
@@ -218,7 +235,8 @@ export const MEDIA = {
|
|
|
218
235
|
type: 'die-cut',
|
|
219
236
|
widthMm: 102,
|
|
220
237
|
heightMm: 152,
|
|
221
|
-
|
|
238
|
+
defaultOrientation: 'horizontal',
|
|
239
|
+
cornerRadiusMm: 3,
|
|
222
240
|
printAreaDots: 1164,
|
|
223
241
|
leftMarginPins: 0,
|
|
224
242
|
rightMarginPins: 0,
|
|
@@ -230,7 +248,7 @@ export const MEDIA = {
|
|
|
230
248
|
type: 'die-cut',
|
|
231
249
|
widthMm: 12,
|
|
232
250
|
heightMm: 12,
|
|
233
|
-
|
|
251
|
+
cornerRadiusMm: 6,
|
|
234
252
|
printAreaDots: 94,
|
|
235
253
|
leftMarginPins: 0,
|
|
236
254
|
rightMarginPins: 0,
|
|
@@ -242,7 +260,7 @@ export const MEDIA = {
|
|
|
242
260
|
type: 'die-cut',
|
|
243
261
|
widthMm: 24,
|
|
244
262
|
heightMm: 24,
|
|
245
|
-
|
|
263
|
+
cornerRadiusMm: 12,
|
|
246
264
|
printAreaDots: 236,
|
|
247
265
|
leftMarginPins: 0,
|
|
248
266
|
rightMarginPins: 0,
|
|
@@ -254,7 +272,7 @@ export const MEDIA = {
|
|
|
254
272
|
type: 'die-cut',
|
|
255
273
|
widthMm: 58,
|
|
256
274
|
heightMm: 58,
|
|
257
|
-
|
|
275
|
+
cornerRadiusMm: 29,
|
|
258
276
|
printAreaDots: 618,
|
|
259
277
|
leftMarginPins: 0,
|
|
260
278
|
rightMarginPins: 0,
|
|
@@ -289,7 +307,7 @@ export function findMediaByDimensions(widthMm, heightMm, twoColorMode = false) {
|
|
|
289
307
|
const continuousMatches = Object.values(MEDIA).filter(m => m.type === 'continuous' && m.widthMm === widthMm);
|
|
290
308
|
if (continuousMatches.length === 0)
|
|
291
309
|
return undefined;
|
|
292
|
-
const preferred = continuousMatches.find(m => m.
|
|
310
|
+
const preferred = continuousMatches.find(m => (m.palette !== undefined) === twoColorMode);
|
|
293
311
|
return preferred ?? continuousMatches[0];
|
|
294
312
|
}
|
|
295
313
|
return Object.values(MEDIA).find(m => m.type === 'die-cut' && m.widthMm === widthMm && m.heightMm === heightMm);
|
package/dist/media.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media.js","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":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,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACpF,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAe,EACf,QAAgB,EAChB,YAAY,GAAG,KAAK;IAEpB,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;QACnB,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CACnD,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,YAAY,IAAI,CAAC,CAAC,OAAO,KAAK,OAAO,CACtD,CAAC;QACF,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,SAAS,CAAC;QACrD,MAAM,SAAS,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,SAAS,CAAC,KAAK,YAAY,CAAC,CAAC;QAC1F,OAAO,SAAS,IAAI,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAC9B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,CAAC,OAAO,KAAK,OAAO,IAAI,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAC9E,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { RotateDirection } from '@thermal-label/contracts';
|
|
2
|
+
/**
|
|
3
|
+
* Direction the Brother QL print head rotates landscape input.
|
|
4
|
+
*
|
|
5
|
+
* `90` = clockwise. Verified once on hardware with a die-cut "F"
|
|
6
|
+
* landscape print (see plan §6 step 1). Identical across every QL
|
|
7
|
+
* model — this is a print-head/leading-edge mechanical fact, not a
|
|
8
|
+
* per-media setting.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ROTATE_DIRECTION: RotateDirection;
|
|
11
|
+
//# sourceMappingURL=orientation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orientation.d.ts","sourceRoot":"","sources":["../src/orientation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,EAAE,eAAoB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Direction the Brother QL print head rotates landscape input.
|
|
3
|
+
*
|
|
4
|
+
* `90` = clockwise. Verified once on hardware with a die-cut "F"
|
|
5
|
+
* landscape print (see plan §6 step 1). Identical across every QL
|
|
6
|
+
* model — this is a print-head/leading-edge mechanical fact, not a
|
|
7
|
+
* per-media setting.
|
|
8
|
+
*/
|
|
9
|
+
export const ROTATE_DIRECTION = 90;
|
|
10
|
+
//# sourceMappingURL=orientation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orientation.js","sourceRoot":"","sources":["../src/orientation.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TIFF-style PackBits row encoder used by Brother QL when compression
|
|
3
|
+
* mode (`M 02`, emitted by `buildCompression(true)`) is enabled for a job.
|
|
4
|
+
*
|
|
5
|
+
* Header byte `n` (interpreted as a signed int8):
|
|
6
|
+
* n in [0, 127]: literal run — the next `n + 1` bytes follow verbatim.
|
|
7
|
+
* n in [-127, -1]: repeat run — the next byte is repeated `1 - n` times.
|
|
8
|
+
* n = -128: no-op. Unused by this encoder.
|
|
9
|
+
*
|
|
10
|
+
* The encoder switches to repeat mode for runs of two or more identical
|
|
11
|
+
* bytes (a 2-byte repeat costs 2 wire bytes; the equivalent 2-byte literal
|
|
12
|
+
* would cost 3). Both run kinds are capped at 128 bytes to fit the header.
|
|
13
|
+
*
|
|
14
|
+
* For a typical Brother QL raster row (90 bytes, mostly zeros in margins
|
|
15
|
+
* and long runs of `0x00` / `0xff` in print area), this compresses to 5–15
|
|
16
|
+
* bytes — a 6–18× reduction. Worst-case for highly random input is one
|
|
17
|
+
* extra byte per 128 (the literal-mode header), i.e. < 1 % expansion.
|
|
18
|
+
*/
|
|
19
|
+
export declare function packBits(input: Uint8Array): Uint8Array;
|
|
20
|
+
//# sourceMappingURL=pack-bits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack-bits.d.ts","sourceRoot":"","sources":["../src/pack-bits.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAsCtD"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion --
|
|
2
|
+
* `noUncheckedIndexedAccess` types Uint8Array reads as `number | undefined`
|
|
3
|
+
* but every index in this file is bounded by `i < input.length` or
|
|
4
|
+
* `runEnd < input.length` checks. The `!` assertions collapse the
|
|
5
|
+
* unreachable `undefined` branches so branch coverage doesn't count them.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* TIFF-style PackBits row encoder used by Brother QL when compression
|
|
9
|
+
* mode (`M 02`, emitted by `buildCompression(true)`) is enabled for a job.
|
|
10
|
+
*
|
|
11
|
+
* Header byte `n` (interpreted as a signed int8):
|
|
12
|
+
* n in [0, 127]: literal run — the next `n + 1` bytes follow verbatim.
|
|
13
|
+
* n in [-127, -1]: repeat run — the next byte is repeated `1 - n` times.
|
|
14
|
+
* n = -128: no-op. Unused by this encoder.
|
|
15
|
+
*
|
|
16
|
+
* The encoder switches to repeat mode for runs of two or more identical
|
|
17
|
+
* bytes (a 2-byte repeat costs 2 wire bytes; the equivalent 2-byte literal
|
|
18
|
+
* would cost 3). Both run kinds are capped at 128 bytes to fit the header.
|
|
19
|
+
*
|
|
20
|
+
* For a typical Brother QL raster row (90 bytes, mostly zeros in margins
|
|
21
|
+
* and long runs of `0x00` / `0xff` in print area), this compresses to 5–15
|
|
22
|
+
* bytes — a 6–18× reduction. Worst-case for highly random input is one
|
|
23
|
+
* extra byte per 128 (the literal-mode header), i.e. < 1 % expansion.
|
|
24
|
+
*/
|
|
25
|
+
export function packBits(input) {
|
|
26
|
+
if (input.length === 0)
|
|
27
|
+
return new Uint8Array(0);
|
|
28
|
+
const out = [];
|
|
29
|
+
let i = 0;
|
|
30
|
+
while (i < input.length) {
|
|
31
|
+
// How many identical bytes start at position i (cap at 128).
|
|
32
|
+
let runEnd = i + 1;
|
|
33
|
+
while (runEnd < input.length && runEnd - i < 128 && input[runEnd] === input[i]) {
|
|
34
|
+
runEnd++;
|
|
35
|
+
}
|
|
36
|
+
const runLen = runEnd - i;
|
|
37
|
+
if (runLen >= 2) {
|
|
38
|
+
// Repeat run: header is signed -(runLen - 1).
|
|
39
|
+
out.push((1 - runLen) & 0xff);
|
|
40
|
+
out.push(input[i]);
|
|
41
|
+
i = runEnd;
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
// Otherwise emit a literal run. Stop at 128 bytes, or right before a
|
|
45
|
+
// 2+ repeat run starts (cheaper to encode that separately).
|
|
46
|
+
let litEnd = i + 1;
|
|
47
|
+
while (litEnd < input.length && litEnd - i < 128) {
|
|
48
|
+
if (litEnd + 1 < input.length && input[litEnd] === input[litEnd + 1]) {
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
litEnd++;
|
|
52
|
+
}
|
|
53
|
+
const litLen = litEnd - i;
|
|
54
|
+
out.push(litLen - 1);
|
|
55
|
+
for (let x = i; x < litEnd; x++)
|
|
56
|
+
out.push(input[x]);
|
|
57
|
+
i = litEnd;
|
|
58
|
+
}
|
|
59
|
+
return new Uint8Array(out);
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=pack-bits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack-bits.js","sourceRoot":"","sources":["../src/pack-bits.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAiB;IACxC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;IAEjD,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,IAAI,CAAC,GAAG,CAAC,CAAC;IAEV,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QACxB,6DAA6D;QAC7D,IAAI,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,MAAM,GAAG,CAAC,GAAG,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/E,MAAM,EAAE,CAAC;QACX,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC;QAE1B,IAAI,MAAM,IAAI,CAAC,EAAE,CAAC;YAChB,8CAA8C;YAC9C,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;YAC9B,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,CAAC;YACpB,CAAC,GAAG,MAAM,CAAC;YACX,SAAS;QACX,CAAC;QAED,qEAAqE;QACrE,4DAA4D;QAC5D,IAAI,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,MAAM,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC;YACjD,IAAI,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC;gBACrE,MAAM;YACR,CAAC;YACD,MAAM,EAAE,CAAC;QACX,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC;QAC1B,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE;YAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,CAAC;QACrD,CAAC,GAAG,MAAM,CAAC;IACb,CAAC;IAED,OAAO,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC"}
|
package/dist/preview.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RawImageData } from '@mbtech-nl/bitmap';
|
|
2
2
|
import type { PreviewResult } from '@thermal-label/contracts';
|
|
3
|
-
import {
|
|
3
|
+
import type { BrotherQLMedia } from './types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Offline preview without a live printer connection.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* image is split
|
|
9
|
-
*
|
|
10
|
-
* returns one black plane
|
|
7
|
+
* Multi-ink aware: when `media.palette` is defined (DK-22251 today),
|
|
8
|
+
* the image is split per-plane via `renderMultiPlaneImage()` — the
|
|
9
|
+
* same code path `print()` takes for that media. Single-ink media
|
|
10
|
+
* returns one black plane via dithered `renderImage`.
|
|
11
11
|
*/
|
|
12
12
|
export declare function createPreviewOffline(image: RawImageData, media: BrotherQLMedia): PreviewResult;
|
|
13
13
|
//# sourceMappingURL=preview.d.ts.map
|
package/dist/preview.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../src/preview.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,
|
|
1
|
+
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../src/preview.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,GAAG,aAAa,CAqB9F"}
|
package/dist/preview.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
import { renderImage } from '@mbtech-nl/bitmap';
|
|
3
|
-
import { splitTwoColor } from './colour.js';
|
|
4
|
-
import {} from './types.js';
|
|
1
|
+
import { renderImage, renderMultiPlaneImage } from '@mbtech-nl/bitmap';
|
|
5
2
|
/**
|
|
6
3
|
* Offline preview without a live printer connection.
|
|
7
4
|
*
|
|
8
|
-
*
|
|
9
|
-
* image is split
|
|
10
|
-
*
|
|
11
|
-
* returns one black plane
|
|
5
|
+
* Multi-ink aware: when `media.palette` is defined (DK-22251 today),
|
|
6
|
+
* the image is split per-plane via `renderMultiPlaneImage()` — the
|
|
7
|
+
* same code path `print()` takes for that media. Single-ink media
|
|
8
|
+
* returns one black plane via dithered `renderImage`.
|
|
12
9
|
*/
|
|
13
10
|
export function createPreviewOffline(image, media) {
|
|
14
|
-
if (media.
|
|
15
|
-
const
|
|
11
|
+
if (media.palette) {
|
|
12
|
+
const planes = renderMultiPlaneImage(image, {
|
|
13
|
+
palette: media.palette,
|
|
14
|
+
});
|
|
16
15
|
return {
|
|
17
16
|
planes: [
|
|
18
|
-
{ name: 'black', bitmap: black, displayColor: '#000000' },
|
|
19
|
-
{ name: 'red', bitmap: red, displayColor: '#ff0000' },
|
|
17
|
+
{ name: 'black', bitmap: planes.black, displayColor: '#000000' },
|
|
18
|
+
{ name: 'red', bitmap: planes.red, displayColor: '#ff0000' },
|
|
20
19
|
],
|
|
21
20
|
media,
|
|
22
21
|
assumed: false,
|
package/dist/preview.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview.js","sourceRoot":"","sources":["../src/preview.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"preview.js","sourceRoot":"","sources":["../src/preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAKvE;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAmB,EAAE,KAAqB;IAC7E,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;QAClB,MAAM,MAAM,GAAG,qBAAqB,CAAC,KAAK,EAAE;YAC1C,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAyC,CAAC;QAC3C,OAAO;YACL,MAAM,EAAE;gBACN,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE;gBAChE,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE;aAC7D;YACD,KAAK;YACL,OAAO,EAAE,KAAK;SACf,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,OAAO;QACL,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;QAC5D,KAAK;QACL,OAAO,EAAE,KAAK;KACf,CAAC;AACJ,CAAC"}
|
package/dist/protocol.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { BrotherQLMedia, PageData, JobOptions } from './types.js';
|
|
2
2
|
export declare function buildInvalidate(): Uint8Array;
|
|
3
3
|
export declare function buildStatusRequest(): Uint8Array;
|
|
4
4
|
export declare function buildInitialize(): Uint8Array;
|
package/dist/protocol.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAe,MAAM,YAAY,CAAC;AAEpF,wBAAgB,eAAe,IAAI,UAAU,CAE5C;AAED,wBAAgB,kBAAkB,IAAI,UAAU,CAE/C;AAED,wBAAgB,eAAe,IAAI,UAAU,CAE5C;AAED,wBAAgB,eAAe,IAAI,UAAU,CAE5C;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAEpE;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,cAAc,EACrB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,UAAU,CAsBZ;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAE7D;AAED,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,OAAO,EAChB,QAAQ,UAAQ,GACf,UAAU,CAMZ;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,UAAU,CAElD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAEpD;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAE7D;AAKD,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,UAAU,EACpB,KAAK,EAAE,OAAO,GAAG,KAAK,EACtB,QAAQ,UAAQ,GACf,UAAU,CAYZ;AAED,wBAAgB,YAAY,IAAI,UAAU,CAEzC;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,OAAO,GAAG,UAAU,CAEjE;AA8BD,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,OAAO,GAAE,UAAe,GAAG,UAAU,CAkFjF"}
|
package/dist/protocol.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getRow, createBitmap } from '@mbtech-nl/bitmap';
|
|
2
|
-
import {} from './
|
|
2
|
+
import { packBits } from './pack-bits.js';
|
|
3
3
|
export function buildInvalidate() {
|
|
4
4
|
return new Uint8Array(200);
|
|
5
5
|
}
|
|
@@ -128,11 +128,11 @@ export function encodeJob(pages, options = {}) {
|
|
|
128
128
|
const marginDots = opts.marginDots ?? 35;
|
|
129
129
|
const compress = opts.compress ?? false;
|
|
130
130
|
const { bitmap, media } = page;
|
|
131
|
-
//
|
|
131
|
+
// Multi-ink media (e.g. DK-22251) requires two-color mode even for black-only jobs.
|
|
132
132
|
// Auto-create an empty red plane when the tape demands it but caller didn't supply one.
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
|
|
133
|
+
const multiInk = media.palette !== undefined;
|
|
134
|
+
const twoColor = page.redBitmap !== undefined || multiInk;
|
|
135
|
+
const redBitmap = page.redBitmap ?? (multiInk ? createBitmap(bitmap.widthPx, bitmap.heightPx) : undefined);
|
|
136
136
|
if (twoColor && redBitmap !== undefined) {
|
|
137
137
|
if (bitmap.widthPx !== redBitmap.widthPx || bitmap.heightPx !== redBitmap.heightPx) {
|
|
138
138
|
throw new Error('Two-color bitmaps must have identical dimensions');
|
|
@@ -154,16 +154,22 @@ export function encodeJob(pages, options = {}) {
|
|
|
154
154
|
const rowByteLen = Math.ceil(totalPins / 8);
|
|
155
155
|
// Rows interleaved per raster line (matches Python brother_ql behaviour).
|
|
156
156
|
// Two-color: black row then red row for each line. Single-color: black only.
|
|
157
|
+
// When `compress` is on, each row's bytes are PackBits-encoded and the
|
|
158
|
+
// raster-row LEN byte carries the compressed length. The printer was
|
|
159
|
+
// already switched into compression mode by `buildCompression(true)`
|
|
160
|
+
// above, so it expects every subsequent row to be PackBits.
|
|
157
161
|
for (let r = 0; r < rowCount; r++) {
|
|
158
162
|
const blackSrc = getRow(bitmap, r);
|
|
159
163
|
const blackBytes = new Uint8Array(rowByteLen);
|
|
160
164
|
placeBits(blackSrc, bitmap.widthPx, blackBytes, media.leftMarginPins);
|
|
161
|
-
|
|
165
|
+
const blackPayload = compress ? packBits(blackBytes) : blackBytes;
|
|
166
|
+
chunks.push(buildRasterRow(blackPayload, 'black', twoColor));
|
|
162
167
|
if (twoColor && redBitmap !== undefined) {
|
|
163
168
|
const redSrc = getRow(redBitmap, r);
|
|
164
169
|
const redBytes = new Uint8Array(rowByteLen);
|
|
165
170
|
placeBits(redSrc, redBitmap.widthPx, redBytes, media.leftMarginPins);
|
|
166
|
-
|
|
171
|
+
const redPayload = compress ? packBits(redBytes) : redBytes;
|
|
172
|
+
chunks.push(buildRasterRow(redPayload, 'red', twoColor));
|
|
167
173
|
}
|
|
168
174
|
}
|
|
169
175
|
chunks.push(buildPrintCommand(isLastPage));
|
package/dist/protocol.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,MAAM,UAAU,eAAe;IAC7B,OAAO,IAAI,UAAU,CAAC,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AC3D,CAAC;QACH,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC;AAC3B,CAAC"}
|
package/dist/status.d.ts
CHANGED
package/dist/status.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,eAAO,MAAM,cAAc,YAAqC,CAAC;AAyBjE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,eAAe,CAkC9D"}
|
package/dist/status.js
CHANGED
package/dist/status.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,UAAU,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAEjE,uEAAuE;AACvE,MAAM,YAAY,GAAqD;IACrE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE;IACjD,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE;IACtD,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EA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