@qr-platform/qr-code.js 0.8.21 → 0.8.23

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.
Files changed (47) hide show
  1. package/docs/documentation.md +5 -4
  2. package/lib/chunks/zbar-scan-validator-B3GQk_mt.js +1 -0
  3. package/lib/chunks/zxing-scan-validator-CYcyNnMt.js +1 -0
  4. package/lib/core/qr-templates.d.ts +1 -0
  5. package/lib/index.d.ts +18 -4
  6. package/lib/index.js +1 -0
  7. package/lib/lib/zxing-js/src/browser/BrowserCodeReader.d.ts +3 -263
  8. package/lib/lib/zxing-js/src/core/NodeLuminanceSource.d.ts +10 -13
  9. package/lib/node.d.ts +18 -3
  10. package/lib/node.js +1 -0
  11. package/lib/utils/scan-validator-zxing-node.d.ts +18 -0
  12. package/package.json +8 -8
  13. package/lib/builder/index.d.ts +0 -13
  14. package/lib/builder/node.d.ts +0 -13
  15. package/lib/builder/qr-code-builder.d.ts +0 -25
  16. package/lib/lib/zxing-js/src/browser/BrowserQRCodeSvgWriter.d.ts +0 -46
  17. package/lib/lib/zxing-js/src/browser/BrowserSvgCodeWriter.d.ts +0 -49
  18. package/lib/lib/zxing-js/src/browser/DecodeContinuouslyCallback.d.ts +0 -6
  19. package/lib/lib/zxing-js/src/browser/VideoInputDevice.d.ts +0 -22
  20. package/lib/lib/zxing-js/src/core/Dimension.d.ts +0 -13
  21. package/lib/lib/zxing-js/src/core/EncodeHintType.d.ts +0 -99
  22. package/lib/lib/zxing-js/src/core/PlanarYUVLuminanceSource.d.ts +0 -35
  23. package/lib/lib/zxing-js/src/core/RGBLuminanceSource.d.ts +0 -21
  24. package/lib/lib/zxing-js/src/core/Writer.d.ts +0 -30
  25. package/lib/lib/zxing-js/src/core/WriterException.d.ts +0 -7
  26. package/lib/lib/zxing-js/src/core/common/ECIEncoderSet.d.ts +0 -37
  27. package/lib/lib/zxing-js/src/core/common/ECIInput.d.ts +0 -79
  28. package/lib/lib/zxing-js/src/core/common/MinimalECIInput.d.ts +0 -123
  29. package/lib/lib/zxing-js/src/core/common/detector/CornerDetector.d.ts +0 -35
  30. package/lib/lib/zxing-js/src/core/common/detector/WhiteRectangleDetector.d.ts +0 -71
  31. package/lib/lib/zxing-js/src/core/common/reedsolomon/AbstractGenericGFPoly.d.ts +0 -36
  32. package/lib/lib/zxing-js/src/core/common/reedsolomon/ReedSolomonEncoder.d.ts +0 -41
  33. package/lib/lib/zxing-js/src/core/qrcode/QRCodeWriter.d.ts +0 -13
  34. package/lib/lib/zxing-js/src/core/qrcode/encoder/BlockPair.d.ts +0 -7
  35. package/lib/lib/zxing-js/src/core/qrcode/encoder/ByteMatrix.d.ts +0 -24
  36. package/lib/lib/zxing-js/src/core/qrcode/encoder/Encoder.d.ts +0 -85
  37. package/lib/lib/zxing-js/src/core/qrcode/encoder/MaskUtil.d.ts +0 -47
  38. package/lib/lib/zxing-js/src/core/qrcode/encoder/MatrixUtil.d.ts +0 -37
  39. package/lib/lib/zxing-js/src/core/qrcode/encoder/QRCode.d.ts +0 -29
  40. package/lib/lib/zxing-js/src/core/util/ByteArrayOutputStream.d.ts +0 -174
  41. package/lib/lib/zxing-js/src/core/util/Collections.d.ts +0 -11
  42. package/lib/lib/zxing-js/src/core/util/Formatter.d.ts +0 -28
  43. package/lib/lib/zxing-js/src/core/util/Long.d.ts +0 -12
  44. package/lib/lib/zxing-js/src/core/util/OutputStream.d.ts +0 -106
  45. package/lib/lib/zxing-js/src/core/util/StandardCharsets.d.ts +0 -7
  46. package/lib/qr-code-js-node.js +0 -1
  47. package/lib/qr-code-js.js +0 -1
