1- package com .demcha .compose .document .templates .cv . v2 . widgets ;
1+ package com .demcha .compose .document .templates .core . identity ;
22
33import com .demcha .compose .document .dsl .SectionBuilder ;
44import com .demcha .compose .document .node .DocumentLinkOptions ;
55import com .demcha .compose .document .node .TextAlign ;
66import com .demcha .compose .document .style .DocumentInsets ;
77import com .demcha .compose .document .style .DocumentTextStyle ;
8- import com .demcha .compose .document .templates .cv .v2 .data .CvContact ;
9- import com .demcha .compose .document .templates .cv .v2 .data .CvIdentity ;
10- import com .demcha .compose .document .templates .cv .v2 .data .CvLink ;
8+ import com .demcha .compose .document .templates .core .identity .Contact ;
9+ import com .demcha .compose .document .templates .core .identity .Link ;
1110import com .demcha .compose .document .templates .core .theme .BrandTheme ;
1211
1312import java .util .ArrayList ;
3433 * </ul>
3534 *
3635 * <p>Email is always rendered as a clickable {@code mailto:} link;
37- * each optional {@link CvLink } becomes a clickable hyperlink with
36+ * each optional {@link Link } becomes a clickable hyperlink with
3837 * the {@code label} as the visible text. The separator glyph comes
3938 * from {@code theme.decoration().contactSeparator()}.</p>
4039 */
@@ -52,14 +51,14 @@ private ContactLine() {
5251 * @param identity the CV identity supplying contact fields and links
5352 * @param theme the active theme supplying palette, typography, and spacing
5453 */
55- public static void centered (SectionBuilder host , CvIdentity identity , BrandTheme theme ) {
54+ public static void centered (SectionBuilder host , PartyIdentity identity , BrandTheme theme ) {
5655 render (host , identity , theme , TextAlign .CENTER , Order .PHONE_FIRST );
5756 }
5857
5958 /**
6059 * Centred contact row with explicit text-style overrides for
6160 * non-link text, clickable links, and separators. Same ordering as
62- * {@link #centered(SectionBuilder, CvIdentity , BrandTheme)}, but lets
61+ * {@link #centered(SectionBuilder, PartyIdentity , BrandTheme)}, but lets
6362 * editorial presets tint / underline the links without forking the
6463 * contact assembly logic.
6564 *
@@ -76,7 +75,7 @@ public static void centered(SectionBuilder host, CvIdentity identity, BrandTheme
7675 * {@code null} →
7776 * {@code theme.contactSeparatorStyle()}
7877 */
79- public static void centered (SectionBuilder host , CvIdentity identity ,
78+ public static void centered (SectionBuilder host , PartyIdentity identity ,
8079 BrandTheme theme ,
8180 DocumentTextStyle bodyStyleOverride ,
8281 DocumentTextStyle linkStyleOverride ,
@@ -94,7 +93,7 @@ public static void centered(SectionBuilder host, CvIdentity identity,
9493 * @param identity the CV identity supplying contact fields and links
9594 * @param theme the active theme supplying palette, typography, and spacing
9695 */
97- public static void rightAligned (SectionBuilder host , CvIdentity identity , BrandTheme theme ) {
96+ public static void rightAligned (SectionBuilder host , PartyIdentity identity , BrandTheme theme ) {
9897 render (host , identity , theme , TextAlign .RIGHT , Order .ADDRESS_FIRST );
9998 }
10099
@@ -107,7 +106,7 @@ public static void rightAligned(SectionBuilder host, CvIdentity identity, BrandT
107106 * @param identity the CV identity supplying contact fields and links
108107 * @param theme the active theme supplying palette, typography, and spacing
109108 */
110- public static void leftAligned (SectionBuilder host , CvIdentity identity ,
109+ public static void leftAligned (SectionBuilder host , PartyIdentity identity ,
111110 BrandTheme theme ) {
112111 render (host , identity , theme , TextAlign .LEFT , Order .ADDRESS_FIRST );
113112 }
@@ -129,7 +128,7 @@ public static void leftAligned(SectionBuilder host, CvIdentity identity,
129128 * {@code null} ->
130129 * {@code theme.contactSeparatorStyle()}
131130 */
132- public static void leftAligned (SectionBuilder host , CvIdentity identity ,
131+ public static void leftAligned (SectionBuilder host , PartyIdentity identity ,
133132 BrandTheme theme ,
134133 DocumentTextStyle bodyStyleOverride ,
135134 DocumentTextStyle linkStyleOverride ,
@@ -151,7 +150,7 @@ public static void leftAligned(SectionBuilder host, CvIdentity identity,
151150 * <li><strong>Row 2</strong> — email {@code |} link₁ {@code |} link₂ … (all clickable)</li>
152151 * </ul>
153152 *
154- * <p>Email and every {@link CvLink } are rendered as proper PDF
153+ * <p>Email and every {@link Link } are rendered as proper PDF
155154 * hyperlinks (mailto: for the email, the link's URL for each
156155 * label) — not just styled text.</p>
157156 *
@@ -168,7 +167,7 @@ public static void leftAligned(SectionBuilder host, CvIdentity identity,
168167 * separator; {@code null} →
169168 * {@code theme.contactSeparatorStyle()}
170169 */
171- public static void twoRowRightAligned (SectionBuilder host , CvIdentity identity ,
170+ public static void twoRowRightAligned (SectionBuilder host , PartyIdentity identity ,
172171 BrandTheme theme ,
173172 DocumentTextStyle bodyStyleOverride ,
174173 DocumentTextStyle linkStyleOverride ,
@@ -180,7 +179,7 @@ public static void twoRowRightAligned(SectionBuilder host, CvIdentity identity,
180179 DocumentTextStyle separatorStyle = separatorStyleOverride != null
181180 ? separatorStyleOverride : theme .contactSeparatorStyle ();
182181
183- CvContact c = identity .contact ();
182+ Contact c = identity .contact ();
184183 host .spacing (0 ).padding (theme .spacing ().contactPadding ())
185184 // Row 1 — address + phone.
186185 .addParagraph (p -> p
@@ -200,7 +199,7 @@ public static void twoRowRightAligned(SectionBuilder host, CvIdentity identity,
200199 .rich (rich -> {
201200 rich .with (c .email (), linkStyle ,
202201 new DocumentLinkOptions ("mailto:" + c .email ()));
203- for (CvLink l : identity .links ()) {
202+ for (Link l : identity .links ()) {
204203 rich .style (" | " , separatorStyle );
205204 rich .with (l .label (), linkStyle ,
206205 new DocumentLinkOptions (l .url ()));
@@ -218,7 +217,7 @@ public static void twoRowRightAligned(SectionBuilder host, CvIdentity identity,
218217 * @param theme the active theme supplying palette, typography, and spacing
219218 */
220219 public static void rightAlignedStacked (SectionBuilder host ,
221- CvIdentity identity ,
220+ PartyIdentity identity ,
222221 BrandTheme theme ) {
223222 rightAlignedStacked (host , identity , theme , null , null );
224223 }
@@ -236,7 +235,7 @@ public static void rightAlignedStacked(SectionBuilder host,
236235 * → resolved body style
237236 */
238237 public static void rightAlignedStacked (SectionBuilder host ,
239- CvIdentity identity ,
238+ PartyIdentity identity ,
240239 BrandTheme theme ,
241240 DocumentTextStyle bodyStyleOverride ,
242241 DocumentTextStyle linkStyleOverride ) {
@@ -274,7 +273,7 @@ public static void rightAlignedStacked(SectionBuilder host,
274273 * @param alignment horizontal text alignment for the row
275274 * @param order the field order in the rendered line
276275 */
277- public static void render (SectionBuilder host , CvIdentity identity , BrandTheme theme ,
276+ public static void render (SectionBuilder host , PartyIdentity identity , BrandTheme theme ,
278277 TextAlign alignment , Order order ) {
279278 List <Part > parts = parts (identity , order );
280279 DocumentTextStyle textStyle = theme .contactStyle ();
@@ -302,7 +301,7 @@ public static void render(SectionBuilder host, CvIdentity identity, BrandTheme t
302301 }));
303302 }
304303
305- private static void renderStyled (SectionBuilder host , CvIdentity identity ,
304+ private static void renderStyled (SectionBuilder host , PartyIdentity identity ,
306305 BrandTheme theme , TextAlign alignment ,
307306 Order order ,
308307 DocumentTextStyle bodyStyleOverride ,
@@ -352,8 +351,8 @@ public enum Order {
352351 ADDRESS_FIRST
353352 }
354353
355- private static List <Part > parts (CvIdentity identity , Order order ) {
356- CvContact c = identity .contact ();
354+ private static List <Part > parts (PartyIdentity identity , Order order ) {
355+ Contact c = identity .contact ();
357356 List <Part > parts = new ArrayList <>(4 + identity .links ().size ());
358357 DocumentLinkOptions email = new DocumentLinkOptions ("mailto:" + c .email ());
359358 switch (order ) {
@@ -368,7 +367,7 @@ private static List<Part> parts(CvIdentity identity, Order order) {
368367 parts .add (new Part (c .email (), email ));
369368 }
370369 }
371- for (CvLink link : identity .links ()) {
370+ for (Link link : identity .links ()) {
372371 parts .add (new Part (link .label (), new DocumentLinkOptions (link .url ())));
373372 }
374373 return parts ;
0 commit comments