Add the Neutral template family, template picker and text-only logo allowances
Linea (the vendor's original format.pdf design), Monogram and Serenity are rebuilt from the reference PDFs as one parametric family on the engine, with the user's logo in the measured slot, a home for every GST field and A4/Letter support. Adds static Montserrat, Open Sans and Poppins fonts and a generated Ms Madi outline for Serenity's vertical word. Text-only logo placeholders (Monolith, Tangerine) use a doc-derived allowance box. A Carbon TemplatePicker with committed thumbnails opens from the page setup controls.
This commit is contained in:
@@ -9,6 +9,8 @@ export interface RenderPrefsV1 {
|
||||
logo?: {
|
||||
/** The logo already contains the business name, so a template drops its own name lockup. */
|
||||
useWordmark?: boolean;
|
||||
/** Templates without a reference logo placeholder (Linea, ...) show the logo only when this is true. */
|
||||
show?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -40,8 +42,12 @@ export function parsePrefs(json: string | null | undefined): RenderPrefsV1 {
|
||||
margins: MARGIN_IDS.includes(o.margins as MarginPreset) ? (o.margins as MarginPreset) : DEFAULT_PREFS.margins,
|
||||
};
|
||||
const logo = o.logo;
|
||||
if (typeof logo === "object" && logo !== null && typeof (logo as { useWordmark?: unknown }).useWordmark === "boolean") {
|
||||
prefs.logo = { useWordmark: (logo as { useWordmark: boolean }).useWordmark };
|
||||
if (typeof logo === "object" && logo !== null) {
|
||||
const { useWordmark, show } = logo as { useWordmark?: unknown; show?: unknown };
|
||||
const out: NonNullable<RenderPrefsV1["logo"]> = {};
|
||||
if (typeof useWordmark === "boolean") out.useWordmark = useWordmark;
|
||||
if (typeof show === "boolean") out.show = show;
|
||||
if (Object.keys(out).length > 0) prefs.logo = out;
|
||||
}
|
||||
return prefs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user