feat(cv): rebuild section editing workflow
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
import { api } from "./api";
|
||||
|
||||
// Mirrors the backend CvVariantSettings (the lens over the master career profile).
|
||||
export type CvSectionSetting = { key: string; hidden?: boolean; title?: string; itemOrder?: string[] };
|
||||
export type CvSectionSetting = { key: string; hidden?: boolean; title?: string; itemOrder?: string[]; items?: string[] };
|
||||
export type CvItemOverride = { hidden?: boolean; title?: string; subtitle?: string; bullets?: string[] };
|
||||
export type CvCustomSectionSetting = { key: string; title?: string; items: string[]; hidden?: boolean };
|
||||
export type CvCustomSectionSetting = {
|
||||
key: string;
|
||||
title?: string;
|
||||
items: string[];
|
||||
hidden?: boolean;
|
||||
presetKey?: string | null;
|
||||
contentType?: "paragraphs" | "bullets" | "entries";
|
||||
};
|
||||
export type CvSkillGroupSetting = { name: string; items: string[] };
|
||||
|
||||
export type CvVariantSettings = {
|
||||
themeId: string;
|
||||
@@ -27,7 +35,8 @@ export type CvVariantSettings = {
|
||||
entryGapMm?: number | null;
|
||||
headingStyle?: "caps-rule" | "underline" | "plain" | "bar" | null;
|
||||
headerStyle?: "plain" | "band" | "centered" | "kicker" | null;
|
||||
skillsStyle?: "tags" | "text" | null;
|
||||
skillsStyle?: "tags" | "text" | "bullets" | "grouped" | null;
|
||||
skillGroups?: CvSkillGroupSetting[] | null;
|
||||
layout?: "single" | "sidebar-left" | "sidebar-right" | "header-band" | null;
|
||||
sidebarWidthMm?: number | null;
|
||||
sidebarSections?: string[] | null;
|
||||
@@ -52,6 +61,7 @@ export type CvTheme = {
|
||||
requiresPro: boolean;
|
||||
available: boolean;
|
||||
swatches: string[];
|
||||
supportedSettings?: string[];
|
||||
};
|
||||
|
||||
// Master profile resolved to sections+entries (GET /api/cv/outline) — what the Content tab edits.
|
||||
@@ -121,6 +131,13 @@ export const SECTION_LABELS: Record<string, string> = {
|
||||
references: "References",
|
||||
};
|
||||
|
||||
export const CUSTOM_SECTION_PRESETS = [
|
||||
{ key: "courses", title: "Courses", contentType: "entries" as const },
|
||||
{ key: "volunteer", title: "Volunteer Experience", contentType: "entries" as const },
|
||||
{ key: "additional-experience", title: "Additional Experience", contentType: "entries" as const },
|
||||
{ key: "declaration", title: "Declaration", contentType: "paragraphs" as const },
|
||||
] as const;
|
||||
|
||||
const CSS_PIXELS_PER_MM = 96 / 25.4;
|
||||
|
||||
export type CvPageMetrics = {
|
||||
|
||||
Reference in New Issue
Block a user