All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.2.0 - 2026-08-06
Changed
Breaking — configuration consolidated under a single key. All library configuration now lives under the
ExBoxPackerapplication-config key, with nestedpreview:/broadcast:sub-keywords, read through the newExBoxPacker.Confighelper.Upgrade — replace the old preview key:
# before config :ex_box_packer, ExBoxPacker.Preview, enabled: true # after config :ex_box_packer, ExBoxPacker, preview: [enabled: true]
Added
- Config-driven event broadcasting (
ExBoxPacker.Broadcast). When a:broadcast_topicis passed toExBoxPacker.Packer.pack/3orpack_all_possible/3and abroadcast:config is set, packing emits:started,:box_packed(one per box, in placement order), and:doneevents — published to an Absinthe subscription viaAbsinthe.Subscription.publish/3. No callbacks; it is entirely config-driven. Adds an optional:absinthedependency, guarded so aniltopic or absent config makes it a cheap no-op — existingpack/2,3callers are unaffected. ExBoxPacker.Config— reader for the consolidated config (preview/0,broadcast/0).ExBoxPacker.Broadcast.Event— the streamed event struct (:started/:box_packed/:done, carrying the packed box or summary).:broadcast_topicoption onExBoxPacker.Packer.pack/3andpack_all_possible/3.
0.1.0 - 2026-07-27
Initial release: a feature-complete, faithful Elixir port of BoxPacker (PHP, v4.2.0).
Added
- Domain layer.
ExBoxPacker.Item/ExBoxPacker.Boxprotocols with the built-inExBoxPacker.SimpleItemandExBoxPacker.SimpleBoxstructs, integer-only geometry,ExBoxPacker.Rotationmodes (:never,:keep_flat,:best_fit), pluggable sorters (ItemSorter,BoxSorter,PackedBoxSorterwith default implementations), and thePacked*result structs (PackedBox,PackedBoxList,PackedItem,PackedItemList). - Single-box packing.
ExBoxPacker.Engine.VolumePackerarranges items within one box — orthogonal rotation, per-box weight limits, layer packing, and stability. - Multi-box selection.
ExBoxPacker.Packer.pack/2,pack!/2, andpack_all_possible/2perform greedy catalog box selection, choosing the fewest boxes to hold all items. - Weight redistribution. Post-pack rebalancing of item weight across boxes for more even parcels.
- Constraints and extension protocols:
- Limited box supply via
ExBoxPacker.LimitedSupplyBox(boxes are used only up to their available quantity; unimplemented boxes are treated as unlimited). - Constrained placement via
ExBoxPacker.ConstrainedPlacementItem(per-placement rules such as max-quantity-per-box or no-stacking). - Linked item groups via
ExBoxPacker.LinkedItem(members of a named group are never split across boxes). - Packing timeout via the
:timeoutoption, raisingExBoxPacker.TimeoutErroronce the deadline is exceeded.
- Limited box supply via