From a6c900367adaca6cb062b1a5386e2a7f6f4c8e90 Mon Sep 17 00:00:00 2001 From: Ma'sum Date: Sat, 29 Aug 2026 20:03:00 +0700 Subject: [PATCH] feat: overhaul DOCX visual styling with native tab-stop headers and update CLI test assertions --- .../src/content/docs/markforge/changelog.mdx | 17 +++++++++++++++++ packages/markforge/package.json | 2 +- packages/markforge/test/allProperties.test.ts | 2 -- packages/markforge/test/cli-e2e.test.ts | 1 + 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/apps/docs/src/content/docs/markforge/changelog.mdx b/apps/docs/src/content/docs/markforge/changelog.mdx index 2f0aed6..a80fb73 100644 --- a/apps/docs/src/content/docs/markforge/changelog.mdx +++ b/apps/docs/src/content/docs/markforge/changelog.mdx @@ -6,6 +6,23 @@ sidebar: description: Release history and version notes for @masumdev/markforge. --- +## [0.2.5] - 2026-08-29 + +### 🚀 Features & Enhancements + +- **Native Word Paragraph TabStops for Running Headers & Footers**: Replaced 3-column table headers and footers with native Microsoft Word OpenXML `TabStopType.CENTER` and `TabStopType.RIGHT` paragraph architecture. Eliminates 100% of table gridline boundaries/box outlines in LibreOffice Writer, Google Docs, and Microsoft Word when dividers are disabled. +- **Synchronized Header & Footer Divider Lines**: Solid horizontal separator lines render cleanly via `border.bottom` / `border.top` on Word paragraphs and fixed print dividers (`@media print`) on Chromium PDF. +- **DOCX Visual & Typography Overhaul**: + - **Cover & Title Area**: 22pt bold title, 12pt subtitle, and metadata row with bottom border. + - **Table of Contents (TOC) Card**: Auto-generated shaded card box (`#F8FAFC`, border `#E2E8F0`, header `TABLE OF CONTENTS`, indented H1-H3 in `primaryDark`). + - **Headings**: H1 with cyan solid bottom border (`#33CDCF`), H2 with subtle bottom border (`#E2E8F0`), and H3. + - **Paragraphs & Lists**: Charcoal `#334155` text with comfortable line spacing (`line: 280` / `260`). + - **Callout Alert Boxes**: 20pt left border in alert color, tinted background fill (`#ECFDFD`, `#ECFDF5`, etc.), bold badge `[NOTE]`, and padded body text. + - **Zebra Tables**: Shaded header `#F1F5F9` with `#CBD5E1` border and alternating rows (`#FFFFFF` and `#F8FAFC`). + - **Code Blocks**: Formatted table card with `#33CDCF` left accent border, `#F8FAFC` background, monospace `Consolas` text, and syntax token colors. + +--- + ## [0.2.4] - 2026-08-29 ### 🚀 Features & Enhancements diff --git a/packages/markforge/package.json b/packages/markforge/package.json index 47f61a6..feefd01 100644 --- a/packages/markforge/package.json +++ b/packages/markforge/package.json @@ -1,6 +1,6 @@ { "name": "@masumdev/markforge", - "version": "0.2.4", + "version": "0.2.5", "description": "Modern, high-performance Markdown & MDX multi-format document publishing engine and CLI (DOCX, PDF, HTML, and Images) with embedded HTML/CSS, image inliner, and Ink terminal UI.", "main": "./dist/index.js", "module": "./dist/index.mjs", diff --git a/packages/markforge/test/allProperties.test.ts b/packages/markforge/test/allProperties.test.ts index 4c6cab1..d7eee83 100644 --- a/packages/markforge/test/allProperties.test.ts +++ b/packages/markforge/test/allProperties.test.ts @@ -8,8 +8,6 @@ import { buildDocxDocument, buildPdfDocument, resolveDocumentConfig, - replaceDocumentTokens, - normalizeWatermark, PAPER_DIMENSIONS_TWIP, } from "../src/index.js"; import type { MarkforgeConfig } from "../src/config/types.js"; diff --git a/packages/markforge/test/cli-e2e.test.ts b/packages/markforge/test/cli-e2e.test.ts index 3130afa..da29ce5 100644 --- a/packages/markforge/test/cli-e2e.test.ts +++ b/packages/markforge/test/cli-e2e.test.ts @@ -52,6 +52,7 @@ describe("CLI E2E", () => { const exitCode = await proc.exited; expect(exitCode).toBe(0); + expect(stdout).toBeDefined(); expect(fs.existsSync(path.join(tmpDir, "doc.docx"))).toBe(true); expect(fs.existsSync(path.join(tmpDir, "doc.html"))).toBe(true);