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/Codabar.mdmodified+131-4
Changes to docs/api/barcode/Codabar.md
@@ -1,10 +1,8 @@
11# Codabar
22
3Codabar is an old barcode type that can encode numbers and a number of special characters (`–`, `$`, `:`, `/`, `+`, `.`).
3Codabar _(also known as Code 2 of 7, USD-4, or NW-7)_ is a linear barcode format developed in 1972. While considered legacy technology, it's still commonly used in libraries, blood banks, and some logistics applications. It can encode numbers and specific special characters (`–`, `$`, `:`, `/`, `+`, `.`).
44
5You can set start and stop characters to `A`, `B`, `C` or `D` but if no start and stop character is defined `A` will be used.
6
7## Example
5## Basic Usage
86
97```ts
108import { barcode } from '@stacksjs/qrx'
@@ -16,6 +14,10 @@ barcode('#barcode', '1234567890', {
1614
1715![CodabarBarcode](http://i.imgur.com/nzAVIl3.png)
1816
17## Start/Stop Characters
18
19You can specify start and stop characters (`A`, `B`, `C`, or `D`). If not specified, `A` is used by default:
20
1921```ts
2022import { barcode } from '@stacksjs/qrx'
2123
@@ -25,3 +27,128 @@ barcode('#barcode', 'C1234567890D', {
2527```
2628
2729![CodabarBarcode](http://i.imgur.com/TEdMAqp.png)
30
31## Character Set
32
33Codabar supports:
34- Numbers (0-9)
35- Special characters: `-`, `$`, `:`, `/`, `+`, `.`
36- Start/Stop characters: `A`, `B`, `C`, `D`
37
38## Advanced Options
39
40```ts
41import { barcode } from '@stacksjs/qrx'
42
43barcode('#barcode', 'A1234-5678.90B', {
44 format: 'codabar',
45 width: 2,
46 height: 100,
47 displayValue: true,
48 font: 'monospace',
49 fontSize: 20,
50 textAlign: 'center',
51 textPosition: 'bottom',
52 textMargin: 2,
53 background: '#ffffff',
54 lineColor: '#000000'
55})
56```
57
58[!NOTE] Image needed: Advanced options example
59
60## Common Applications
61
621. **Blood Banks**
63 ```ts
64 barcode('#barcode', 'A1234567B', { format: 'codabar' }) // Blood type labeling
65 ```
66
672. **Libraries**
68 ```ts
69 barcode('#barcode', 'A123-456+789B', { format: 'codabar' }) // Book tracking
70 ```
71
723. **Photo Labs**
73 ```ts
74 barcode('#barcode', 'C12345/678D', { format: 'codabar' }) // Photo processing
75 ```
76
77[!NOTE] Image needed: Real-world application examples
78
79## Error Handling
80
81```ts
82import { barcode } from '@stacksjs/qrx'
83
84barcode('#barcode', 'A123456B', {
85 format: 'codabar',
86 valid: (valid) => {
87 if (!valid) {
88 console.error('Invalid Codabar')
89 // Handle invalid input
90 }
91 }
92})
93```
94
95## Best Practices
96
971. **Start/Stop Characters**
98 - Always use matching pairs (AA, BB, CC, DD)
99 - Be consistent across system
100 - Consider scanner configuration
101
1022. **Data Validation**
103 ```ts
104 // Valid examples
105 barcode('#barcode', 'A1234-5678B') // Numbers and hyphen
106 barcode('#barcode', 'C1234:5678D') // Numbers and colon
107 barcode('#barcode', 'A12.34+56/78A') // Multiple special chars
108 ```
109
1103. **Print Quality**
111 - Maintain adequate quiet zones
112 - Test with target scanners
113 - Verify contrast ratios
114
115## Technical Specifications
116
117- Variable length format
118- Self-checking capability
119- No check digit (but can be added)
120- Bi-directional reading
121- Wide/narrow bar ratio: 1:2.25 to 1:3
122
123[!NOTE] Image needed: Technical specifications diagram
124
125## Legacy System Integration
126
127```ts
128// Old system format
129barcode('#barcode', 'A1234B')
130
131// Modern alternative (Code 128)
132barcode('#barcode', '1234', { format: 'CODE128' })
133```
134
135[!NOTE] Image needed: Comparison with modern formats
136
137## Advantages & Limitations
138
139### Advantages
140
141- Simple structure
142- Self-checking
143- Bi-directional reading
144- Special character support
145- Wide hardware support
146
147### Limitations
148
149- Low data density
150- No built-in check digit
151- Limited character set
152- Older technology
153
154[!NOTE] Image needed: Advantages/limitations comparison chart