Skip to content

feat(registry): add Maxicode (^BV) 2D barcode support - #102

Merged
u8array merged 2 commits into
mainfrom
feat/maxicode-bv
May 27, 2026
Merged

u8array merged 2 commits into
mainfrom
feat/maxicode-bv

Conversation

@u8array

@u8array u8array commented May 27, 2026

Copy link
Copy Markdown
Owner

No description provided.

Maxicode is the UPS shipping symbology — fixed-physical-size, mode-
parameterised 2D code. ZPL ^BVa,b,c,d encodes orientation, mode,
and structured-append indices.

This change adds:
  - registry entry with content, mode (2..6), rotation; no module
    magnification since the printer always renders the canonical
    physical size (heightLocked, no commitTransform)
  - bwip-js mapping + maxicode-specific buildBwipOptions case so the
    canvas renders the hexagonal bullseye preview
  - getDisplaySize case that converts the bwip bitmap back to stage-
    px instead of falling through the default (cw, ch) branch, so
    the bbox matches the printed dimensions
  - parser BV handler with the same fixed-size shape; clamps an
    out-of-range mode value to the safe default 4
  - per-line palette label + properties strings via the locale
    script for all 32 locales (en/de curated, others get a
    Maxicode-as-proper-noun + English mode label fallback)
  - emit + roundtrip tests

Structured append (multi-symbol composition via SCM modes 2/3) is
parsed but the editor pins emit to (1, 1), since we don't surface
SCM authoring yet.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for Maxicode, a fixed-physical-size 2D barcode symbology. It includes the registry definition, ZPL generation and parsing capabilities, localization updates across multiple languages, and a dry-run validation helper using an unattached canvas. The review feedback correctly points out a critical issue where validateMaxicodeBwip could cause a server-side rendering (SSR) crash because it accesses document without verifying if the environment is a browser.

Comment thread src/components/Canvas/bwipHelpers.ts
# Conflicts:
#	src/components/Properties/PropertiesPanel.tsx
@u8array
u8array merged commit 6aa45ad into main May 27, 2026
2 checks passed
@u8array
u8array deleted the feat/maxicode-bv branch May 28, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant