ReviewOS

also looking at this

stacks/ts-qr-codes

chore(deps): update dependency react to 19.2.7

#2137
Closed chris wants to merge buddy-bot/update-major-update-react into main
222 files +16350 -1825

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

docs/api/barcode/EAN/EAN-13.mdmodified+9-7
Changes to docs/api/barcode/EAN/EAN-13.md
@@ -100,15 +100,17 @@ barcode('#barcode')
100100## Common Applications
101101
1021021. Retail Products
103 - Standard retail products
104 - Point of sale scanning
105 - Inventory management
103 - Standard retail products
104 - Point of sale scanning
105 - Inventory management
106
1061072. Books (ISBN)
107 - Prefix: 978 or 979
108 - Used with EAN-5 for price
108 - Prefix: 978 or 979
109 - Used with EAN-5 for price
110
1091113. Periodicals (ISSN)
110 - Prefix: 977
111 - Used with EAN-2 for issue numbers
112 - Prefix: 977
113 - Used with EAN-2 for issue numbers
112114
113115[!NOTE] Image needed: Real-world application examples
114116
docs/api/barcode/EAN/EAN-2.mdmodified+33-29
Changes to docs/api/barcode/EAN/EAN-2.md
@@ -59,37 +59,40 @@ barcode('#barcode', '53', {
5959## Common Applications
6060
61611. Magazine Issues
62 - ```ts
63 // Issue 12 of a magazine
64 barcode('#barcode', '12', { format: 'EAN2' })
65 ```
62 ```ts
63 // Issue 12 of a magazine
64 barcode('#barcode', '12', { format: 'EAN2' })
65 ```
66
66672. Newspaper Editions
67 - ```ts
68 // Sunday edition (01)
69 barcode('#barcode', '01', { format: 'EAN2' })
70 ```
68 ```ts
69 // Sunday edition (01)
70 barcode('#barcode', '01', { format: 'EAN2' })
71 ```
72
71733. Version Indicators
72 - ```ts
73 // Version 2.0
74 barcode('#barcode', '20', { format: 'EAN2' })
75 ```
74 ```ts
75 // Version 2.0
76 barcode('#barcode', '20', { format: 'EAN2' })
77 ```
7678
7779[!NOTE] Image needed: Real-world application examples
7880
7981## Positioning Guidelines
8082
81831. Standard Placement
82 - Right-aligned with main barcode
83 - Specific gap width (9-12 modules)
84 - Baseline alignment with main barcode
84 - Right-aligned with main barcode
85 - Specific gap width (9-12 modules)
86 - Baseline alignment with main barcode
87
85882. Height Considerations
86 - ```ts
87 // Typically taller than main barcode
88 barcode('#barcode', '53', {
89 format: 'EAN2',
90 height: 85 // Compared to standard 70
91 })
92 ```
89 ```ts
90 // Typically taller than main barcode
91 barcode('#barcode', '53', {
92 format: 'EAN2',
93 height: 85 // Compared to standard 70
94 })
95 ```
9396
9497[!NOTE] Image needed: Positioning and alignment diagram
9598
@@ -112,14 +115,15 @@ barcode('#barcode', '53', {
112115## Best Practices
113116
1141171. Usage Guidelines
115 - Always use with main barcode
116 - Maintain standard spacing
117 - Use consistent height ratio
118 - Validate 2-digit input
119 - Consider scanner compatibility
118 - Always use with main barcode
119 - Maintain standard spacing
120 - Use consistent height ratio
121 - Validate 2-digit input
122 - Consider scanner compatibility
123
1201242. Common Patterns
121 - 00-09: Daily publications
122 - 10-99: Weekly/monthly publications
125 - 00-09: _Daily publications_
126 - 10-99: _Weekly/monthly publications_
123127
124128## Technical Notes
125129
docs/api/barcode/EAN/EAN-5.mdmodified+25-22
Changes to docs/api/barcode/EAN/EAN-5.md
@@ -58,19 +58,21 @@ barcode('#barcode', '54495', {
5858## Common Applications
5959
60601. **Book Pricing**
61 - Currency indicator (0-7: GBP, 8: USD, 9: AUD)
62 - Price value
61 - Currency indicator (0-7: GBP, 8: USD, 9: AUD)
62 - Price value
63
63642. **Magazine Pricing**
64 - Issue number
65 - Price information
65 - Issue number
66 - Price information
67
66683. **Currency Encoding** Example codes:
67 - ```ts
68 // £5.99 in GBP
69 barcode('#barcode', '05991', { format: 'EAN5' })
69 ```ts
70 // £5.99 in GBP
71 barcode('#barcode', '05991', { format: 'EAN5' })
7072
71 // $15.95 in USD
72 barcode('#barcode', '81595', { format: 'EAN5' })
73 ```
73 // $15.95 in USD
74 barcode('#barcode', '81595', { format: 'EAN5' })
75 ```
7476
7577[!NOTE] Image needed: Currency encoding examples
7678
@@ -80,14 +82,15 @@ barcode('#barcode', '54495', {
8082 - Right-aligned with main barcode
8183 - Standard gap between main barcode
8284 - Same baseline alignment
85
83862. **Height Options**
84 - ```ts
85 // Taller than main barcode
86 barcode('#barcode', '54495', {
87 format: 'EAN5',
88 height: 85 // Compared to standard 70
89 })
90 ```
87 ```ts
88 // Taller than main barcode
89 barcode('#barcode', '54495', {
90 format: 'EAN5',
91 height: 85 // Compared to standard 70
92 })
93 ```
9194
9295[!NOTE] Image needed: Positioning visualization
9396
@@ -117,10 +120,10 @@ barcode('#barcode', '54495', {
117120
118121## Technical Notes
119122
1201. No check digit used
1212. Must be 5 digits exactly
1223. Cannot be used standalone
1234. Scanner must support add-ons
1245. Standard right-alignment required
123- No check digit used
124- Must be 5 digits exactly
125- Cannot be used standalone
126- Scanner must support add-ons
127- Standard right-alignment required
125128
126129[!NOTE] Image needed: Technical specifications diagram
docs/api/barcode/EAN/EAN-8.mdmodified+7-6
Changes to docs/api/barcode/EAN/EAN-8.md
@@ -85,13 +85,14 @@ barcode('#barcode')
8585## Common Applications
8686
87871. Small Products
88 - Confectionery
89 - Cosmetics
90 - Small electronics
88 - Confectionery
89 - Cosmetics
90 - Small electronics
91
91922. Space-Limited Packaging
92 - Travel-size products
93 - Small containers
94 - Limited label space
93 - Travel-size products
94 - Small containers
95 - Limited label space
9596
9697[!NOTE] Image needed: Real-world application examples
9798
docs/api/barcode/EAN/UPC-A.mdadded+195-0
Changes to docs/api/barcode/EAN/UPC-A.md
@@ -0,0 +1,195 @@
1# UPC-A
2
3UPC-A (Universal Product Code) is the standard barcode format for retail products in North America. It consists of 12 digits and is technically a subset of EAN-13 (with a leading zero).
4
5## Basic Usage
6
7```ts
8import { barcode } from '@stacksjs/qrx'
9
10barcode('#barcode', '123456789012', { format: 'UPC' })
11```
12
13[!NOTE] Image needed: Basic UPC-A barcode example
14
15## Structure
16
17A UPC-A barcode consists of:
18
19- First digit: Number system digit
20- Next 5 digits: Manufacturer code
21- Next 5 digits: Product code
22- Last digit: Check digit (automatically calculated)
23
24## Auto Check Digit
25
26The check digit is automatically calculated if omitted:
27
28```ts
29import { barcode } from '@stacksjs/qrx'
30
31// These generate the same barcode
32barcode('#barcode', '12345678901', { format: 'UPC' }) // Auto-calculates check digit
33barcode('#barcode', '123456789012', { format: 'UPC' }) // Manual check digit
34```
35
36## Flat Mode
37
38Remove guard bars for special applications:
39
40```ts
41import { barcode } from '@stacksjs/qrx'
42
43barcode('#barcode', '123456789012', {
44 format: 'UPC',
45 flat: true
46})
47```
48
49[!NOTE] Image needed: UPC-A flat mode example
50
51## Advanced Options
52
53```ts
54import { barcode } from '@stacksjs/qrx'
55
56barcode('#barcode', '123456789012', {
57 format: 'UPC',
58 width: 2,
59 height: 100,
60 displayValue: true,
61 font: 'OCRB',
62 fontSize: 18,
63 textMargin: 0,
64 flat: false,
65 guardHeight: 15 // Height of guard bars
66})
67```
68
69## Guarded Encoding
70
71The standard way of printing UPC-A with guard bars:
72
73```ts
74import { barcode } from '@stacksjs/qrx'
75
76barcode('#barcode', '123456789012', {
77 format: 'UPC',
78 guardHeight: 15
79})
80```
81
82[!NOTE] Image needed: Example showing guard bars
83
84## Add-on Support
85
86Combine with EAN-2 or EAN-5 supplemental barcodes:
87
88```ts
89import { barcode } from '@stacksjs/qrx'
90
91barcode('#barcode')
92 .UPC('123456789012')
93 .blank(20)
94 .EAN5('12345', {
95 height: 85,
96 textPosition: 'top'
97 })
98 .render()
99```
100
101[!NOTE] Image needed: UPC-A with add-on example
102
103## Number System Digits
104
105The first digit has special meaning:
106
107- 0: Regular UPC codes
108- 1: Reserved
109- 2: Weight items marked at the store
110- 3: National Drug Code/Health Related
111- 4: Non-food items with no code format restrictions
112- 5: Coupons
113- 6: Reserved
114- 7: Regular UPC codes
115- 8: Reserved
116- 9: Reserved
117
118```ts
119// Example of a pharmaceutical product
120barcode('#barcode', '312345678912', { format: 'UPC' })
121
122// Example of a weighted item
123barcode('#barcode', '212345678912', { format: 'UPC' })
124```
125
126## Error Handling
127
128```ts
129import { barcode } from '@stacksjs/qrx'
130
131barcode('#barcode', '123456789012', {
132 format: 'UPC',
133 valid: (valid) => {
134 if (!valid) {
135 console.error('Invalid UPC-A')
136 // Handle invalid input
137 }
138 }
139})
140```
141
142## Best Practices
143
1441. **Input Validation**
145 - Validate length (11-12 digits)
146 - Verify number system digit
147 - Check manufacturer code validity
148
1492. **Printing Guidelines**
150 - Minimum size requirements
151 - Quiet zone specifications
152 - Print quality standards
153
1543. **Scanner Compatibility**
155 - Test with multiple scanners
156 - Verify add-on compatibility
157 - Check guard bar recognition
158
159## Technical Notes
160
1611. **Size Requirements**
162 - Nominal size: 37.29mm × 25.91mm
163 - Magnification range: 80% to 200%
164 - Minimum bar width: 0.264mm
165 - Minimum quiet zone: 9mm
166
1672. **Conversion to EAN-13**
168 ```ts
169 // UPC-A
170 barcode('#barcode', '123456789012', { format: 'UPC' })
171
172 // Equivalent EAN-13
173 barcode('#barcode', '0123456789012', { format: 'EAN13' })
174 ```
175
176[!NOTE] Image needed: Technical specifications diagram
177
178## Common Applications
179
1801. **Retail Products**
181 - Consumer goods
182 - Point of sale scanning
183 - Inventory management
184
1852. **Grocery Items**
186 - Fixed weight products
187 - Variable weight items
188 - In-store marked items
189
1903. **Healthcare Products**
191 - Pharmaceuticals
192 - Medical supplies
193 - Health-related items
194
195[!NOTE] Image needed: Real-world application examples
docs/api/barcode/EAN/UPC-E.mdadded+168-0
Changes to docs/api/barcode/EAN/UPC-E.md
@@ -0,0 +1,168 @@
1# UPC-E
2
3UPC-E is a zero-suppressed version of UPC-A, designed for smaller packages. It's also known as "zero compressed" UPC because it reduces a 12-digit UPC-A code into 8 digits by suppressing trailing zeros.
4
5## Basic Usage
6
7```ts
8import { barcode } from '@stacksjs/qrx'
9
10barcode('#barcode', '01234565', { format: 'UPCE' })
11```
12
13[!NOTE] Image needed: Basic UPC-E barcode example
14
15## Structure
16
17UPC-E has special compression rules:
18
19- First digit must be 0 or 1
20- Last digit is a check digit
21- Middle 6 digits follow compression patterns
22
23## Compression Patterns
24
25UPC-E compresses UPC-A codes that end in zeros. The compression patterns are:
26
27| UPC-E | Expands to (UPC-A) | Pattern |
28|-----------|---------------------|------------|
29| 0123400 | 012340000000 | XX000-00YYY |
30| 0123400 | 012300000004 | XX100-00YYY |
31| 0123400 | 012200000003 | XX200-00YYY |
32| 0123400 | 012300000000 | XXX00-000Y |
33| 0123400 | 012340000000 | XXXX0-0000 |
34| 0123400 | 012345000000 | XXXXX-0005 |
35| 0123400 | 012345600000 | XXXXX-0006 |
36| 0123400 | 012345700000 | XXXXX-0007 |
37| 0123400 | 012345800000 | XXXXX-0008 |
38| 0123400 | 012345900000 | XXXXX-0009 |
39
40## Basic Encoding
41
42```ts
43import { barcode } from '@stacksjs/qrx'
44
45// Direct UPC-E number
46barcode('#barcode', '01234565', { format: 'UPCE' })
47
48// With number system and check digit
49barcode('#barcode', '01234565', { format: 'UPCE' })
50```
51
52## Advanced Options
53
54```ts
55import { barcode } from '@stacksjs/qrx'
56
57barcode('#barcode', '01234565', {
58 format: 'UPCE',
59 width: 2,
60 height: 100,
61 displayValue: true,
62 font: 'OCRB',
63 fontSize: 18,
64 textMargin: 0,
65 flat: false,
66 guardHeight: 15
67})
68```
69
70## Conversion Examples
71
72```ts
73import { barcode } from '@stacksjs/qrx'
74
75// These UPC-A numbers compress to the same UPC-E
76barcode('#barcode', '01200000345', { format: 'UPCE' }) // -> 01234565
77barcode('#barcode', '01234500005', { format: 'UPCE' }) // -> 01234565
78```
79
80[!NOTE] Image needed: Conversion visualization
81
82## Add-on Support
83
84```ts
85import { barcode } from '@stacksjs/qrx'
86
87barcode('#barcode')
88 .UPCE('01234565')
89 .blank(20)
90 .EAN2('12', {
91 height: 85,
92 textPosition: 'top'
93 })
94 .render()
95```
96
97[!NOTE] Image needed: UPC-E with add-on example
98
99## Error Handling
100
101```ts
102import { barcode } from '@stacksjs/qrx'
103
104barcode('#barcode', '01234565', {
105 format: 'UPCE',
106 valid: (valid) => {
107 if (!valid) {
108 console.error('Invalid UPC-E')
109 // Handle invalid input
110 }
111 }
112})
113```
114
115## Best Practices
116
1171. **Validation Rules**
118 - First digit must be 0 or 1
119 - Must follow compression patterns
120 - Check digit must be valid
121 - Total length must be 6 or 8 digits
122
1232. **Printing Guidelines**
124 - Maintain minimum size requirements
125 - Ensure quiet zones
126 - Use OCR-B font
127 - Test scanner compatibility
128
129## Technical Notes
130
1311. **Size Specifications**
132 - Nominal size: 22.11mm × 25.91mm
133 - Magnification: 80% to 200%
134 - Minimum bar width: 0.264mm
135 - Quiet zones: 7x module width
136
1372. **Conversion Guidelines**
138 - Not all UPC-A codes can be compressed
139 - Only specific patterns are valid
140 - Maintain original UPC-A for reference
141
142[!NOTE] Image needed: Technical specifications diagram
143
144## Comparison with UPC-A
145
146```ts
147// UPC-A original
148barcode('#barcode', '012000003456', { format: 'UPC' })
149
150// UPC-E compressed equivalent
151barcode('#barcode', '01234565', { format: 'UPCE' })
152```
153
154[!NOTE] Image needed: Side-by-side comparison of UPC-A and UPC-E
155
156## Common Applications
157
1581. **Small Packages**
159 - Travel-size products
160 - Small cosmetics
161 - Limited label space
162
1632. **Special Products**
164 - Zero-suppressed items
165 - Space-constrained labels
166 - Small retail items
167
168[!NOTE] Image needed: Real-world application examples
docs/api/barcode/EAN/index.mdmodified+1-1
Changes to docs/api/barcode/EAN/index.md
@@ -1,6 +1,6 @@
11# EAN & UPC Barcodes
22
3EAN (European Article Number) and UPC (Universal Product Code) are standardized barcodes used worldwide for retail products. These barcode systems are managed by GS1 and are crucial for product identification in retail environments.
3EAN _(European Article Number)_ and UPC _(Universal Product Code)_ are standardized barcodes used worldwide for retail products. These barcode systems are managed by GS1 and are crucial for product identification in retail environments.
44
55## Supported Formats
66