# Changelog

All notable changes to DMD will be documented in this file.

## [1.0.8] - 2026-04-16

### Fixed
- Image width/height styles are no longer overridden by column width when an image (or SVG/QR) is the sole content of a `::column` cell. Previously the column's `width: '*'` stomped the image's intrinsic sizing.
- Trailing `|` in `::column` blocks now produces an explicit empty trailing column (symmetric with leading `|`). Previously the trailing column was dropped unless it contained non-whitespace content.

---

## [1.0.7] - 2026-03-26

### Fixed
- Column widths from `:::styles` block now correctly applied to columns
- License validation now works in Web Worker environments (proper domain detection)

---

## [1.0.6] - 2026-03-18

### Added
- Support for 6 heading levels (`#` through `######`) instead of 3
- New config options for page margins: `headerHeight`, `footerHeight`, `marginTop`, `marginBottom`, `marginLeft`, `marginRight`

### Fixed
- Images in `::header` and `::footer` blocks now resolve correctly
- Blockquotes and tables in headers/footers now render with DMD default styles (headers changed to functions for pdfmake layout compatibility)

---

## [1.0.5] - 2026-03-15

### Added
- Better error messages and warnings for common mistakes:
  - Unclosed block detection (`::block` without closing `::`)
  - Invalid style reference warnings (style not defined in `:::styles`)
  - Unrecognized bracket syntax warnings (`[text]{invalid}`)
  - Table structure validation (inconsistent column counts, empty tables)
  - Column syntax ambiguity warnings (multi-line without separators)

### Fixed
- Font fallback now properly replaces custom fonts with Roboto in free edition (prevents pdfmake "font not defined" error)

---

## [1.0.4] - 2026-03-14

### Fixed
- Node.js `require('dmd-to-pdf')` now works correctly (was returning empty object due to ESM/CJS conflict)
- Bundle now outputs both `.cjs` (Node.js) and `.js` (Browser/CDN) files

---

## [1.0.3] - 2026-03-14

### Added
- Default 15pt gap between columns (`columnGap: 15`) so content doesn't touch. Users can override via `columnGap` in `:::styles`.

### Fixed
- `transparent` color value now works correctly in table and blockquote styles (was rendering as black)
- Inline styled text (`[text]{::style}`) now correctly applies layout properties like `absolutePosition` and `relativePosition`
- Style assignment on `::header:style-name` and `::footer:style-name` now works correctly

---

## [1.0.0] - 2026-03-13

First stable release.

### Features
- DMD markup language for PDF generation
- Works in Browser and Node.js environments
- Runtime license validation (Pro/Free tiers)
- 114 Google Fonts available via CDN (Pro)
- Custom font loading with `DMD.loadFonts()` (Pro)
- Image preloading with `DMD.loadImages()`
- Tables, lists, headings, paragraphs
- Watermarks, headers, footers (Pro)
- QR codes, table of contents (Pro)
- Block and inline styling (Pro)
- Page breaks and column layouts

### API
- `DMD.createPdf(source, format)` - Generate PDF (blob, base64, dataUrl, stream)
- `DMD.loadFonts(fontMap)` - Pre-load custom fonts
- `DMD.loadImages(imageMap)` - Pre-load images
- `DMD.setLicense(key)` - Activate Pro features
- `DMD.isPro()` - Check license status
- `DMD.extractConfig(source)` - Extract document metadata

---

## Pre-release History (0.x)

Development versions from 0.1.0 to 0.1.9 were used for testing and iteration.
Key milestones:
- 0.1.0: Initial release
- 0.1.4: Runtime license system
- 0.1.9: Node.js/Lambda compatibility fixes