@@ -1,174 +0,0 @@
1
- import { int } from '../../customTypings';
2
- import OutputStream from './OutputStream';
3
- /**
4
- * This class implements an output stream in which the data is
5
- * written into a byte array. The buffer automatically grows as data
6
- * is written to it.
7
- * The data can be retrieved using <code>toByteArray()</code> and
8
- * <code>toString()</code>.
9
- * <p>
10
- * Closing a <tt>ByteArrayOutputStream</tt> has no effect. The methods in
11
- * this class can be called after the stream has been closed without
12
- * generating an <tt>IOException</tt>.
13
- *
14
- * @author Arthur van Hoff
15
- * @since JDK1.0
16
- */
17
- export default class ByteArrayOutputStream extends OutputStream {
18
- /**
19
- * The buffer where data is stored.
20
- */
21
- protected buf: Uint8Array;
22
- /**
23
- * The number of valid bytes in the buffer.
24
- */
25
- protected count: int;
26
- /**
27
- * Creates a new byte array output stream. The buffer capacity is
28
- * initially 32 bytes, though its size increases if necessary.
29
- */
30
- /**
31
- * Creates a new byte array output stream, with a buffer capacity of
32
- * the specified size, in bytes.
33
- *
34
- * @param size the initial size.
35
- * @exception IllegalArgumentException if size is negative.
36
- */
37
- constructor(size?: int);
38
- /**
39
- * Increases the capacity if necessary to ensure that it can hold
40
- * at least the number of elements specified by the minimum
41
- * capacity argument.
42
- *
43
- * @param minCapacity the desired minimum capacity
44
- * @throws OutOfMemoryError if {@code minCapacity < 0}. This is
45
- * interpreted as a request for the unsatisfiably large capacity
46
- * {@code (long) Integer.MAX_VALUE + (minCapacity - Integer.MAX_VALUE)}.
47
- */
48
- private ensureCapacity;
49
- /**
50
- * Increases the capacity to ensure that it can hold at least the
51
- * number of elements specified by the minimum capacity argument.
52
- *
53
- * @param minCapacity the desired minimum capacity
54
- */
55
- private grow;
56
- /**
57
- * Writes the specified byte to this byte array output stream.
58
- *
59
- * @param b the byte to be written.
60
- */
61
- write(b: int): void;
62
- /**
63
- * Writes <code>len</code> bytes from the specified byte array
64
- * starting at offset <code>off</code> to this byte array output stream.
65
- *
66
- * @param b the data.
67
- * @param off the start offset in the data.
68
- * @param len the number of bytes to write.
69
- */
70
- writeBytesOffset(b: Uint8Array, off: int, len: int): void;
71
- /**
72
- * Writes the complete contents of this byte array output stream to
73
- * the specified output stream argument, as if by calling the output
74
- * stream's write method using <code>out.write(buf, 0, count)</code>.
75
- *
76
- * @param out the output stream to which to write the data.
77
- * @exception IOException if an I/O error occurs.
78
- */
79
- writeTo(out: OutputStream): void;
80
- /**
81
- * Resets the <code>count</code> field of this byte array output
82
- * stream to zero, so that all currently accumulated output in the
83
- * output stream is discarded. The output stream can be used again,
84
- * reusing the already allocated buffer space.
85
- *
86
- * @see java.io.ByteArrayInputStream#count
87
- */
88
- reset(): void;
89
- /**
90
- * Creates a newly allocated byte array. Its size is the current
91
- * size of this output stream and the valid contents of the buffer
92
- * have been copied into it.
93
- *
94
- * @return the current contents of this output stream, as a byte array.
95
- * @see java.io.ByteArrayOutputStream#size()
96
- */
97
- toByteArray(): Uint8Array;
98
- /**
99
- * Returns the current size of the buffer.
100
- *
101
- * @return the value of the <code>count</code> field, which is the number
102
- * of valid bytes in this output stream.
103
- * @see java.io.ByteArrayOutputStream#count
104
- */
105
- size(): int;
106
- toString(param?: number | string): string;
107
- /**
108
- * Converts the buffer's contents into a string decoding bytes using the
109
- * platform's default character set. The length of the new <tt>String</tt>
110
- * is a function of the character set, and hence may not be equal to the
111
- * size of the buffer.
112
- *
113
- * <p> This method always replaces malformed-input and unmappable-character
114
- * sequences with the default replacement string for the platform's
115
- * default character set. The {@linkplain java.nio.charset.CharsetDecoder}
116
- * class should be used when more control over the decoding process is
117
- * required.
118
- *
119
- * @return String decoded from the buffer's contents.
120
- * @since JDK1.1
121
- */
122
- toString_void(): string;
123
- /**
124
- * Converts the buffer's contents into a string by decoding the bytes using
125
- * the specified {@link java.nio.charset.Charset charsetName}. The length of
126
- * the new <tt>String</tt> is a function of the charset, and hence may not be
127
- * equal to the length of the byte array.
128
- *
129
- * <p> This method always replaces malformed-input and unmappable-character
130
- * sequences with this charset's default replacement string. The {@link
131
- * java.nio.charset.CharsetDecoder} class should be used when more control
132
- * over the decoding process is required.
133
- *
134
- * @param charsetName the name of a supported
135
- * {@linkplain java.nio.charset.Charset </code>charset<code>}
136
- * @return String decoded from the buffer's contents.
137
- * @exception UnsupportedEncodingException
138
- * If the named charset is not supported
139
- * @since JDK1.1
140
- */
141
- toString_string(charsetName: string): string;
142
- /**
143
- * Creates a newly allocated string. Its size is the current size of
144
- * the output stream and the valid contents of the buffer have been
145
- * copied into it. Each character <i>c</i> in the resulting string is
146
- * constructed from the corresponding element <i>b</i> in the byte
147
- * array such that:
148
- * <blockquote><pre>
149
- * c == (char)(((hibyte &amp; 0xff) &lt;&lt; 8) | (b &amp; 0xff))
150
- * </pre></blockquote>
151
- *
152
- * @deprecated This method does not properly convert bytes into characters.
153
- * As of JDK&nbsp;1.1, the preferred way to do this is via the
154
- * <code>toString(String enc)</code> method, which takes an encoding-name
155
- * argument, or the <code>toString()</code> method, which uses the
156
- * platform's default character encoding.
157
- *
158
- * @param hibyte the high byte of each resulting Unicode character.
159
- * @return the current contents of the output stream, as a string.
160
- * @see java.io.ByteArrayOutputStream#size()
161
- * @see java.io.ByteArrayOutputStream#toString(String)
162
- * @see java.io.ByteArrayOutputStream#toString()
163
- */
164
- toString_number(hibyte: int): string;
165
- /**
166
- * Closing a <tt>ByteArrayOutputStream</tt> has no effect. The methods in
167
- * this class can be called after the stream has been closed without
168
- * generating an <tt>IOException</tt>.
169
- * <p>
170
- *
171
- * @throws IOException
172
- */
173
- close(): void;
174
- }
@@ -1,11 +0,0 @@
1
- import { Collection, int } from '../../customTypings';
2
- export default class Collections {
3
- /**
4
- * The singletonList(T) method is used to return an immutable list containing only the specified object.
5
- */
6
- static singletonList<T = any>(item: T): Collection<T>;
7
- /**
8
- * The min(Collection<? extends T>, Comparator<? super T>) method is used to return the minimum element of the given collection, according to the order induced by the specified comparator.
9
- */
10
- static min<T = any>(collection: Collection<T>, comparator: (a: T, b: T) => int): T;
11
- }
@@ -1,28 +0,0 @@
1
- /**
2
- * Java Formatter class polyfill that works in the JS way.
3
- */
4
- export default class Formatter {
5
- /**
6
- * The internal formatted value.
7
- */
8
- buffer: string;
9
- constructor();
10
- /**
11
- *
12
- * @see https://stackoverflow.com/a/13439711/4367683
13
- *
14
- * @param str
15
- * @param arr
16
- */
17
- private static form;
18
- /**
19
- *
20
- * @param append The new string to append.
21
- * @param args Argumets values to be formated.
22
- */
23
- format(append: string, ...args: any): void;
24
- /**
25
- * Returns the Formatter string value.
26
- */
27
- toString(): string;
28
- }
@@ -1,12 +0,0 @@
1
- /**
2
- * Ponyfill for Java's Long class.
3
- */
4
- export default class Long {
5
- /**
6
- * Parses a string to a number, since JS has no really Int64.
7
- *
8
- * @param num Numeric string.
9
- * @param radix Destination radix.
10
- */
11
- static parseLong(num: string, radix?: number | undefined): number;
12
- }
@@ -1,106 +0,0 @@
1
- /**
2
- * This abstract class is the superclass of all classes representing
3
- * an output stream of bytes. An output stream accepts output bytes
4
- * and sends them to some sink.
5
- * <p>
6
- * Applications that need to define a subclass of
7
- * <code>OutputStream</code> must always provide at least a method
8
- * that writes one byte of output.
9
- *
10
- * @author Arthur van Hoff
11
- * @see java.io.BufferedOutputStream
12
- * @see java.io.ByteArrayOutputStream
13
- * @see java.io.DataOutputStream
14
- * @see java.io.FilterOutputStream
15
- * @see java.io.InputStream
16
- * @see java.io.OutputStream#write(int)
17
- * @since JDK1.0
18
- */
19
- export default abstract class OutputStream {
20
- /**
21
- * Writes the specified byte to this output stream. The general
22
- * contract for <code>write</code> is that one byte is written
23
- * to the output stream. The byte to be written is the eight
24
- * low-order bits of the argument <code>b</code>. The 24
25
- * high-order bits of <code>b</code> are ignored.
26
- * <p>
27
- * Subclasses of <code>OutputStream</code> must provide an
28
- * implementation for this method.
29
- *
30
- * @param b the <code>byte</code>.
31
- * @exception IOException if an I/O error occurs. In particular,
32
- * an <code>IOException</code> may be thrown if the
33
- * output stream has been closed.
34
- */
35
- abstract write(b: number): void;
36
- /**
37
- * Writes <code>b.length</code> bytes from the specified byte array
38
- * to this output stream. The general contract for <code>write(b)</code>
39
- * is that it should have exactly the same effect as the call
40
- * <code>write(b, 0, b.length)</code>.
41
- *
42
- * @param b the data.
43
- * @exception IOException if an I/O error occurs.
44
- * @see java.io.OutputStream#write(byte[], int, int)
45
- */
46
- writeBytes(b: Uint8Array): void;
47
- /**
48
- * Writes <code>len</code> bytes from the specified byte array
49
- * starting at offset <code>off</code> to this output stream.
50
- * The general contract for <code>write(b, off, len)</code> is that
51
- * some of the bytes in the array <code>b</code> are written to the
52
- * output stream in order; element <code>b[off]</code> is the first
53
- * byte written and <code>b[off+len-1]</code> is the last byte written
54
- * by this operation.
55
- * <p>
56
- * The <code>write</code> method of <code>OutputStream</code> calls
57
- * the write method of one argument on each of the bytes to be
58
- * written out. Subclasses are encouraged to override this method and
59
- * provide a more efficient implementation.
60
- * <p>
61
- * If <code>b</code> is <code>null</code>, a
62
- * <code>NullPointerException</code> is thrown.
63
- * <p>
64
- * If <code>off</code> is negative, or <code>len</code> is negative, or
65
- * <code>off+len</code> is greater than the length of the array
66
- * <code>b</code>, then an <tt>IndexOutOfBoundsException</tt> is thrown.
67
- *
68
- * @param b the data.
69
- * @param off the start offset in the data.
70
- * @param len the number of bytes to write.
71
- * @exception IOException if an I/O error occurs. In particular,
72
- * an <code>IOException</code> is thrown if the output
73
- * stream is closed.
74
- */
75
- writeBytesOffset(b: Uint8Array, off: number, len: number): void;
76
- /**
77
- * Flushes this output stream and forces any buffered output bytes
78
- * to be written out. The general contract of <code>flush</code> is
79
- * that calling it is an indication that, if any bytes previously
80
- * written have been buffered by the implementation of the output
81
- * stream, such bytes should immediately be written to their
82
- * intended destination.
83
- * <p>
84
- * If the intended destination of this stream is an abstraction provided by
85
- * the underlying operating system, for example a file, then flushing the
86
- * stream guarantees only that bytes previously written to the stream are
87
- * passed to the operating system for writing; it does not guarantee that
88
- * they are actually written to a physical device such as a disk drive.
89
- * <p>
90
- * The <code>flush</code> method of <code>OutputStream</code> does nothing.
91
- *
92
- * @exception IOException if an I/O error occurs.
93
- */
94
- flush(): void;
95
- /**
96
- * Closes this output stream and releases any system resources
97
- * associated with this stream. The general contract of <code>close</code>
98
- * is that it closes the output stream. A closed stream cannot perform
99
- * output operations and cannot be reopened.
100
- * <p>
101
- * The <code>close</code> method of <code>OutputStream</code> does nothing.
102
- *
103
- * @exception IOException if an I/O error occurs.
104
- */
105
- close(): void;
106
- }
@@ -1,7 +0,0 @@
1
- import CharacterSetECI from '../common/CharacterSetECI';
2
- /**
3
- * Just to make a shortcut between Java code and TS code.
4
- */
5
- export default class StandardCharsets {
6
- static ISO_8859_1: CharacterSetECI;
7
- }