From b115afc03de432ccb5acbb3864ef9dc48a4cd4ca Mon Sep 17 00:00:00 2001
From: DemchaAV Output:
* {@code examples/target/generated-pdfs/templates/cv/cv-boxed-sections-v2.pdf}. The returned names are the identifiers used by {@code DocumentTextStyle},
- * {@code CvTheme}, and the font library. They describe what can be referenced
+ * {@code BrandTheme}, and the font library. They describe what can be referenced
* immediately without registering custom font families.
To define a new visual flavour: add a static factory here - * returning a fresh {@code CvTheme} with custom sub-records. The + * returning a fresh {@code BrandTheme} with custom sub-records. The * existing preset code keeps working — only the theme handed to * {@code BoxedSections.create(theme)} changes.
* @@ -25,15 +25,15 @@ * @param spacing paddings / margins / weights * @param decoration glyph / separator tokens */ -public record CvTheme(CvPalette palette, - CvTypography typography, - CvSpacing spacing, - CvDecoration decoration) { +public record BrandTheme(Palette palette, + Typography typography, + Spacing spacing, + Decoration decoration) { /** * Validates that no sub-record is null. */ - public CvTheme { + public BrandTheme { Objects.requireNonNull(palette, "palette"); Objects.requireNonNull(typography, "typography"); Objects.requireNonNull(spacing, "spacing"); @@ -42,21 +42,21 @@ public record CvTheme(CvPalette palette, /** * Backward-compatible 3-arg constructor that fills the - * {@link CvDecoration} slot with {@link CvDecoration#classic()}. + * {@link Decoration} slot with {@link Decoration#classic()}. * Retained so callers built before the decoration token landed * keep compiling and behaving identically. * * @param palette colour tokens * @param typography font + size scale * @param spacing paddings / margins / weights - * @deprecated since the introduction of {@link CvDecoration} — + * @deprecated since the introduction of {@link Decoration} — * pass an explicit decoration so callers can choose * a different bullet glyph or contact separator * without forking the renderer. */ @Deprecated - public CvTheme(CvPalette palette, CvTypography typography, CvSpacing spacing) { - this(palette, typography, spacing, CvDecoration.classic()); + public BrandTheme(Palette palette, Typography typography, Spacing spacing) { + this(palette, typography, spacing, Decoration.classic()); } // -- canonical factories --------------------------------------------- @@ -67,14 +67,14 @@ public CvTheme(CvPalette palette, CvTypography typography, CvSpacing spacing) { * separators. Visual signature of the original * {@code cv-boxed-sections.pdf} reference output. * - * @return a {@code CvTheme} for the "Boxed Sections" classic look + * @return a {@code BrandTheme} for the "Boxed Sections" classic look */ - public static CvTheme boxedClassic() { - return new CvTheme( - CvPalette.classic(), - CvTypography.classic(), - CvSpacing.classic(), - CvDecoration.classic()); + public static BrandTheme boxedClassic() { + return new BrandTheme( + Palette.classic(), + Typography.classic(), + Spacing.classic(), + Decoration.classic()); } /** @@ -85,17 +85,17 @@ public static CvTheme boxedClassic() { * shared with any other v2 preset today. * *When (or if) a second preset wants the same accent palette, - * extract those colours into a new field on {@link CvPalette} and + * extract those colours into a new field on {@link Palette} and * point both presets at it.
* - * @return a {@code CvTheme} for the "Modern Professional" look + * @return a {@code BrandTheme} for the "Modern Professional" look */ - public static CvTheme modernProfessional() { - return new CvTheme( - CvPalette.classic(), - CvTypography.modernProfessional(), - CvSpacing.modernProfessional(), - CvDecoration.classic()); + public static BrandTheme modernProfessional() { + return new BrandTheme( + Palette.classic(), + Typography.modernProfessional(), + Spacing.modernProfessional(), + Decoration.classic()); } /** @@ -105,14 +105,14 @@ public static CvTheme modernProfessional() { * each module. Pipe contact separator matches the classic * decoration. * - * @return a {@code CvTheme} for the "Centered Headline" look + * @return a {@code BrandTheme} for the "Centered Headline" look */ - public static CvTheme centeredHeadline() { - return new CvTheme( - CvPalette.centeredHeadline(), - CvTypography.centeredHeadline(), - CvSpacing.centeredHeadline(), - CvDecoration.classic()); + public static BrandTheme centeredHeadline() { + return new BrandTheme( + Palette.centeredHeadline(), + Typography.centeredHeadline(), + Spacing.centeredHeadline(), + Decoration.classic()); } /** @@ -120,14 +120,14 @@ public static CvTheme centeredHeadline() { * tan rules, cream profile band, and the roomy pipe separator * from the classic decoration. * - * @return a {@code CvTheme} for the "Classic Serif" look + * @return a {@code BrandTheme} for the "Classic Serif" look */ - public static CvTheme classicSerif() { - return new CvTheme( - CvPalette.classicSerif(), - CvTypography.classicSerif(), - CvSpacing.classicSerif(), - CvDecoration.classic()); + public static BrandTheme classicSerif() { + return new BrandTheme( + Palette.classicSerif(), + Typography.classicSerif(), + Spacing.classicSerif(), + Decoration.classic()); } /** @@ -135,14 +135,14 @@ public static CvTheme classicSerif() { * deep blue-green ink, pale teal profile band/rules, and compact * two-column spacing. * - * @return a {@code CvTheme} for the "Nordic Clean" look + * @return a {@code BrandTheme} for the "Nordic Clean" look */ - public static CvTheme nordicClean() { - return new CvTheme( - CvPalette.nordicClean(), - CvTypography.nordicClean(), - CvSpacing.nordicClean(), - CvDecoration.classic()); + public static BrandTheme nordicClean() { + return new BrandTheme( + Palette.nordicClean(), + Typography.nordicClean(), + Spacing.nordicClean(), + Decoration.classic()); } /** @@ -150,14 +150,14 @@ public static CvTheme nordicClean() { * Mono labels, teal accents, pale left rail, and compact card * spacing. * - * @return a {@code CvTheme} for the "Compact Mono" look + * @return a {@code BrandTheme} for the "Compact Mono" look */ - public static CvTheme compactMono() { - return new CvTheme( - CvPalette.compactMono(), - CvTypography.compactMono(), - CvSpacing.compactMono(), - CvDecoration.compactMono()); + public static BrandTheme compactMono() { + return new BrandTheme( + Palette.compactMono(), + Typography.compactMono(), + Spacing.compactMono(), + Decoration.compactMono()); } /** @@ -165,14 +165,14 @@ public static CvTheme compactMono() { * compact spacing, blue full-width section banners, and tighter * pipe separators. * - * @return a {@code CvTheme} for the "Blue Banner" look + * @return a {@code BrandTheme} for the "Blue Banner" look */ - public static CvTheme blueBanner() { - return new CvTheme( - CvPalette.blueBanner(), - CvTypography.blueBanner(), - CvSpacing.blueBanner(), - CvDecoration.blueBanner()); + public static BrandTheme blueBanner() { + return new BrandTheme( + Palette.blueBanner(), + Typography.blueBanner(), + Spacing.blueBanner(), + Decoration.blueBanner()); } /** @@ -180,14 +180,14 @@ public static CvTheme blueBanner() { * section rules, centred editorial header, and dense body * spacing. * - * @return a {@code CvTheme} for the "Editorial Blue" look + * @return a {@code BrandTheme} for the "Editorial Blue" look */ - public static CvTheme editorialBlue() { - return new CvTheme( - CvPalette.editorialBlue(), - CvTypography.editorialBlue(), - CvSpacing.editorialBlue(), - CvDecoration.classic()); + public static BrandTheme editorialBlue() { + return new BrandTheme( + Palette.editorialBlue(), + Typography.editorialBlue(), + Spacing.editorialBlue(), + Decoration.classic()); } /** @@ -200,14 +200,14 @@ public static CvTheme editorialBlue() { * timeline. Visual signature ported from the v1 * {@code SidebarPortraitCvTemplateComposer}. * - * @return a {@code CvTheme} for the "Sidebar Portrait" look + * @return a {@code BrandTheme} for the "Sidebar Portrait" look */ - public static CvTheme sidebarPortrait() { - return new CvTheme( - CvPalette.sidebarPortrait(), - CvTypography.sidebarPortrait(), - CvSpacing.sidebarPortrait(), - CvDecoration.classic()); + public static BrandTheme sidebarPortrait() { + return new BrandTheme( + Palette.sidebarPortrait(), + Typography.sidebarPortrait(), + Spacing.sidebarPortrait(), + Decoration.classic()); } /** @@ -219,14 +219,14 @@ public static CvTheme sidebarPortrait() { * signature ported from the v1 * {@code MonogramSidebarCvTemplateComposer}. * - * @return a {@code CvTheme} for the "Monogram Sidebar" look + * @return a {@code BrandTheme} for the "Monogram Sidebar" look */ - public static CvTheme monogramSidebar() { - return new CvTheme( - CvPalette.monogramSidebar(), - CvTypography.monogramSidebar(), - CvSpacing.monogramSidebar(), - CvDecoration.classic()); + public static BrandTheme monogramSidebar() { + return new BrandTheme( + Palette.monogramSidebar(), + Typography.monogramSidebar(), + Spacing.monogramSidebar(), + Decoration.classic()); } /** @@ -237,14 +237,14 @@ public static CvTheme monogramSidebar() { * Visual signature ported from the v1 * {@code TechLeadCvTemplateComposer}. * - * @return a {@code CvTheme} for the "Engineering Resume" look + * @return a {@code BrandTheme} for the "Engineering Resume" look */ - public static CvTheme engineeringResume() { - return new CvTheme( - CvPalette.engineeringResume(), - CvTypography.engineeringResume(), - CvSpacing.engineeringResume(), - CvDecoration.classic()); + public static BrandTheme engineeringResume() { + return new BrandTheme( + Palette.engineeringResume(), + Typography.engineeringResume(), + Spacing.engineeringResume(), + Decoration.classic()); } /** @@ -255,14 +255,14 @@ public static CvTheme engineeringResume() { * Visual signature ported from the v1 * {@code TimelineMinimalCvTemplateComposer}. * - * @return a {@code CvTheme} for the "Timeline Minimal" look + * @return a {@code BrandTheme} for the "Timeline Minimal" look */ - public static CvTheme timelineMinimal() { - return new CvTheme( - CvPalette.timelineMinimal(), - CvTypography.timelineMinimal(), - CvSpacing.timelineMinimal(), - CvDecoration.classic()); + public static BrandTheme timelineMinimal() { + return new BrandTheme( + Palette.timelineMinimal(), + Typography.timelineMinimal(), + Spacing.timelineMinimal(), + Decoration.classic()); } /** @@ -272,14 +272,14 @@ public static CvTheme timelineMinimal() { * strip beneath each title. Visual signature ported from the v1 * {@code PanelCvTemplateComposer} (ProductLeader tokens). * - * @return a {@code CvTheme} for the "Panel" look + * @return a {@code BrandTheme} for the "Panel" look */ - public static CvTheme panel() { - return new CvTheme( - CvPalette.panel(), - CvTypography.panel(), - CvSpacing.panel(), - CvDecoration.classic()); + public static BrandTheme panel() { + return new BrandTheme( + Palette.panel(), + Typography.panel(), + Spacing.panel(), + Decoration.classic()); } /** @@ -289,14 +289,14 @@ public static CvTheme panel() { * Visual signature ported from the legacy * {@code ExecutiveSlateCvTemplate}. * - * @return a {@code CvTheme} for the "Executive" look + * @return a {@code BrandTheme} for the "Executive" look */ - public static CvTheme executive() { - return new CvTheme( - CvPalette.executive(), - CvTypography.executive(), - CvSpacing.executive(), - CvDecoration.classic()); + public static BrandTheme executive() { + return new BrandTheme( + Palette.executive(), + Typography.executive(), + Spacing.executive(), + Decoration.classic()); } /** @@ -309,14 +309,14 @@ public static CvTheme executive() { * awards, references). Paired 1:1 with the Mint Editorial cover * letter, which reuses this exact theme. * - * @return a {@code CvTheme} for the "Mint Editorial" look + * @return a {@code BrandTheme} for the "Mint Editorial" look */ - public static CvTheme mintEditorial() { - return new CvTheme( - CvPalette.mintEditorial(), - CvTypography.mintEditorial(), - CvSpacing.mintEditorial(), - CvDecoration.classic()); + public static BrandTheme mintEditorial() { + return new BrandTheme( + Palette.mintEditorial(), + Typography.mintEditorial(), + Spacing.mintEditorial(), + Decoration.classic()); } // -- pre-built text-style helpers ------------------------------------ // Renderers ask the theme for an already-composed DocumentTextStyle diff --git a/src/main/java/com/demcha/compose/document/templates/cv/v2/theme/CvDecoration.java b/src/main/java/com/demcha/compose/document/templates/core/theme/Decoration.java similarity index 72% rename from src/main/java/com/demcha/compose/document/templates/cv/v2/theme/CvDecoration.java rename to src/main/java/com/demcha/compose/document/templates/core/theme/Decoration.java index 39ab54cae..1d39d9ac8 100644 --- a/src/main/java/com/demcha/compose/document/templates/cv/v2/theme/CvDecoration.java +++ b/src/main/java/com/demcha/compose/document/templates/core/theme/Decoration.java @@ -1,9 +1,9 @@ -package com.demcha.compose.document.templates.cv.v2.theme; +package com.demcha.compose.document.templates.core.theme; import java.util.Objects; /** - * Glyph / separator tokens for a {@link CvTheme} — the small "what + * Glyph / separator tokens for a {@link BrandTheme} — the small "what * character renders here" decisions that vary per visual flavour but * never depend on the layout or the data. * @@ -11,7 +11,7 @@ * to {@code ▶}", "I want to use {@code · } as the contact-line * separator instead of pipes", or "I want stacked-body lines to align * with a 3-space indent instead of 2". None of these need a custom - * renderer — pass a different {@code CvDecoration} into your theme. + * renderer — pass a different {@code Decoration} into your theme. * *Decorations live in the {@code theme} layer because they are * cosmetic. They are not renderer constants: @@ -30,14 +30,14 @@ * address / links on the contact row * (e.g. {@code " | "}, {@code " · "}) */ -public record CvDecoration(String bulletGlyph, +public record Decoration(String bulletGlyph, String stackedIndent, String contactSeparator) { /** * Validates that no token is null. */ - public CvDecoration { + public Decoration { Objects.requireNonNull(bulletGlyph, "bulletGlyph"); Objects.requireNonNull(stackedIndent, "stackedIndent"); Objects.requireNonNull(contactSeparator, "contactSeparator"); @@ -45,22 +45,22 @@ public record CvDecoration(String bulletGlyph, /** * The classic decoration: round bullet, two-space stacked indent, - * pipe contact separator. Used by {@link CvTheme#boxedClassic()}. + * pipe contact separator. Used by {@link BrandTheme#boxedClassic()}. * - * @return a {@code CvDecoration} for the classic look + * @return a {@code Decoration} for the classic look */ - public static CvDecoration classic() { - return new CvDecoration("• ", " ", " | "); + public static Decoration classic() { + return new Decoration("• ", " ", " | "); } /** * Blue Banner keeps classic bullets but uses the tighter contact * separator spacing from the legacy preset. * - * @return a {@code CvDecoration} for the Blue Banner look + * @return a {@code Decoration} for the Blue Banner look */ - public static CvDecoration blueBanner() { - return new CvDecoration("• ", " ", " | "); + public static Decoration blueBanner() { + return new Decoration("• ", " ", " | "); } /** @@ -68,9 +68,9 @@ public static CvDecoration blueBanner() { * command-bar header. Row bullets keep the classic glyph for * callers that reuse shared row renderers with this theme. * - * @return a {@code CvDecoration} for the Compact Mono look + * @return a {@code Decoration} for the Compact Mono look */ - public static CvDecoration compactMono() { - return new CvDecoration("• ", " ", " / "); + public static Decoration compactMono() { + return new Decoration("• ", " ", " / "); } } diff --git a/src/main/java/com/demcha/compose/document/templates/cv/v2/theme/CvPalette.java b/src/main/java/com/demcha/compose/document/templates/core/theme/Palette.java similarity index 83% rename from src/main/java/com/demcha/compose/document/templates/cv/v2/theme/CvPalette.java rename to src/main/java/com/demcha/compose/document/templates/core/theme/Palette.java index e837d967c..8cf66c0cd 100644 --- a/src/main/java/com/demcha/compose/document/templates/cv/v2/theme/CvPalette.java +++ b/src/main/java/com/demcha/compose/document/templates/core/theme/Palette.java @@ -1,11 +1,11 @@ -package com.demcha.compose.document.templates.cv.v2.theme; +package com.demcha.compose.document.templates.core.theme; import com.demcha.compose.document.style.DocumentColor; import java.util.Objects; /** - * Colour tokens for a {@link CvTheme}. + * Colour tokens for a {@link BrandTheme}. * * @param ink primary text colour — headlines, body, entry titles * @param muted secondary text colour — italic subtitles (employer, @@ -18,7 +18,7 @@ * {@link DocumentColor#WHITE} for palettes that do not * need a custom main-area fill. */ -public record CvPalette(DocumentColor ink, +public record Palette(DocumentColor ink, DocumentColor muted, DocumentColor rule, DocumentColor banner, @@ -27,7 +27,7 @@ public record CvPalette(DocumentColor ink, /** * Validates that no colour token is null. */ - public CvPalette { + public Palette { Objects.requireNonNull(ink, "ink"); Objects.requireNonNull(muted, "muted"); Objects.requireNonNull(rule, "rule"); @@ -48,7 +48,7 @@ public record CvPalette(DocumentColor ink, * @param rule thin horizontal rules + the contact-line pipe glyph * @param banner pale fill behind section title banners */ - public CvPalette(DocumentColor ink, + public Palette(DocumentColor ink, DocumentColor muted, DocumentColor rule, DocumentColor banner) { @@ -59,10 +59,10 @@ public CvPalette(DocumentColor ink, * The classic dark-grey / pale-grey palette used by the original * Boxed Sections preset. * - * @return a {@code CvPalette} for the classic flavour + * @return a {@code Palette} for the classic flavour */ - public static CvPalette classic() { - return new CvPalette( + public static Palette classic() { + return new Palette( DocumentColor.rgb(34, 34, 34), DocumentColor.rgb(120, 120, 120), DocumentColor.rgb(170, 170, 170), @@ -81,10 +81,10 @@ public static CvPalette classic() { * style without leaving an obvious gap if a future preset reuses * this palette with a banner-style section header.
* - * @return a {@code CvPalette} for the Centered Headline flavour + * @return a {@code Palette} for the Centered Headline flavour */ - public static CvPalette centeredHeadline() { - return new CvPalette( + public static Palette centeredHeadline() { + return new Palette( DocumentColor.rgb(54, 54, 54), // ink (#363636) DocumentColor.rgb(105, 105, 105), // muted / soft (#696969) DocumentColor.rgb(188, 188, 188), // rule (#BCBCBC) @@ -97,10 +97,10 @@ public static CvPalette centeredHeadline() { * its profile band; the bronze accent is preset-local because no * other preset shares that fifth colour token today. * - * @return a {@code CvPalette} for the Classic Serif flavour + * @return a {@code Palette} for the Classic Serif flavour */ - public static CvPalette classicSerif() { - return new CvPalette( + public static Palette classicSerif() { + return new Palette( DocumentColor.rgb(45, 43, 40), DocumentColor.rgb(105, 101, 94), DocumentColor.rgb(187, 177, 160), @@ -113,10 +113,10 @@ public static CvPalette classicSerif() { * stronger teal accent and rail fill are preset-local fifth/sixth * colours because no other preset shares those tokens yet. * - * @return a {@code CvPalette} for the Nordic Clean flavour + * @return a {@code Palette} for the Nordic Clean flavour */ - public static CvPalette nordicClean() { - return new CvPalette( + public static Palette nordicClean() { + return new Palette( DocumentColor.rgb(18, 39, 52), DocumentColor.rgb(82, 104, 116), DocumentColor.rgb(188, 219, 222), @@ -128,10 +128,10 @@ public static CvPalette nordicClean() { * quiet card rules, and the pale rail fill used by the compact * left column. * - * @return a {@code CvPalette} for the Compact Mono flavour + * @return a {@code Palette} for the Compact Mono flavour */ - public static CvPalette compactMono() { - return new CvPalette( + public static Palette compactMono() { + return new Palette( DocumentColor.rgb(28, 34, 42), DocumentColor.rgb(102, 117, 132), DocumentColor.rgb(188, 204, 215), @@ -142,10 +142,10 @@ public static CvPalette compactMono() { * Blue Banner palette: compact dark ink, blue section fills, and * darker blue separator rules. * - * @return a {@code CvPalette} for the Blue Banner flavour + * @return a {@code Palette} for the Blue Banner flavour */ - public static CvPalette blueBanner() { - return new CvPalette( + public static Palette blueBanner() { + return new Palette( DocumentColor.rgb(20, 25, 35), DocumentColor.rgb(85, 85, 85), DocumentColor.rgb(58, 82, 118), @@ -157,10 +157,10 @@ public static CvPalette blueBanner() { * subtitles, vivid blue rules, and a neutral border token reused * by compact skill grids. * - * @return a {@code CvPalette} for the Editorial Blue flavour + * @return a {@code Palette} for the Editorial Blue flavour */ - public static CvPalette editorialBlue() { - return new CvPalette( + public static Palette editorialBlue() { + return new Palette( DocumentColor.rgb(60, 72, 106), DocumentColor.rgb(150, 158, 178), DocumentColor.rgb(86, 136, 255), @@ -176,10 +176,10 @@ public static CvPalette editorialBlue() { * the same {@code ink}/{@code muted} pair because the preset uses * a restrained grey palette throughout. * - * @return a {@code CvPalette} for the Sidebar Portrait flavour + * @return a {@code Palette} for the Sidebar Portrait flavour */ - public static CvPalette sidebarPortrait() { - return new CvPalette( + public static Palette sidebarPortrait() { + return new Palette( DocumentColor.rgb(34, 34, 34), // ink — V1 INK DocumentColor.rgb(85, 85, 85), // muted — V1 SOFT DocumentColor.rgb(178, 178, 178), // rule — V1 RULE @@ -194,10 +194,10 @@ public static CvPalette sidebarPortrait() { * and muted-gold accent stay preset-local because no other v2 * preset shares them today. * - * @return a {@code CvPalette} for the Monogram Sidebar flavour + * @return a {@code Palette} for the Monogram Sidebar flavour */ - public static CvPalette monogramSidebar() { - return new CvPalette( + public static Palette monogramSidebar() { + return new Palette( DocumentColor.rgb(37, 45, 58), // ink — V1 INK DocumentColor.rgb(112, 119, 125), // muted — V1 SOFT DocumentColor.rgb(138, 146, 148), // rule — V1 SIDEBAR_RULE @@ -213,10 +213,10 @@ public static CvPalette monogramSidebar() { * cyan-green contact link colour stay preset-local as they are the * fifth+ tokens — no other v2 preset shares them today. * - * @return a {@code CvPalette} for the Engineering Resume flavour + * @return a {@code Palette} for the Engineering Resume flavour */ - public static CvPalette engineeringResume() { - return new CvPalette( + public static Palette engineeringResume() { + return new Palette( DocumentColor.rgb(32, 42, 55), // ink — V1 INK body slate DocumentColor.rgb(91, 105, 119), // muted — V1 MUTED subtitles DocumentColor.rgb(190, 212, 204), // rule — V1 RULE pale teal-green @@ -230,10 +230,10 @@ public static CvPalette engineeringResume() { * timeline axis and module underlines, and the dot token reused * for the three circles of the central timeline axis. * - * @return a {@code CvPalette} for the Timeline Minimal flavour + * @return a {@code Palette} for the Timeline Minimal flavour */ - public static CvPalette timelineMinimal() { - return new CvPalette( + public static Palette timelineMinimal() { + return new Palette( DocumentColor.rgb(74, 74, 74), // ink — V1 INK DocumentColor.rgb(122, 122, 122), // muted — V1 SOFT DocumentColor.rgb(195, 195, 195), // rule — V1 RULE @@ -249,10 +249,10 @@ public static CvPalette timelineMinimal() { * panel fill are preset-local because they are the fifth/sixth/ * seventh tokens — other v2 presets do not share them today. * - * @return a {@code CvPalette} for the Panel flavour + * @return a {@code Palette} for the Panel flavour */ - public static CvPalette panel() { - return new CvPalette( + public static Palette panel() { + return new Palette( DocumentColor.rgb(54, 68, 84), // ink — V1 BODY_TEXT/HEADER_META slate DocumentColor.rgb(105, 117, 132), // muted — slightly lighter slate DocumentColor.rgb(179, 214, 211), // rule — V1 PANEL_STROKE pale teal @@ -269,10 +269,10 @@ public static CvPalette panel() { * preset-local because they are the fifth and sixth tokens — * other v2 presets do not share them today. * - * @return a {@code CvPalette} for the Executive flavour + * @return a {@code Palette} for the Executive flavour */ - public static CvPalette executive() { - return new CvPalette( + public static Palette executive() { + return new Palette( DocumentColor.rgb(49, 58, 72), // ink — V1 BODY slate DocumentColor.rgb(105, 115, 130), // muted — slightly lighter slate DocumentColor.rgb(193, 201, 211), // rule — V1 MUTED_RULE @@ -289,10 +289,10 @@ public static CvPalette executive() { * {@code palette.banner()} as the single accent source, so the * matched set never forks the colour. * - * @return a {@code CvPalette} for the Mint Editorial flavour + * @return a {@code Palette} for the Mint Editorial flavour */ - public static CvPalette mintEditorial() { - return new CvPalette( + public static Palette mintEditorial() { + return new Palette( DocumentColor.rgb(24, 24, 24), // ink (black) DocumentColor.rgb(82, 82, 82), // muted DocumentColor.rgb(70, 70, 70), // rule (skill-bar track) diff --git a/src/main/java/com/demcha/compose/document/templates/cv/v2/theme/CvSpacing.java b/src/main/java/com/demcha/compose/document/templates/core/theme/Spacing.java similarity index 91% rename from src/main/java/com/demcha/compose/document/templates/cv/v2/theme/CvSpacing.java rename to src/main/java/com/demcha/compose/document/templates/core/theme/Spacing.java index 95ecb7659..6c7c1ac9b 100644 --- a/src/main/java/com/demcha/compose/document/templates/cv/v2/theme/CvSpacing.java +++ b/src/main/java/com/demcha/compose/document/templates/core/theme/Spacing.java @@ -1,16 +1,16 @@ -package com.demcha.compose.document.templates.cv.v2.theme; +package com.demcha.compose.document.templates.core.theme; import com.demcha.compose.document.style.DocumentInsets; import java.util.Objects; /** - * Layout / spacing tokens for a {@link CvTheme}. + * Layout / spacing tokens for a {@link BrandTheme}. * *Every magic numeric literal that used to live inside a renderer * (padding, margin, gap, weight, accent width) now lives here, so a * "compact" or "spacious" variant of the same visual is a new - * {@code CvSpacing} record — not a forked renderer.
+ * {@code Spacing} record — not a forked renderer. * * @param pageFlowSpacing gap between top-level page-flow rows * @param sectionBodySpacing gap between paragraphs inside a @@ -40,7 +40,7 @@ * ends and the next begins. Not applied * before the first entry in a section. */ -public record CvSpacing( +public record Spacing( double pageFlowSpacing, double sectionBodySpacing, DocumentInsets sectionBodyPadding, @@ -59,7 +59,7 @@ public record CvSpacing( /** * Validates that no inset token is null. */ - public CvSpacing { + public Spacing { Objects.requireNonNull(sectionBodyPadding, "sectionBodyPadding"); Objects.requireNonNull(headlinePadding, "headlinePadding"); Objects.requireNonNull(contactPadding, "contactPadding"); @@ -97,7 +97,7 @@ public record CvSpacing( * {@link #modernProfessional()}. */ @Deprecated - public CvSpacing(double pageFlowSpacing, + public Spacing(double pageFlowSpacing, double sectionBodySpacing, DocumentInsets sectionBodyPadding, DocumentInsets headlinePadding, @@ -120,10 +120,10 @@ public CvSpacing(double pageFlowSpacing, /** * The classic spacing used by the original Boxed Sections preset. * - * @return a {@code CvSpacing} for the classic preset + * @return a {@code Spacing} for the classic preset */ - public static CvSpacing classic() { - return new CvSpacing( + public static Spacing classic() { + return new Spacing( 7, // pageFlowSpacing 4, // sectionBodySpacing new DocumentInsets(4, 4, 0, 4), // sectionBodyPadding @@ -148,10 +148,10 @@ public static CvSpacing classic() { * unused (the preset uses {@code flatSpacedCaps} section headers, * not banners). * - * @return a {@code CvSpacing} for the Centered Headline preset + * @return a {@code Spacing} for the Centered Headline preset */ - public static CvSpacing centeredHeadline() { - return new CvSpacing( + public static Spacing centeredHeadline() { + return new Spacing( 0, // pageFlowSpacing (zero — rules supply visual gaps) 1.5, // sectionBodySpacing DocumentInsets.zero(), // sectionBodyPadding @@ -173,10 +173,10 @@ public static CvSpacing centeredHeadline() { * framed profile band, quiet cover skills module, and compact * detail modules. * - * @return a {@code CvSpacing} for the Classic Serif preset + * @return a {@code Spacing} for the Classic Serif preset */ - public static CvSpacing classicSerif() { - return new CvSpacing( + public static Spacing classicSerif() { + return new Spacing( 8, // pageFlowSpacing 4, // sectionBodySpacing DocumentInsets.zero(), // sectionBodyPadding @@ -197,10 +197,10 @@ public static CvSpacing classicSerif() { * Spacing for Nordic Clean: compact top header, soft profile band, * and a dense two-column body with a tinted sidebar rail. * - * @return a {@code CvSpacing} for the Nordic Clean preset + * @return a {@code Spacing} for the Nordic Clean preset */ - public static CvSpacing nordicClean() { - return new CvSpacing( + public static Spacing nordicClean() { + return new Spacing( 7, // pageFlowSpacing 3, // sectionBodySpacing DocumentInsets.zero(), // sectionBodyPadding @@ -221,10 +221,10 @@ public static CvSpacing nordicClean() { * Spacing for Compact Mono: command-bar header, dense rail * modules, and same-width cards in the right column. * - * @return a {@code CvSpacing} for the Compact Mono preset + * @return a {@code Spacing} for the Compact Mono preset */ - public static CvSpacing compactMono() { - return new CvSpacing( + public static Spacing compactMono() { + return new Spacing( 9, // pageFlowSpacing 3.5, // sectionBodySpacing DocumentInsets.zero(), // sectionBodyPadding @@ -248,10 +248,10 @@ public static CvSpacing compactMono() { * are left non-zero so a future preset that wants to draw an MP * banner can read them; the canonical MP preset ignores them. * - * @return a {@code CvSpacing} for the Modern Professional preset + * @return a {@code Spacing} for the Modern Professional preset */ - public static CvSpacing modernProfessional() { - return new CvSpacing( + public static Spacing modernProfessional() { + return new Spacing( 4, // pageFlowSpacing 3, // sectionBodySpacing new DocumentInsets(2, 0, 0, 12), // sectionBodyPadding (left=12 → body indents from blue section title) @@ -272,10 +272,10 @@ public static CvSpacing modernProfessional() { * Compact spacing for Blue Banner: tight body blocks, full-width * title banners, and no extra artificial gap between entries. * - * @return a {@code CvSpacing} for the Blue Banner preset + * @return a {@code Spacing} for the Blue Banner preset */ - public static CvSpacing blueBanner() { - return new CvSpacing( + public static Spacing blueBanner() { + return new Spacing( 4, // pageFlowSpacing 3, // sectionBodySpacing new DocumentInsets(3, 4, 0, 4), // sectionBodyPadding @@ -296,10 +296,10 @@ public static CvSpacing blueBanner() { * Compact spacing for Editorial Blue: section headers own their * rule/title rhythm, while bodies start close to the lower rule. * - * @return a {@code CvSpacing} for the Editorial Blue preset + * @return a {@code Spacing} for the Editorial Blue preset */ - public static CvSpacing editorialBlue() { - return new CvSpacing( + public static Spacing editorialBlue() { + return new Spacing( 0, // pageFlowSpacing 2, // sectionBodySpacing new DocumentInsets(8, 0, 0, 0), // sectionBodyPadding @@ -323,10 +323,10 @@ public static CvSpacing editorialBlue() { * the preset draws its chrome inline (portrait photo, hero strip, * rules). * - * @return a {@code CvSpacing} for the Sidebar Portrait preset + * @return a {@code Spacing} for the Sidebar Portrait preset */ - public static CvSpacing sidebarPortrait() { - return new CvSpacing( + public static Spacing sidebarPortrait() { + return new Spacing( 0, // pageFlowSpacing 5, // sectionBodySpacing DocumentInsets.zero(), // sectionBodyPadding @@ -351,10 +351,10 @@ public static CvSpacing sidebarPortrait() { * spacing; banner tokens are unused — the preset only draws the * monogram badge and sidebar heading rules inline. * - * @return a {@code CvSpacing} for the Monogram Sidebar preset + * @return a {@code Spacing} for the Monogram Sidebar preset */ - public static CvSpacing monogramSidebar() { - return new CvSpacing( + public static Spacing monogramSidebar() { + return new Spacing( 0, // pageFlowSpacing 5, // sectionBodySpacing DocumentInsets.zero(), // sectionBodyPadding @@ -377,10 +377,10 @@ public static CvSpacing monogramSidebar() { * a 2.5pt accent rule under the header and tight 1pt paragraph * top so the dense rail + card content reads as a single page. * - * @return a {@code CvSpacing} for the Engineering Resume preset + * @return a {@code Spacing} for the Engineering Resume preset */ - public static CvSpacing engineeringResume() { - return new CvSpacing( + public static Spacing engineeringResume() { + return new Spacing( 8, // pageFlowSpacing 4, // sectionBodySpacing DocumentInsets.zero(), // sectionBodyPadding @@ -403,10 +403,10 @@ public static CvSpacing engineeringResume() { * Body content is text-only (no cards / banners), so banner * tokens are unused but kept at neutral defaults. * - * @return a {@code CvSpacing} for the Timeline Minimal preset + * @return a {@code Spacing} for the Timeline Minimal preset */ - public static CvSpacing timelineMinimal() { - return new CvSpacing( + public static Spacing timelineMinimal() { + return new Spacing( 12, // pageFlowSpacing (gap between header row + rule + body row) 5, // sectionBodySpacing DocumentInsets.zero(), // sectionBodyPadding @@ -429,10 +429,10 @@ public static CvSpacing timelineMinimal() { * so paddings and inter-card gaps are tight by design. Corner * radius and accent rule width match the V1 ProductLeader tokens. * - * @return a {@code CvSpacing} for the Panel preset + * @return a {@code Spacing} for the Panel preset */ - public static CvSpacing panel() { - return new CvSpacing( + public static Spacing panel() { + return new Spacing( 6, // pageFlowSpacing (tight inter-card gap) 3, // sectionBodySpacing (inside a card) DocumentInsets.zero(), // sectionBodyPadding (the card supplies its own padding) @@ -454,10 +454,10 @@ public static CvSpacing panel() { * an 8pt page-flow rhythm, compact module bodies, and a 1.1pt * full-width rule under the masthead. * - * @return a {@code CvSpacing} for the Executive preset + * @return a {@code Spacing} for the Executive preset */ - public static CvSpacing executive() { - return new CvSpacing( + public static Spacing executive() { + return new Spacing( 8, // pageFlowSpacing 3, // sectionBodySpacing DocumentInsets.zero(), // sectionBodyPadding @@ -482,10 +482,10 @@ public static CvSpacing executive() { * column gap are page-composition concerns owned by the preset, not * spacing tokens. * - * @return a {@code CvSpacing} for the Mint Editorial preset + * @return a {@code Spacing} for the Mint Editorial preset */ - public static CvSpacing mintEditorial() { - return new CvSpacing( + public static Spacing mintEditorial() { + return new Spacing( 18, // pageFlowSpacing (header / rule / grid rhythm) 5, // sectionBodySpacing DocumentInsets.zero(), // sectionBodyPadding diff --git a/src/main/java/com/demcha/compose/document/templates/cv/v2/theme/CvTypography.java b/src/main/java/com/demcha/compose/document/templates/core/theme/Typography.java similarity index 83% rename from src/main/java/com/demcha/compose/document/templates/cv/v2/theme/CvTypography.java rename to src/main/java/com/demcha/compose/document/templates/core/theme/Typography.java index 2f8c9b119..d42779f01 100644 --- a/src/main/java/com/demcha/compose/document/templates/cv/v2/theme/CvTypography.java +++ b/src/main/java/com/demcha/compose/document/templates/core/theme/Typography.java @@ -1,11 +1,11 @@ -package com.demcha.compose.document.templates.cv.v2.theme; +package com.demcha.compose.document.templates.core.theme; import com.demcha.compose.font.FontName; import java.util.Objects; /** - * Font + size scale tokens for a {@link CvTheme}. + * Font + size scale tokens for a {@link BrandTheme}. * *Each field names what renders at that size, not * an abstract "small / medium / large" — that way the call site @@ -28,7 +28,7 @@ * @param bodyLineSpacing line-spacing multiplier for body * paragraphs (typically 1.4) */ -public record CvTypography( +public record Typography( FontName headlineFont, FontName bodyFont, double sizeHeadline, @@ -43,7 +43,7 @@ public record CvTypography( /** * Validates that the font tokens are not null. */ - public CvTypography { + public Typography { Objects.requireNonNull(headlineFont, "headlineFont"); Objects.requireNonNull(bodyFont, "bodyFont"); } @@ -52,10 +52,10 @@ public record CvTypography( * The classic PT-Serif scale used by the original Boxed Sections * preset. * - * @return a {@code CvTypography} scale for the classic preset + * @return a {@code Typography} scale for the classic preset */ - public static CvTypography classic() { - return new CvTypography( + public static Typography classic() { + return new Typography( FontName.PT_SERIF, FontName.PT_SERIF, 21.5, // headline 8.5, // contact @@ -71,10 +71,10 @@ public static CvTypography classic() { * Helvetica scale for the Modern Professional preset — larger * display name, larger section titles, comfortable body size. * - * @return a {@code CvTypography} scale for the Modern Professional preset + * @return a {@code Typography} scale for the Modern Professional preset */ - public static CvTypography modernProfessional() { - return new CvTypography( + public static Typography modernProfessional() { + return new Typography( FontName.HELVETICA_BOLD, FontName.HELVETICA, 28.0, // headline (display name) 9.0, // contact @@ -97,10 +97,10 @@ public static CvTypography modernProfessional() { * variant — small bold spaced-caps title in the soft palette * tone.
* - * @return a {@code CvTypography} scale for the Centered Headline preset + * @return a {@code Typography} scale for the Centered Headline preset */ - public static CvTypography centeredHeadline() { - return new CvTypography( + public static Typography centeredHeadline() { + return new Typography( FontName.POPPINS, FontName.LATO, 24.0, // headline (spaced-caps name) 8.3, // contact @@ -118,10 +118,10 @@ public static CvTypography centeredHeadline() { * Preset-local body variants still override this when the visual * needs a distinct summary size. * - * @return a {@code CvTypography} scale for the Classic Serif preset + * @return a {@code Typography} scale for the Classic Serif preset */ - public static CvTypography classicSerif() { - return new CvTypography( + public static Typography classicSerif() { + return new Typography( FontName.PT_SERIF, FontName.PT_SERIF, 27.0, // headline 8.7, // contact @@ -138,10 +138,10 @@ public static CvTypography classicSerif() { * preset. Compact sizes keep the two-column rail/body layout * single-page friendly while preserving the crisp editorial feel. * - * @return a {@code CvTypography} scale for the Nordic Clean preset + * @return a {@code Typography} scale for the Nordic Clean preset */ - public static CvTypography nordicClean() { - return new CvTypography( + public static Typography nordicClean() { + return new Typography( FontName.BARLOW, FontName.LATO, 27.0, // headline 7.4, // contact stack @@ -158,10 +158,10 @@ public static CvTypography nordicClean() { * preset. The section-title slot also uses the mono headline font * so tick labels keep the terminal/card visual signature. * - * @return a {@code CvTypography} scale for the Compact Mono preset + * @return a {@code Typography} scale for the Compact Mono preset */ - public static CvTypography compactMono() { - return new CvTypography( + public static Typography compactMono() { + return new Typography( FontName.IBM_PLEX_MONO, FontName.LATO, 23.5, // headline 8.3, // contact @@ -177,10 +177,10 @@ public static CvTypography compactMono() { * Compact PT-Serif headline + Lato body scale used by the Blue * Banner preset. * - * @return a {@code CvTypography} scale for the Blue Banner preset + * @return a {@code Typography} scale for the Blue Banner preset */ - public static CvTypography blueBanner() { - return new CvTypography( + public static Typography blueBanner() { + return new Typography( FontName.PT_SERIF, FontName.LATO, 20.0, // headline 7.5, // contact @@ -195,10 +195,10 @@ public static CvTypography blueBanner() { /** * Compact Helvetica scale for the Editorial Blue preset. * - * @return a {@code CvTypography} scale for the Editorial Blue preset + * @return a {@code Typography} scale for the Editorial Blue preset */ - public static CvTypography editorialBlue() { - return new CvTypography( + public static Typography editorialBlue() { + return new Typography( FontName.HELVETICA_BOLD, FontName.HELVETICA, 22.0, // headline 9.0, // contact @@ -217,10 +217,10 @@ public static CvTypography editorialBlue() { * The sample data is information-dense, so the body sizes are * compact and the line spacing trends to 1.35 for readability. * - * @return a {@code CvTypography} scale for the Sidebar Portrait preset + * @return a {@code Typography} scale for the Sidebar Portrait preset */ - public static CvTypography sidebarPortrait() { - return new CvTypography( + public static Typography sidebarPortrait() { + return new Typography( FontName.CRIMSON_TEXT, FontName.LATO, 28.0, // headline (hero name) 8.3, // contact (sidebar contact stack) @@ -240,10 +240,10 @@ public static CvTypography sidebarPortrait() { * The PT-Serif monogram font is preset-local because no other v2 * preset uses it for a circle-ring badge. * - * @return a {@code CvTypography} scale for the Monogram Sidebar preset + * @return a {@code Typography} scale for the Monogram Sidebar preset */ - public static CvTypography monogramSidebar() { - return new CvTypography( + public static Typography monogramSidebar() { + return new Typography( FontName.CRIMSON_TEXT, FontName.LATO, 30.0, // headline (spaced-caps name lines) 7.4, // contact (sidebar contact stack) @@ -261,10 +261,10 @@ public static CvTypography monogramSidebar() { * 7.8pt main section headings, 7.25pt body, and a 1.08 line * spacing tuned for dense engineering-resume cards. * - * @return a {@code CvTypography} scale for the Engineering Resume preset + * @return a {@code Typography} scale for the Engineering Resume preset */ - public static CvTypography engineeringResume() { - return new CvTypography( + public static Typography engineeringResume() { + return new Typography( FontName.BARLOW, FontName.LATO, 24.5, // headline (UPPERCASE name in navy header) 7.2, // contact (right-aligned navy header stack) @@ -283,10 +283,10 @@ public static CvTypography engineeringResume() { * titles, 7.5-7.9pt body. Compact sizes squeeze the 3-column * sidebar / axis / main layout onto one page. * - * @return a {@code CvTypography} scale for the Timeline Minimal preset + * @return a {@code Typography} scale for the Timeline Minimal preset */ - public static CvTypography timelineMinimal() { - return new CvTypography( + public static Typography timelineMinimal() { + return new Typography( FontName.BARLOW_CONDENSED, FontName.LATO, 28.0, // headline (spaced uppercase masthead) 7.8, // contact (right-aligned contact stack) @@ -305,10 +305,10 @@ public static CvTypography timelineMinimal() { * slot for the teal module headings, and a 9.4pt body with 1.2 * line spacing tuned for the dense card layout. * - * @return a {@code CvTypography} scale for the Panel preset + * @return a {@code Typography} scale for the Panel preset */ - public static CvTypography panel() { - return new CvTypography( + public static Typography panel() { + return new Typography( FontName.POPPINS, FontName.LATO, 22.0, // headline (centered uppercase name) 8.9, // contact (V1 META_SIZE = body - 0.5) @@ -327,10 +327,10 @@ public static CvTypography panel() { * and a 9.5pt body with 1.25 line-spacing tuned for an executive * single-column resume density. * - * @return a {@code CvTypography} scale for the Executive preset + * @return a {@code Typography} scale for the Executive preset */ - public static CvTypography executive() { - return new CvTypography( + public static Typography executive() { + return new Typography( FontName.POPPINS, FontName.LATO, 24.0, // headline (uppercase masthead) 9.1, // contact meta (V1 META_SIZE = body - 0.4) @@ -348,10 +348,10 @@ public static CvTypography executive() { * heading, and compact 7.4-8pt metadata/body tuned for the dense * two-column editorial layout. * - * @return a {@code CvTypography} scale for the Mint Editorial preset + * @return a {@code Typography} scale for the Mint Editorial preset */ - public static CvTypography mintEditorial() { - return new CvTypography( + public static Typography mintEditorial() { + return new Typography( FontName.POPPINS, FontName.POPPINS, 26.0, // headline (spaced-caps centered name) 7.4, // contact (icon line text) diff --git a/src/main/java/com/demcha/compose/document/templates/cv/v2/theme/package-info.java b/src/main/java/com/demcha/compose/document/templates/core/theme/package-info.java similarity index 53% rename from src/main/java/com/demcha/compose/document/templates/cv/v2/theme/package-info.java rename to src/main/java/com/demcha/compose/document/templates/core/theme/package-info.java index 32fc1afd2..f196188bc 100644 --- a/src/main/java/com/demcha/compose/document/templates/cv/v2/theme/package-info.java +++ b/src/main/java/com/demcha/compose/document/templates/core/theme/package-info.java @@ -3,30 +3,30 @@ * *The shift-able layer. Every colour, font, size, * padding, corner radius, accent width — everything purely visual — - * lives in {@link com.demcha.compose.document.templates.cv.v2.theme.CvTheme} + * lives in {@link com.demcha.compose.document.templates.core.theme.BrandTheme} * and its four sub-records:
* *Renderers in {@code cv/v2/components} accept a {@code CvTheme} + *
Template renderers and widgets accept a {@code BrandTheme} * argument and never read constants directly — so a new visual flavour - * is just a new {@code CvTheme} factory, no renderer changes + * is just a new {@code BrandTheme} factory, no renderer changes * required.
* *Why split into sub-records: it lets you mix-and-match — a - * preset can build {@code new CvTheme(palette, defaultTypography, + * preset can build {@code new BrandTheme(palette, defaultTypography, * tighterSpacing)} for a compact variant without redeclaring every * field.
*/ -package com.demcha.compose.document.templates.cv.v2.theme; +package com.demcha.compose.document.templates.core.theme; diff --git a/src/main/java/com/demcha/compose/document/templates/coverletter/presets/ModernProfessionalLetter.java b/src/main/java/com/demcha/compose/document/templates/coverletter/presets/ModernProfessionalLetter.java index df5378712..f3e1359b0 100644 --- a/src/main/java/com/demcha/compose/document/templates/coverletter/presets/ModernProfessionalLetter.java +++ b/src/main/java/com/demcha/compose/document/templates/coverletter/presets/ModernProfessionalLetter.java @@ -36,7 +36,7 @@ public final class ModernProfessionalLetter { /** Human-readable display name. */ public static final String DISPLAY_NAME = "Modern Professional Letter"; - /** V1 {@code CvTheme} primary slate-blue used by the display name. */ + /** V1 {@code BrandTheme} primary slate-blue used by the display name. */ private static final DocumentColor NAME_COLOR = DocumentColor.rgb(44, 62, 80); /** V1 link accent (royal blue) used by the contact link row. */ diff --git a/src/main/java/com/demcha/compose/document/templates/coverletter/v2/components/LetterBody.java b/src/main/java/com/demcha/compose/document/templates/coverletter/v2/components/LetterBody.java index ca092fec4..cc8a75968 100644 --- a/src/main/java/com/demcha/compose/document/templates/coverletter/v2/components/LetterBody.java +++ b/src/main/java/com/demcha/compose/document/templates/coverletter/v2/components/LetterBody.java @@ -7,7 +7,7 @@ import com.demcha.compose.document.templates.coverletter.v2.data.CoverLetterDocument; import com.demcha.compose.document.templates.cv.v2.components.CvTextStyles; import com.demcha.compose.document.templates.cv.v2.components.RichParagraphRenderer; -import com.demcha.compose.document.templates.cv.v2.theme.CvTheme; +import com.demcha.compose.document.templates.core.theme.BrandTheme; /** * Shared cover-letter body renderer — the letter analog of @@ -39,7 +39,7 @@ private LetterBody() { * paired CV preset so the body colour / font / size match */ public static void render(SectionBuilder host, CoverLetterDocument doc, - CvTheme theme) { + BrandTheme theme) { render(host, doc, theme, theme.typography().sizeBody()); } @@ -57,7 +57,7 @@ public static void render(SectionBuilder host, CoverLetterDocument doc, * @param bodySize body text size in points */ public static void render(SectionBuilder host, CoverLetterDocument doc, - CvTheme theme, double bodySize) { + BrandTheme theme, double bodySize) { DocumentTextStyle bodyStyle = CvTextStyles.of( theme.typography().bodyFont(), bodySize, diff --git a/src/main/java/com/demcha/compose/document/templates/coverletter/v2/presets/BlueBannerLetter.java b/src/main/java/com/demcha/compose/document/templates/coverletter/v2/presets/BlueBannerLetter.java index 2d40fe7b4..2c3acb177 100644 --- a/src/main/java/com/demcha/compose/document/templates/coverletter/v2/presets/BlueBannerLetter.java +++ b/src/main/java/com/demcha/compose/document/templates/coverletter/v2/presets/BlueBannerLetter.java @@ -5,7 +5,7 @@ import com.demcha.compose.document.templates.api.DocumentTemplate; import com.demcha.compose.document.templates.coverletter.v2.components.LetterBody; import com.demcha.compose.document.templates.coverletter.v2.data.CoverLetterDocument; -import com.demcha.compose.document.templates.cv.v2.theme.CvTheme; +import com.demcha.compose.document.templates.core.theme.BrandTheme; import com.demcha.compose.document.templates.cv.v2.widgets.ContactLine; import com.demcha.compose.document.templates.cv.v2.widgets.Headline; @@ -19,7 +19,7 @@ * — a centred PT-Serif spaced-caps name over a compact centred contact * row — then a single-column letter body via the shared * {@link LetterBody}. Both documents read everything from - * {@link CvTheme#blueBanner()}. + * {@link BrandTheme#blueBanner()}. * *The CV's signature blue banners decorate section titles,
* which a letter has none of, so the brand identity here is carried by
@@ -53,7 +53,7 @@ private BlueBannerLetter() {
* @return a {@code DocumentTemplate} for the "Blue Banner Letter"
*/
public static DocumentTemplate
The header is composed entirely from shared widgets
* ({@link Headline#spacedCentered} + {@link ContactLine#centered}) at
@@ -52,7 +52,7 @@ private BoxedSectionsLetter() {
* @return a {@code DocumentTemplate} for the "Boxed Sections Letter"
*/
public static DocumentTemplate
The subheadline uses the real {@link CvIdentity#jobTitle()} (the
* CV preset still shows a hard-coded placeholder pending its own
@@ -62,7 +62,7 @@ private CenteredHeadlineLetter() {
* @return a {@code DocumentTemplate} for the "Centered Headline Letter"
*/
public static DocumentTemplate
The header mirrors the CV's preset-local header DSL (spaced name +
* rule line + centred contact). The bronze {@code ACCENT} is mirrored
@@ -64,7 +64,7 @@ private ClassicSerifLetter() {
* @return a {@code DocumentTemplate} for the "Classic Serif Letter"
*/
public static DocumentTemplate
The four command-bar colours are mirrored from the CV, where they
* are preset-local. A near-invisible width rule (band-coloured, 0.1pt)
@@ -80,7 +80,7 @@ private CompactMonoLetter() {
* @return a {@code DocumentTemplate} for the "Compact Mono Letter"
*/
public static DocumentTemplate
Only the navy {@code NAME_COLOR} is mirrored from the CV (its
* preset-local token); everything else flows through {@code Masthead}
@@ -62,7 +62,7 @@ private EditorialBlueLetter() {
* @return a {@code DocumentTemplate} for the "Editorial Blue Letter"
*/
public static DocumentTemplate
The five navy-header colours are mirrored from the CV, where they
* are preset-local (the theme only covers body ink / muted / rule /
@@ -88,7 +88,7 @@ private EngineeringResumeLetter() {
* @return a {@code DocumentTemplate} for the "Engineering Resume Letter"
*/
public static DocumentTemplate
The masthead block is preset-local inline DSL mirroring the CV's,
@@ -84,7 +84,7 @@ private ExecutiveLetter() {
* @return a {@code DocumentTemplate} for the "Executive Letter"
*/
public static DocumentTemplate
Unlike Executive, the header is composed almost entirely from
* shared widgets ({@link Headline#rightAligned} +
@@ -70,7 +70,7 @@ private ModernProfessionalLetter() {
* @return a {@code DocumentTemplate} for the "Modern Professional Letter"
*/
public static DocumentTemplate
The gold accent, dark monogram ring, and the PT-Serif monogram font * are mirrored from the CV, where they are preset-local.
@@ -92,7 +92,7 @@ private MonogramSidebarLetter() { * @return a {@code DocumentTemplate} for the "Monogram Sidebar Letter" */ public static DocumentTemplateThe teal {@code ACCENT} is mirrored from the CV's default accent
@@ -66,7 +66,7 @@ private NordicCleanLetter() {
* @return a {@code DocumentTemplate} for the "Nordic Clean Letter"
*/
public static DocumentTemplate
The two masthead colours (deep-navy header text, teal accent) are
* mirrored from the CV, where they are preset-local. The header card is
@@ -79,7 +79,7 @@ private PanelLetter() {
* @return a {@code DocumentTemplate} for the "Panel Letter"
*/
public static DocumentTemplate
Each preset is a thin orchestrator that reads colour, font, and
- * spacing from its paired {@code CvTheme. Every class here is a static helper that takes a host
* {@link com.demcha.compose.document.dsl.SectionBuilder}, a
* {@code cv/v2/data} record, and a
- * {@link com.demcha.compose.document.templates.cv.v2.theme.CvTheme},
+ * {@link com.demcha.compose.document.templates.core.theme.BrandTheme},
* and draws the data into the host using the theme's tokens. Components never: Same data model ({@link CvDocument}), same theme tokens
- * ({@link CvTheme}), same body renderers — but the section header
+ * ({@link BrandTheme}), same body renderers — but the section header
* is drawn as a small left-aligned uppercase title with an
* underline rule instead of a centred banner panel. Why some colours live inside this preset and not in
- * {@link CvTheme}: the slate-blue display name and the
+ * {@link BrandTheme}: the slate-blue display name and the
* bright-blue accent for section titles are unique to this preset —
* no other v2 preset shares them today. Putting them in
- * {@link com.demcha.compose.document.templates.cv.v2.theme.CvPalette}
+ * {@link com.demcha.compose.document.templates.core.theme.Palette}
* would pollute the palette with single-use fields. When (or if) a
* second preset reaches for the same colours, extract them to
- * {@code CvPalette} and update both presets.{@code
* // Take the classic look
- * CvTheme theme = CvTheme.boxedClassic();
+ * BrandTheme theme = BrandTheme.boxedClassic();
*
* // ... or customise one piece, keep the rest
- * CvTheme custom = new CvTheme(
- * CvPalette.classic(),
- * CvTypography.classic(),
- * CvSpacing.classic(),
- * new CvDecoration("▶ ", " ", " · ")); // ▶ bullets, mid-dot separators
+ * BrandTheme custom = new BrandTheme(
+ * Palette.classic(),
+ * Typography.classic(),
+ * Spacing.classic(),
+ * new Decoration("▶ ", " ", " · ")); // ▶ bullets, mid-dot separators
* }
*
* Step 3. Hand to a preset
diff --git a/src/main/java/com/demcha/compose/document/templates/cv/v2/presets/BlueBanner.java b/src/main/java/com/demcha/compose/document/templates/cv/v2/presets/BlueBanner.java
index e3252dcd1..b905ccefb 100644
--- a/src/main/java/com/demcha/compose/document/templates/cv/v2/presets/BlueBanner.java
+++ b/src/main/java/com/demcha/compose/document/templates/cv/v2/presets/BlueBanner.java
@@ -10,7 +10,7 @@
import com.demcha.compose.document.templates.api.DocumentTemplate;
import com.demcha.compose.document.templates.cv.v2.components.*;
import com.demcha.compose.document.templates.cv.v2.data.*;
-import com.demcha.compose.document.templates.cv.v2.theme.CvTheme;
+import com.demcha.compose.document.templates.core.theme.BrandTheme;
import com.demcha.compose.document.templates.cv.v2.widgets.ContactLine;
import com.demcha.compose.document.templates.cv.v2.widgets.FlowSectionHeader;
import com.demcha.compose.document.templates.cv.v2.widgets.Headline;
@@ -75,7 +75,7 @@ private BlueBanner() {
* @return ready-to-use template
*/
public static DocumentTemplate
*
Architectural lesson learned in Phase 2:
* single-column presets that don't fit the boxed-banner visual
@@ -88,12 +88,12 @@ private ModernProfessional() {
/**
* Builds the preset with the Modern Professional theme
- * ({@link CvTheme#modernProfessional()}).
+ * ({@link BrandTheme#modernProfessional()}).
*
* @return ready-to-use template
*/
public static DocumentTemplate Use {@link #create(CvTheme, Options)} when you want the same
+ * Use {@link #create(BrandTheme, Options)} when you want the same
* Nordic layout with a different accent colour, rail fill, profile
* band fill, or rail side. The default {@link #create()} stays
* byte-for-byte compatible with the shipped teal-left-rail look. Replaces the historical {@code CvTheme.spacing}/{@code CvTheme.spacingModuleName}
+ * Replaces the historical {@code BrandTheme.spacing}/{@code BrandTheme.spacingModuleName}
* fields plus the hard-coded {@code MINIMUM_TOP_LEVEL_MODULE_SPACING}
* constant scattered throughout the legacy composers. Templates v2 presets
* read every spacing decision from a {@code Spacing} instance and pass it
diff --git a/src/main/java/com/demcha/compose/document/templates/themes/Typography.java b/src/main/java/com/demcha/compose/document/templates/themes/Typography.java
index 342ee4267..b8e2b7f24 100644
--- a/src/main/java/com/demcha/compose/document/templates/themes/Typography.java
+++ b/src/main/java/com/demcha/compose/document/templates/themes/Typography.java
@@ -55,7 +55,7 @@ public record Typography(
/**
* Returns the default Helvetica-based typography matching the historical
- * {@code CvTheme.defaultTheme()} sizing.
+ * {@code BrandTheme.defaultTheme()} sizing.
*
* @return Helvetica typography preset
*/
diff --git a/src/test/java/com/demcha/compose/document/templates/cv/v2/theme/CvDecorationTest.java b/src/test/java/com/demcha/compose/document/templates/core/theme/DecorationTest.java
similarity index 62%
rename from src/test/java/com/demcha/compose/document/templates/cv/v2/theme/CvDecorationTest.java
rename to src/test/java/com/demcha/compose/document/templates/core/theme/DecorationTest.java
index 29fdac324..6879a5e1b 100644
--- a/src/test/java/com/demcha/compose/document/templates/cv/v2/theme/CvDecorationTest.java
+++ b/src/test/java/com/demcha/compose/document/templates/core/theme/DecorationTest.java
@@ -1,15 +1,15 @@
-package com.demcha.compose.document.templates.cv.v2.theme;
+package com.demcha.compose.document.templates.core.theme;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-class CvDecorationTest {
+class DecorationTest {
@Test
void classic_carries_the_canonical_glyphs() {
- CvDecoration d = CvDecoration.classic();
+ Decoration d = Decoration.classic();
assertThat(d.bulletGlyph()).isEqualTo("• ");
assertThat(d.stackedIndent()).isEqualTo(" ");
assertThat(d.contactSeparator()).isEqualTo(" | ");
@@ -17,14 +17,14 @@ void classic_carries_the_canonical_glyphs() {
@Test
void rejects_null_field() {
- assertThatThrownBy(() -> new CvDecoration(null, " ", " | "))
+ assertThatThrownBy(() -> new Decoration(null, " ", " | "))
.isInstanceOf(NullPointerException.class)
.hasMessageContaining("bulletGlyph");
}
@Test
void custom_decoration_is_carried_verbatim() {
- CvDecoration d = new CvDecoration("▶ ", " ", " · ");
+ Decoration d = new Decoration("▶ ", " ", " · ");
assertThat(d.bulletGlyph()).isEqualTo("▶ ");
assertThat(d.stackedIndent()).isEqualTo(" ");
assertThat(d.contactSeparator()).isEqualTo(" · ");
@@ -36,27 +36,27 @@ void deprecated_three_arg_theme_constructor_supplies_classic_decoration() {
// The pre-decoration call shape must keep working and yield
// the classic decoration, so older callers keep rendering
// pixel-identical output.
- CvTheme theme = new CvTheme(
- CvPalette.classic(),
- CvTypography.classic(),
- CvSpacing.classic());
- assertThat(theme.decoration()).isEqualTo(CvDecoration.classic());
+ BrandTheme theme = new BrandTheme(
+ Palette.classic(),
+ Typography.classic(),
+ Spacing.classic());
+ assertThat(theme.decoration()).isEqualTo(Decoration.classic());
}
@Test
void canonical_four_arg_theme_constructor_carries_custom_decoration() {
- CvDecoration custom = new CvDecoration("· ", " ", " / ");
- CvTheme theme = new CvTheme(
- CvPalette.classic(),
- CvTypography.classic(),
- CvSpacing.classic(),
+ Decoration custom = new Decoration("· ", " ", " / ");
+ BrandTheme theme = new BrandTheme(
+ Palette.classic(),
+ Typography.classic(),
+ Spacing.classic(),
custom);
assertThat(theme.decoration()).isSameAs(custom);
}
@Test
void boxedClassic_carries_classic_decoration() {
- assertThat(CvTheme.boxedClassic().decoration())
- .isEqualTo(CvDecoration.classic());
+ assertThat(BrandTheme.boxedClassic().decoration())
+ .isEqualTo(Decoration.classic());
}
}
diff --git a/src/test/java/com/demcha/compose/document/templates/cv/v2/presets/BlueBannerSmokeTest.java b/src/test/java/com/demcha/compose/document/templates/cv/v2/presets/BlueBannerSmokeTest.java
index 4f1d6c52c..864fb493c 100644
--- a/src/test/java/com/demcha/compose/document/templates/cv/v2/presets/BlueBannerSmokeTest.java
+++ b/src/test/java/com/demcha/compose/document/templates/cv/v2/presets/BlueBannerSmokeTest.java
@@ -10,7 +10,7 @@
import com.demcha.compose.document.templates.cv.v2.data.ParagraphSection;
import com.demcha.compose.document.templates.cv.v2.data.RowStyle;
import com.demcha.compose.document.templates.cv.v2.data.RowsSection;
-import com.demcha.compose.document.templates.cv.v2.theme.CvTheme;
+import com.demcha.compose.document.templates.core.theme.BrandTheme;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
@@ -38,7 +38,7 @@ void default_factory_renders_full_document() throws Exception {
@Test
void custom_theme_factory_renders() throws Exception {
DocumentTemplateCustomising the rail and colours
*
- * {@code
* DocumentTemplate
*