energy-label
energy-label
v1.0.0Published MIT
Generate EU-compliant energy labels in SVG format.
npm i energy-labelchangelog
v1.0.0
View on GitHubBug Fixes
- Add fallback font stacks to SVG templates (fa35528)
- Correct incorrect battery endurance variable name (a21f8cd)
- Correct types for
createEnergyLabelfunction (6271aaf) - Display battery cycle count as numeric data (dc0a765)
- docs: Correct input field names (584b121)
- docs: Correct installed version of
energy-labeldependency (2aa3e49) - docs: Correct URL for Open Graph image (b0b966d)
- Draw QR code as vector path (b8d0e95)
- Ensure unique SVG IDs across labels (d27b753)
- Escape user input in SVG labels and URLs (3a1e0c2)
- Hide missing fridge or freezer compartments (2638de6)
- Link QR codes to product groups without registration numbers (dedaf18)
- Move SVGO to dev dependencies (a1e0d92)
- Position A–E scale without alignment-baseline (6dccaa9)
- Preserve ID attributes on SVG optimization (e43be13)
- Redefine SVG structure for the UK flag (200b037)
- Remove CommonJS export (20cc971)
- Remove SVG IDs for deterministic label markup (22dec9a)
- Remove test item from EU regulations (95571e5)
- Rename mask IDs in flagUK to avoid collision (80db062)
- Restrict class fields to regulation values (d777be2)
- Show battery cycles from EPREL hundreds (5f58f56)
- Simplify arrow efficiency label rendering (3e54bfa)
- smartphones: Adjust battery display and adds regulation number (59d7483)
- template: Improve handling of battery endurance values (bfa7026)
- template: Refine battery endurance type for data consistency (653d8ee)
- templates: Allows null capFreezeNet values (0080adf)
- template: Swap chill and frozen volume display (3530522)
- Type template factories by name (230a6e0)
- Update QR code generation with product-specific URLs (54318c1)
- Validate classes and flag origin (a097256)
Features
- Add
PRODUCT_GROUPSconstant and exports it (0a732d8) - Add fridge and freezer support and type definitions (f1179a5)
- Add image generation for efficiency class arrows (8af2eb3)
- Add label orientation to
ArrowTemplate(b0d4995) - Add render functions to bundle single labels (358268c)
- Add strict energy class type definitions (1c98c28)
- Add support for products sold in Great Britain (3edfff7)
- Align data interfaces with EPREL Public API (240e649)
- Extract DOM manipulation to utility functions (8bdc671)
- Integrate
svgofor SVG optimization (751afc0) - Introduce createClassArrow function to factories (7a5f579)
- Introduce template for smartphones and tablets (028ce94)
- Make API more intuitive and update documentation (7f4fce6)
- Match official EPREL QR codes (fed6590)
- Remove async from toString calls (cb7bd25)
- Rename
generateSVGStringtogenerateLabel(2c2f0fd) - Simplify SVG appending logic (86c876d)
- template: Optimize SVG output formatting (25853a6)
- Update EnergyLabelOptions interface (4de9e6d)
- Use human readable identifiers for templates (8211ef0)
Performance Improvements
- Optimize SVG template markup (e674382)
v1.0.0-beta.15
pre-release
View on GitHubBug Fixes
- Position A–E scale without alignment-baseline (6dccaa9)
v1.0.0-beta.14
pre-release
View on GitHubFeatures
- Add render functions to bundle single labels (358268c)
v1.0.0-beta.13
pre-release
View on GitHubBug Fixes
- Draw QR code as vector path (b8d0e95)
- Hide missing fridge or freezer compartments (2638de6)
- Remove SVG IDs for deterministic label markup (22dec9a)
- Restrict class fields to regulation values (d777be2)
- Show battery cycles from EPREL hundreds (5f58f56)
- Validate classes and flag origin (a097256)
Features
- Match official EPREL QR codes (fed6590)
v1.0.0-beta.12
pre-release
View on GitHubBug Fixes
- Add fallback font stacks to SVG templates (fa35528)
- Display battery cycle count as numeric data (dc0a765)
- Ensure unique SVG IDs across labels (d27b753)
- Escape user input in SVG labels and URLs (3a1e0c2)
- Link QR codes to product groups without registration numbers (dedaf18)
- Move SVGO to dev dependencies (a1e0d92)
- Simplify arrow efficiency label rendering (3e54bfa)
- Type template factories by name (230a6e0)
Performance Improvements
- Optimize SVG template markup (e674382)
v1.0.0-beta.11
pre-release
View on GitHubv1.0.0-beta.10
pre-release
View on GitHubv1.0.0-beta.9
pre-release
View on GitHubv1.0.0-beta.8
pre-release
View on GitHubBug Fixes
- template: Swap chill and frozen volume display (3530522)
v1.0.0-beta.7
pre-release
View on GitHubFeatures
- Add label orientation to
ArrowTemplate(b0d4995)
- Add label orientation to
v1.0.0-beta.6
pre-release
View on GitHubv1.0.0-beta.5
pre-release
View on GitHubFeatures
- Introduce template for smartphones and tablets (028ce94)
v1.0.0-beta.4
pre-release
View on GitHubv1.0.0-beta.3
pre-release
View on GitHubv1.0.0-beta.2
pre-release
View on GitHubv1.0.0-beta.1
pre-release
View on GitHubFeatures
- Integrate
svgofor SVG optimization (751afc0)
- Integrate
