ReviewOS

also looking at this

stacks/ts-qr-codes

chore(deps): update dependency react-dom to 19.2.7

#2138
Closed chris wants to merge buddy-bot/update-major-update-react-dom 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/EAN5.mdadded+126-0
Changes to docs/api/barcode/EAN/EAN5.md
@@ -0,0 +1,126 @@
1# EAN-5
2
3EAN-5 is a supplemental barcode that adds 5 additional digits to EAN-13 or UPC barcodes. It's commonly used for encoding the price of books and periodicals.
4
5## Basic Usage
6
7```ts
8import { barcode } from '@stacksjs/qrx'
9
10barcode('#barcode', '54495', { format: 'EAN5' })
11```
12
13[!NOTE] Image needed: Basic EAN-5 barcode example
14
15## Structure
16
17An EAN-5 barcode consists of:
18
19- 5 digits total
20- No check digit
21- Must be used as a supplement to EAN-13 or UPC
22
23## Common Usage with EAN-13
24
25```ts
26import { barcode } from '@stacksjs/qrx'
27
28barcode('#barcode')
29 .EAN13('9781234567897')
30 .blank(20)
31 .EAN5('54495', {
32 height: 85,
33 textPosition: 'top',
34 fontSize: 16
35 })
36 .render()
37```
38
39[!NOTE] Image needed: EAN-13 with EAN-5 supplement example
40
41## Customization Options
42
43```ts
44import { barcode } from '@stacksjs/qrx'
45
46barcode('#barcode', '54495', {
47 format: 'EAN5',
48 width: 2,
49 height: 85,
50 displayValue: true,
51 font: 'OCRB',
52 fontSize: 16,
53 textMargin: 0,
54 textPosition: 'top'
55})
56```
57
58## Common Applications
59
601. **Book Pricing**
61 - Currency indicator (0-7: GBP, 8: USD, 9: AUD)
62 - Price value
632. **Magazine Pricing**
64 - Issue number
65 - Price information
663. **Currency Encoding** Example codes:
67 - ```ts
68 // £5.99 in GBP
69 barcode('#barcode', '05991', { format: 'EAN5' })
70
71 // $15.95 in USD
72 barcode('#barcode', '81595', { format: 'EAN5' })
73 ```
74
75[!NOTE] Image needed: Currency encoding examples
76
77## Positioning Guidelines
78
791. **Placement**
80 - Right-aligned with main barcode
81 - Standard gap between main barcode
82 - Same baseline alignment
832. **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 ```
91
92[!NOTE] Image needed: Positioning visualization
93
94## Error Handling
95
96```ts
97import { barcode } from '@stacksjs/qrx'
98
99barcode('#barcode', '54495', {
100 format: 'EAN5',
101 valid: (valid) => {
102 if (!valid) {
103 console.error('Invalid EAN-5')
104 // Handle invalid input
105 }
106 }
107})
108```
109
110## Best Practices
111
1121. Always use with main barcode
1132. Maintain proper spacing
1143. Consider height differential
1154. Validate 5-digit input
1165. Use standard encoding for currency
117
118## Technical Notes
119
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
125
126[!NOTE] Image needed: Technical specifications diagram