Repository navigation
feat(registry): add Maxicode (^BV) 2D barcode support - #102
Merged
Merged
Conversation
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.
There was a problem hiding this comment.
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.
# Conflicts: # src/components/Properties/PropertiesPanel.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.