diff --git a/ROADMAP.md b/ROADMAP.md index 052a138b..3026031e 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -27,7 +27,7 @@ Not committed. Reflects current thinking; priorities may shift based on user fee - **DOCX visibility for unsupported nodes.** Make currently-silent skips (`shape`, `line`, `ellipse`, `barcode`) loud — minimum a warn log, ideally a strict-mode flag that fails instead of dropping content silently. - **Block-level alignment for fixed-size flow children.** Paths, images, layer stacks, shape containers and barcodes currently left-align in a flow; centring one means wrapping it in a full-width `ShapeContainer` just to use its CENTER anchor. Add a per-node horizontal align (left / centre / right — the `margin: auto` / `align(center)` analogue) so a fixed box can place itself in the flow directly. Surfaced by the v1.8 SVG icon-gallery and feature-catalog work. - **Backend-neutral layout measurement.** Decouple measurement from PDFBox-specific resources so non-PDF backends do not pull PDFBox into the dependency graph. -- **Multi-module Maven layout.** Split the artifact into `graph-compose-core` / `graph-compose-pdf` / `graph-compose-docx` / `graph-compose-templates` / `graph-compose-testing` if there is clear demand. Adds release complexity, so requires a real adoption signal first. +- **Multi-module Maven layout — shipped in 2.0.** The single jar was split into `graph-compose-core` plus `graph-compose-render-pdf` / `graph-compose-render-docx` / `graph-compose-render-pptx` / `graph-compose-templates` / `graph-compose-testing`, with render backends discovered through a `ServiceLoader` SPI. `graph-compose` is kept as a back-compat wrapper (core + render-pdf) so existing PDF callers upgrade unchanged. See the [modules migration guide](docs/migration/v2.0.0-modules.md). - **DOCX maturity.** Either expand DOCX coverage toward PDF parity, or move DOCX behind an explicitly experimental flag. - **Property-based testing.** Random table spans, pagination edge cases, deeply nested layouts. - **Real PPTX export.** Current state is a manifest skeleton. Will only be built out if there is concrete user demand. diff --git a/docs/api-stability.md b/docs/api-stability.md index 5decdd5d..891cc17f 100644 --- a/docs/api-stability.md +++ b/docs/api-stability.md @@ -190,22 +190,23 @@ window starts, and its `Status` flips to `deprecated 1.x`. A quick lookup so callers can classify an import without reading Javadoc per element. -| Package | Tier | Notes | -|---|---|---| -| `com.demcha.compose` (the `GraphCompose` factory class) | **Stable** | The single entry point. | -| `com.demcha.compose.document.api` | **Stable** | `DocumentSession`, `DocumentBuilder`, `PageBackgroundFill`, and the `@Internal` marker itself live here. | -| `com.demcha.compose.document.dsl` | **Stable** | All builder types (`RowBuilder`, `SectionBuilder`, `ParagraphBuilder`, etc.). | -| `com.demcha.compose.document.node` | **Stable** | Node records (`RowNode`, `SectionNode`, `ParagraphNode`, ...). Sealed where relevant — see § 2. | -| `com.demcha.compose.document.style` | **Stable** | `DocumentColor`, `DocumentInsets`, `DocumentTextStyle`, `DocumentTransform`, ... | -| `com.demcha.compose.document.templates.api` | **Stable** | The `DocumentTemplate` seam every preset factory returns. | -| `com.demcha.compose.document.templates.core.*` | **Stable** | The shared, family-neutral template layer — `BrandTheme` tokens (`core.theme`), neutral header bricks (`core.identity`), text helpers (`core.text`), shared widgets (`core.widgets`). | -| `com.demcha.compose.document.templates.cv.*` | **Stable** | Layered CV family — `CvDocument` data, components, widgets, presets. | -| `com.demcha.compose.document.templates.coverletter.*` | **Stable** | Layered cover-letter family. | -| `com.demcha.compose.document.templates.invoice.*` | **Stable** | Layered invoice family — `ModernInvoice` on `InvoiceDocumentSpec`. | -| `com.demcha.compose.document.templates.proposal.*` | **Stable** | Layered proposal family — `ModernProposal` on `ProposalDocumentSpec`. | -| `com.demcha.compose.document.templates.data.*` | **Stable** | Family-neutral document data records (invoice / proposal / schedule specs). | -| `com.demcha.compose.document.layout.*` | **Internal** | Marked `@Internal` at the package level. Engine surface. | -| `com.demcha.compose.engine.*` | **Internal** | Engine surface; not part of the public contract regardless of `public` keyword. | +| Package | Tier | Module | Notes | +|---|---|---|---| +| `com.demcha.compose` (the `GraphCompose` factory class) | **Stable** | `graph-compose-core` | The single entry point. | +| `com.demcha.compose.document.api` | **Stable** | `graph-compose-core` | `DocumentSession`, `DocumentBuilder`, `PageBackgroundFill`, and the `@Internal` marker itself live here. | +| `com.demcha.compose.document.dsl` | **Stable** | `graph-compose-core` | All builder types (`RowBuilder`, `SectionBuilder`, `ParagraphBuilder`, etc.). | +| `com.demcha.compose.document.node` | **Stable** | `graph-compose-core` | Node records (`RowNode`, `SectionNode`, `ParagraphNode`, ...). Sealed where relevant — see § 2. | +| `com.demcha.compose.document.style` | **Stable** | `graph-compose-core` | `DocumentColor`, `DocumentInsets`, `DocumentTextStyle`, `DocumentTransform`, ... | +| `com.demcha.compose.document.showcase` | **Stable** | `graph-compose-core` | `FontShowcase` — bundled-font preview renderer. | +| `com.demcha.compose.document.templates.api` | **Stable** | `graph-compose-templates` | The `DocumentTemplate` seam every preset factory returns. | +| `com.demcha.compose.document.templates.core.*` | **Stable** | `graph-compose-templates` | The shared, family-neutral template layer — `BrandTheme` tokens (`core.theme`), neutral header bricks (`core.identity`), text helpers (`core.text`), shared widgets (`core.widgets`). | +| `com.demcha.compose.document.templates.cv.*` | **Stable** | `graph-compose-templates` | Layered CV family — `CvDocument` data, components, widgets, presets. | +| `com.demcha.compose.document.templates.coverletter.*` | **Stable** | `graph-compose-templates` | Layered cover-letter family. | +| `com.demcha.compose.document.templates.invoice.*` | **Stable** | `graph-compose-templates` | Layered invoice family — `ModernInvoice` on `InvoiceDocumentSpec`. | +| `com.demcha.compose.document.templates.proposal.*` | **Stable** | `graph-compose-templates` | Layered proposal family — `ModernProposal` on `ProposalDocumentSpec`. | +| `com.demcha.compose.document.templates.data.*` | **Stable** | `graph-compose-templates` | Family-neutral document data records (invoice / proposal / schedule specs). | +| `com.demcha.compose.document.layout.*` | **Internal** | `graph-compose-core` | Marked `@Internal` at the package level. Engine surface. | +| `com.demcha.compose.engine.*` | **Internal** | `graph-compose-core` | Engine surface; not part of the public contract regardless of `public` keyword. `engine.render.pdf.*` ships in `graph-compose-render-pdf`. | --- diff --git a/docs/architecture/package-map.md b/docs/architecture/package-map.md index 586a21c2..d498e32d 100644 --- a/docs/architecture/package-map.md +++ b/docs/architecture/package-map.md @@ -13,6 +13,26 @@ on the type itself (`NodeDefinition` is the current example). The "Extension rule" column below names the extension seam where one is intended. +## Module Layout + +The 2.0 module split (see [ADR 0016](../adr/0016-multi-module-packaging.md)) maps these +packages onto Maven coordinates. The package names are unchanged — only which artifact +ships them differs. + +| Module | Owns | +| --- | --- | +| `graph-compose-core` | The lean engine: `com.demcha.compose`, the canonical `document.*` authoring surface (`api` / `dsl` / `node` / `style` / `table` / `snapshot`), `document.showcase` (`FontShowcase`), the `document.backend.fixed` SPI seam, the public `document.backend.fixed.pdf.options` records, `document.layout`, `font.*`, and the internal `engine.*` foundation. | +| `graph-compose-render-pdf` | The PDFBox backend: `document.backend.fixed.pdf.**` (the `PdfFixedLayoutBackend` impl + handlers) and the `engine.render.pdf.**` render tree. Registers the PDF `FixedLayoutBackendProvider` / `FontMetricsProvider`. | +| `graph-compose-render-docx` / `graph-compose-render-pptx` | The POI semantic exporters — `document.backend.semantic.docx` / `.pptx`. | +| `graph-compose-templates` | The built-in preset families — `document.templates.**`. | +| `graph-compose-testing` | Consumer test support — `com.demcha.compose.testing.**`. | +| `graph-compose` | Back-compat wrapper: an empty jar over `graph-compose-core` + `graph-compose-render-pdf`. | +| `graph-compose-bundle` | Batteries-included aggregate: the wrapper + templates + `graph-compose-fonts` + `graph-compose-emoji`. | + +The per-package tables below describe responsibility and extension rules; the `Module` +column in [api-stability.md § 4](../api-stability.md#4-tier-mapping-per-package) gives the +per-package artifact. + ## Public Authoring Surface | Package | Responsibility | Extension rule |