Skip to content

Commit b875183

Browse files
committed
chore: comment drift cleanup
Repo-wide audit dropped stale claims, broken refs, em-dashes, and verbose multi-paragraph blocks across 162 files (~2200 net comment lines deleted, JSDoc density down 60%). Preserved spec citations, bug workarounds, and cross-field invariants where the rationale would otherwise be lost. Three small fixes surfaced along the way: ^FP registry status corrected from unsupported to supported, ^DF/^XF wording aligned with the actual generator output, and ^LR comment matched to spec persistence semantics.
1 parent 7cc349e commit b875183

162 files changed

Lines changed: 890 additions & 3118 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎src/components/Canvas/BarcodeObject.tsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export function BarcodeObject({
7878
let barcodeCanvas: HTMLCanvasElement | null = null;
7979
let errorMsg: string | null = null;
8080
if (obj.type === "tlc39") {
81-
// bwip-js has no native tlc39 encoder; render the Code 39 + MicroPDF417
81+
// bwip-js has no native tlc39 encoder, render the Code 39 + MicroPDF417
8282
// composite ourselves. Goes straight to canvas, bypassing buildBwipOptions.
8383
barcodeCanvas = renderTlc39Canvas(obj.props, scale, dpmm);
8484
if (!barcodeCanvas) errorMsg = "TLC39 render failed";
@@ -188,7 +188,7 @@ export function BarcodeObject({
188188
// selectively skips bwip's internal padding (e.g. GS1 DataBar's
189189
// paddingheight rows) so bars fill the bbox at firmware-correct height.
190190
const bitmapCrop = dim.bitmapCrop;
191-
// Force-off when the symbology has no HRI in ZPL (e.g. GS1 Databar) — the
191+
// Force-off when the symbology has no HRI in ZPL (e.g. GS1 Databar); the
192192
// canvas must match the print output even if a legacy saved object still
193193
// carries printInterpretation: true.
194194
const rotation = objectRotation(obj.props);
@@ -268,15 +268,15 @@ export function BarcodeObject({
268268
});
269269
// EAN/UPC have barTopPx === 0 (no text zone above), so the
270270
// helper's bar-relative textY equals the bbox-relative one
271-
// here — render directly without an offset wrapper.
271+
// here; render directly without an offset wrapper.
272272
overlayContent = eanOverlay.nodes;
273273
} else {
274274
// Other 1D: single centered text. textRef is wired only for the
275275
// upright case so handleTransform/End can counter-scale it; for
276276
// rotated paths the counter-scale math doesn't apply (would
277277
// scale along upright-Y which after R/B is screen-X), so the
278278
// ref stays undefined and the bars+text just scale together
279-
// during a rotated resize drag — minor visual nit, no broken
279+
// during a rotated resize drag, a minor visual nit with no broken
280280
// print output.
281281
// Compensate Courier's em-bottom padding only on the ink-height path.
282282
const inkShiftPx = hri?.fontDots ? textFontSize * COURIER_BOLD_EM_BOTTOM_PAD : 0;
@@ -323,7 +323,7 @@ export function BarcodeObject({
323323
txt.y(textLocalY(1));
324324
};
325325

326-
// Clip-expansion is upright-EAN/UPC only; absent on other paths
326+
// Clip-expansion is upright-EAN/UPC only, absent on other paths
327327
// so Konva computes a natural bbox. Spread-or-empty keeps the
328328
// JSX free of four parallel ternaries.
329329
const clipProps = isUprightEanUpc && eanOverlay

‎src/components/Canvas/Grid.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function Grid({
3030
const right = labelOffsetX + labelWidthPx;
3131
const bottom = labelOffsetY + labelHeightPx;
3232

33-
// Snap grid (primary — always visible, matches snap interval)
33+
// Snap grid (primary; always visible, matches snap interval)
3434
for (let x = labelOffsetX + snapPx; x < right; x += snapPx) {
3535
lines.push(
3636
<Line key={`vs-${x}`} points={[x, labelOffsetY, x, bottom]}

‎src/components/Canvas/GuideLines.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Group, Line } from 'react-konva';
22
import type { SnapGuide } from '../../lib/snapGuides';
33

4-
// Soft indigo — visible on white labels without being aggressive
4+
// Soft indigo; visible on white labels without being aggressive
55
const COLOR = '#818cf8';
66
const TICK = 4; // half-length of tick marks on spacing guides
77

‎src/components/Canvas/ImageObject.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type Props = Omit<KonvaObjectProps, "obj"> & { obj: ImageLabelObject };
1313
/** Image renderer. Hosted as its own component so hooks (useState/
1414
* useEffect for async image loading) can run without violating
1515
* rules-of-hooks. The dispatcher in KonvaObject narrows `obj`
16-
* before passing — no runtime cast needed here. */
16+
* before passing; no runtime cast needed here. */
1717
export function ImageObject({
1818
obj,
1919
scale,
@@ -31,7 +31,7 @@ export function ImageObject({
3131
const w = dotsToPx(p.widthDots, scale, dpmm);
3232
// Aspect-lock when a real PNG is cached; fall back to `heightDots` for
3333
// recall-only placeholders so the user can shape the box freely. Guard
34-
// against 0-width cached images (malformed file edge case) — div-by-
34+
// against 0-width cached images (malformed file edge case); div-by-
3535
// zero would otherwise render NaN-sized canvas nodes.
3636
const h = cached && cached.width > 0
3737
? w * (cached.height / cached.width)

‎src/components/Canvas/KonvaObject.tsx‎

Lines changed: 41 additions & 185 deletions
Large diffs are not rendered by default.

‎src/components/Canvas/LabelCanvas.tsx‎

Lines changed: 34 additions & 145 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)