@thermal-label/brother-ql-core 0.2.1 → 0.4.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/README.md +1 -1
- package/data/devices.json +823 -0
- package/data/media.json +823 -0
- package/dist/__tests__/devices.test.js +112 -31
- package/dist/__tests__/devices.test.js.map +1 -1
- package/dist/__tests__/media.test.js +274 -4
- 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 +214 -2
- package/dist/__tests__/protocol.test.js.map +1 -1
- package/dist/__tests__/status.test.js +71 -0
- package/dist/__tests__/status.test.js.map +1 -1
- package/dist/devices.d.ts +14 -271
- package/dist/devices.d.ts.map +1 -1
- package/dist/devices.generated.d.ts +696 -0
- package/dist/devices.generated.d.ts.map +1 -0
- package/dist/devices.generated.js +831 -0
- package/dist/devices.generated.js.map +1 -0
- package/dist/devices.js +28 -273
- package/dist/devices.js.map +1 -1
- package/dist/index.d.ts +10 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/media.d.ts +37 -10
- package/dist/media.d.ts.map +1 -1
- package/dist/media.generated.d.ts +4 -0
- package/dist/media.generated.d.ts.map +1 -0
- package/dist/media.generated.js +1640 -0
- package/dist/media.generated.js.map +1 -0
- package/dist/media.js +75 -264
- 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 +54 -3
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +125 -20
- package/dist/protocol.js.map +1 -1
- package/dist/status.d.ts +5 -2
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +6 -3
- package/dist/status.js.map +1 -1
- package/dist/types.d.ts +106 -31
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -2
- package/dist/types.js.map +1 -1
- package/package.json +13 -9
- package/src/__tests__/devices.test.ts +122 -32
- package/src/__tests__/media.test.ts +312 -4
- package/src/__tests__/pack-bits.test.ts +92 -0
- package/src/__tests__/preview.test.ts +1 -1
- package/src/__tests__/protocol.test.ts +256 -1
- package/src/__tests__/status.test.ts +87 -0
- package/src/devices.generated.ts +840 -0
- package/src/devices.ts +31 -273
- package/src/index.ts +36 -8
- package/src/media.generated.ts +1644 -0
- package/src/media.ts +87 -264
- package/src/orientation.ts +11 -0
- package/src/pack-bits.ts +64 -0
- package/src/preview.ts +13 -12
- package/src/protocol.ts +204 -19
- package/src/status.ts +11 -5
- package/src/types.ts +113 -32
- 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/devices.d.ts
CHANGED
|
@@ -1,274 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
readonly editorLite: true;
|
|
16
|
-
};
|
|
17
|
-
readonly QL_820NWBc: {
|
|
18
|
-
readonly name: "QL-820NWBc";
|
|
19
|
-
readonly family: "brother-ql";
|
|
20
|
-
readonly transports: ["usb", "webusb", "tcp", "serial", "web-serial"];
|
|
21
|
-
readonly vid: 1273;
|
|
22
|
-
readonly pid: 8349;
|
|
23
|
-
readonly headPins: 720;
|
|
24
|
-
readonly bytesPerRow: 90;
|
|
25
|
-
readonly twoColor: true;
|
|
26
|
-
readonly network: "wifi+wired";
|
|
27
|
-
readonly autocut: true;
|
|
28
|
-
readonly compression: true;
|
|
29
|
-
readonly editorLite: true;
|
|
30
|
-
};
|
|
31
|
-
readonly QL_810W: {
|
|
32
|
-
readonly name: "QL-810W";
|
|
33
|
-
readonly family: "brother-ql";
|
|
34
|
-
readonly transports: ["usb", "webusb", "tcp"];
|
|
35
|
-
readonly vid: 1273;
|
|
36
|
-
readonly pid: 8348;
|
|
37
|
-
readonly headPins: 720;
|
|
38
|
-
readonly bytesPerRow: 90;
|
|
39
|
-
readonly twoColor: true;
|
|
40
|
-
readonly network: "wifi";
|
|
41
|
-
readonly autocut: true;
|
|
42
|
-
readonly compression: true;
|
|
43
|
-
readonly editorLite: true;
|
|
44
|
-
};
|
|
45
|
-
readonly QL_800: {
|
|
46
|
-
readonly name: "QL-800";
|
|
47
|
-
readonly family: "brother-ql";
|
|
48
|
-
readonly transports: ["usb", "webusb"];
|
|
49
|
-
readonly vid: 1273;
|
|
50
|
-
readonly pid: 8347;
|
|
51
|
-
readonly headPins: 720;
|
|
52
|
-
readonly bytesPerRow: 90;
|
|
53
|
-
readonly twoColor: true;
|
|
54
|
-
readonly network: "none";
|
|
55
|
-
readonly autocut: true;
|
|
56
|
-
readonly compression: true;
|
|
57
|
-
readonly editorLite: true;
|
|
58
|
-
};
|
|
59
|
-
readonly QL_720NW: {
|
|
60
|
-
readonly name: "QL-720NW";
|
|
61
|
-
readonly family: "brother-ql";
|
|
62
|
-
readonly transports: ["usb", "webusb", "tcp"];
|
|
63
|
-
readonly vid: 1273;
|
|
64
|
-
readonly pid: 8261;
|
|
65
|
-
readonly headPins: 720;
|
|
66
|
-
readonly bytesPerRow: 90;
|
|
67
|
-
readonly twoColor: false;
|
|
68
|
-
readonly network: "wired";
|
|
69
|
-
readonly autocut: true;
|
|
70
|
-
readonly compression: true;
|
|
71
|
-
readonly editorLite: false;
|
|
72
|
-
};
|
|
73
|
-
readonly QL_710W: {
|
|
74
|
-
readonly name: "QL-710W";
|
|
75
|
-
readonly family: "brother-ql";
|
|
76
|
-
readonly transports: ["usb", "webusb", "tcp"];
|
|
77
|
-
readonly vid: 1273;
|
|
78
|
-
readonly pid: 8260;
|
|
79
|
-
readonly headPins: 720;
|
|
80
|
-
readonly bytesPerRow: 90;
|
|
81
|
-
readonly twoColor: false;
|
|
82
|
-
readonly network: "wifi";
|
|
83
|
-
readonly autocut: true;
|
|
84
|
-
readonly compression: true;
|
|
85
|
-
readonly editorLite: true;
|
|
86
|
-
};
|
|
87
|
-
readonly QL_700: {
|
|
88
|
-
readonly name: "QL-700";
|
|
89
|
-
readonly family: "brother-ql";
|
|
90
|
-
readonly transports: ["usb", "webusb"];
|
|
91
|
-
readonly vid: 1273;
|
|
92
|
-
readonly pid: 8258;
|
|
93
|
-
readonly headPins: 720;
|
|
94
|
-
readonly bytesPerRow: 90;
|
|
95
|
-
readonly twoColor: false;
|
|
96
|
-
readonly network: "none";
|
|
97
|
-
readonly autocut: true;
|
|
98
|
-
readonly compression: true;
|
|
99
|
-
readonly editorLite: true;
|
|
100
|
-
};
|
|
101
|
-
readonly QL_600: {
|
|
102
|
-
readonly name: "QL-600";
|
|
103
|
-
readonly family: "brother-ql";
|
|
104
|
-
readonly transports: ["usb", "webusb"];
|
|
105
|
-
readonly vid: 1273;
|
|
106
|
-
readonly pid: 8448;
|
|
107
|
-
readonly headPins: 720;
|
|
108
|
-
readonly bytesPerRow: 90;
|
|
109
|
-
readonly twoColor: false;
|
|
110
|
-
readonly network: "none";
|
|
111
|
-
readonly autocut: true;
|
|
112
|
-
readonly compression: true;
|
|
113
|
-
readonly editorLite: false;
|
|
114
|
-
};
|
|
115
|
-
readonly QL_580N: {
|
|
116
|
-
readonly name: "QL-580N";
|
|
117
|
-
readonly family: "brother-ql";
|
|
118
|
-
readonly transports: ["usb", "webusb", "tcp"];
|
|
119
|
-
readonly vid: 1273;
|
|
120
|
-
readonly pid: 8219;
|
|
121
|
-
readonly headPins: 720;
|
|
122
|
-
readonly bytesPerRow: 90;
|
|
123
|
-
readonly twoColor: false;
|
|
124
|
-
readonly network: "wired";
|
|
125
|
-
readonly autocut: true;
|
|
126
|
-
readonly compression: true;
|
|
127
|
-
readonly editorLite: false;
|
|
128
|
-
};
|
|
129
|
-
readonly QL_570: {
|
|
130
|
-
readonly name: "QL-570";
|
|
131
|
-
readonly family: "brother-ql";
|
|
132
|
-
readonly transports: ["usb", "webusb"];
|
|
133
|
-
readonly vid: 1273;
|
|
134
|
-
readonly pid: 8217;
|
|
135
|
-
readonly headPins: 720;
|
|
136
|
-
readonly bytesPerRow: 90;
|
|
137
|
-
readonly twoColor: false;
|
|
138
|
-
readonly network: "none";
|
|
139
|
-
readonly autocut: true;
|
|
140
|
-
readonly compression: true;
|
|
141
|
-
readonly editorLite: false;
|
|
142
|
-
};
|
|
143
|
-
readonly QL_560: {
|
|
144
|
-
readonly name: "QL-560";
|
|
145
|
-
readonly family: "brother-ql";
|
|
146
|
-
readonly transports: ["usb", "webusb"];
|
|
147
|
-
readonly vid: 1273;
|
|
148
|
-
readonly pid: 8216;
|
|
149
|
-
readonly headPins: 720;
|
|
150
|
-
readonly bytesPerRow: 90;
|
|
151
|
-
readonly twoColor: false;
|
|
152
|
-
readonly network: "none";
|
|
153
|
-
readonly autocut: true;
|
|
154
|
-
readonly compression: false;
|
|
155
|
-
readonly editorLite: false;
|
|
156
|
-
};
|
|
157
|
-
readonly QL_550: {
|
|
158
|
-
readonly name: "QL-550";
|
|
159
|
-
readonly family: "brother-ql";
|
|
160
|
-
readonly transports: ["usb", "webusb"];
|
|
161
|
-
readonly vid: 1273;
|
|
162
|
-
readonly pid: 8214;
|
|
163
|
-
readonly headPins: 720;
|
|
164
|
-
readonly bytesPerRow: 90;
|
|
165
|
-
readonly twoColor: false;
|
|
166
|
-
readonly network: "none";
|
|
167
|
-
readonly autocut: false;
|
|
168
|
-
readonly compression: false;
|
|
169
|
-
readonly editorLite: false;
|
|
170
|
-
};
|
|
171
|
-
readonly QL_500: {
|
|
172
|
-
readonly name: "QL-500";
|
|
173
|
-
readonly family: "brother-ql";
|
|
174
|
-
readonly transports: ["usb", "webusb"];
|
|
175
|
-
readonly vid: 1273;
|
|
176
|
-
readonly pid: 8211;
|
|
177
|
-
readonly headPins: 720;
|
|
178
|
-
readonly bytesPerRow: 90;
|
|
179
|
-
readonly twoColor: false;
|
|
180
|
-
readonly network: "none";
|
|
181
|
-
readonly autocut: false;
|
|
182
|
-
readonly compression: false;
|
|
183
|
-
readonly editorLite: false;
|
|
184
|
-
};
|
|
185
|
-
readonly QL_650TD: {
|
|
186
|
-
readonly name: "QL-650TD";
|
|
187
|
-
readonly family: "brother-ql";
|
|
188
|
-
readonly transports: ["usb", "webusb"];
|
|
189
|
-
readonly vid: 1273;
|
|
190
|
-
readonly pid: 8220;
|
|
191
|
-
readonly headPins: 720;
|
|
192
|
-
readonly bytesPerRow: 90;
|
|
193
|
-
readonly twoColor: false;
|
|
194
|
-
readonly network: "none";
|
|
195
|
-
readonly autocut: true;
|
|
196
|
-
readonly compression: true;
|
|
197
|
-
readonly editorLite: false;
|
|
198
|
-
};
|
|
199
|
-
readonly QL_1100: {
|
|
200
|
-
readonly name: "QL-1100";
|
|
201
|
-
readonly family: "brother-ql";
|
|
202
|
-
readonly transports: ["usb", "webusb"];
|
|
203
|
-
readonly vid: 1273;
|
|
204
|
-
readonly pid: 8360;
|
|
205
|
-
readonly headPins: 1296;
|
|
206
|
-
readonly bytesPerRow: 162;
|
|
207
|
-
readonly twoColor: false;
|
|
208
|
-
readonly network: "none";
|
|
209
|
-
readonly autocut: true;
|
|
210
|
-
readonly compression: true;
|
|
211
|
-
readonly editorLite: true;
|
|
212
|
-
readonly massStoragePid: 8362;
|
|
213
|
-
};
|
|
214
|
-
readonly QL_1110NWB: {
|
|
215
|
-
readonly name: "QL-1110NWB";
|
|
216
|
-
readonly family: "brother-ql";
|
|
217
|
-
readonly transports: ["usb", "webusb", "tcp"];
|
|
218
|
-
readonly vid: 1273;
|
|
219
|
-
readonly pid: 8361;
|
|
220
|
-
readonly headPins: 1296;
|
|
221
|
-
readonly bytesPerRow: 162;
|
|
222
|
-
readonly twoColor: false;
|
|
223
|
-
readonly network: "wifi+wired";
|
|
224
|
-
readonly autocut: true;
|
|
225
|
-
readonly compression: true;
|
|
226
|
-
readonly editorLite: true;
|
|
227
|
-
readonly massStoragePid: 8363;
|
|
228
|
-
};
|
|
229
|
-
readonly QL_1115NWB: {
|
|
230
|
-
readonly name: "QL-1115NWB";
|
|
231
|
-
readonly family: "brother-ql";
|
|
232
|
-
readonly transports: ["usb", "webusb", "tcp"];
|
|
233
|
-
readonly vid: 1273;
|
|
234
|
-
readonly pid: 8364;
|
|
235
|
-
readonly headPins: 1296;
|
|
236
|
-
readonly bytesPerRow: 162;
|
|
237
|
-
readonly twoColor: false;
|
|
238
|
-
readonly network: "wifi+wired";
|
|
239
|
-
readonly autocut: true;
|
|
240
|
-
readonly compression: true;
|
|
241
|
-
readonly editorLite: true;
|
|
242
|
-
};
|
|
243
|
-
readonly QL_1050: {
|
|
244
|
-
readonly name: "QL-1050";
|
|
245
|
-
readonly family: "brother-ql";
|
|
246
|
-
readonly transports: ["usb", "webusb"];
|
|
247
|
-
readonly vid: 1273;
|
|
248
|
-
readonly pid: 8231;
|
|
249
|
-
readonly headPins: 1296;
|
|
250
|
-
readonly bytesPerRow: 162;
|
|
251
|
-
readonly twoColor: false;
|
|
252
|
-
readonly network: "none";
|
|
253
|
-
readonly autocut: true;
|
|
254
|
-
readonly compression: true;
|
|
255
|
-
readonly editorLite: false;
|
|
256
|
-
};
|
|
257
|
-
readonly QL_1060N: {
|
|
258
|
-
readonly name: "QL-1060N";
|
|
259
|
-
readonly family: "brother-ql";
|
|
260
|
-
readonly transports: ["usb", "webusb", "tcp"];
|
|
261
|
-
readonly vid: 1273;
|
|
262
|
-
readonly pid: 8232;
|
|
263
|
-
readonly headPins: 1296;
|
|
264
|
-
readonly bytesPerRow: 162;
|
|
265
|
-
readonly twoColor: false;
|
|
266
|
-
readonly network: "wired";
|
|
267
|
-
readonly autocut: true;
|
|
268
|
-
readonly compression: true;
|
|
269
|
-
readonly editorLite: false;
|
|
270
|
-
};
|
|
271
|
-
};
|
|
1
|
+
import type { BrotherQLDevice } from './types.js';
|
|
2
|
+
import { DEVICES, DEVICE_REGISTRY } from './devices.generated.js';
|
|
3
|
+
export { DEVICE_REGISTRY, DEVICES };
|
|
4
|
+
/**
|
|
5
|
+
* Numeric VID/PID extracted from a device's USB transport.
|
|
6
|
+
*
|
|
7
|
+
* Returns `undefined` when the device has no USB transport. Hex
|
|
8
|
+
* strings on the registry (`'0x04f9'`) are parsed at this boundary so
|
|
9
|
+
* runtime callers stay numeric.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getUsbIds(device: BrotherQLDevice): {
|
|
12
|
+
vid: number;
|
|
13
|
+
pid: number;
|
|
14
|
+
} | undefined;
|
|
272
15
|
export declare function findDevice(vid: number, pid: number): BrotherQLDevice | undefined;
|
|
273
16
|
export declare function isMassStorageMode(pid: number): boolean;
|
|
274
17
|
//# sourceMappingURL=devices.d.ts.map
|
package/dist/devices.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devices.d.ts","sourceRoot":"","sources":["../src/devices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"devices.d.ts","sourceRoot":"","sources":["../src/devices.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAclE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC;AAEpC;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAI3F;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAKhF;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEtD"}
|