mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-25 01:15:26 +10:00
feat: implement free-form resume page formats, resolves #2991
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@reactive-resume/config": "workspace:*",
|
||||
"@typescript/native-preview": "7.0.0-dev.20260507.1",
|
||||
"@typescript/native-preview": "7.0.0-dev.20260508.1",
|
||||
"typescript": "^6.0.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1689,8 +1689,8 @@
|
||||
"format": {
|
||||
"default": "a4",
|
||||
"type": "string",
|
||||
"enum": ["a4", "letter"],
|
||||
"description": "The format of the page. Can be 'a4' or 'letter'."
|
||||
"enum": ["a4", "letter", "free-form"],
|
||||
"description": "The format of the page. Can be 'a4', 'letter', or 'free-form'."
|
||||
},
|
||||
"locale": {
|
||||
"default": "en-US",
|
||||
|
||||
@@ -7,6 +7,10 @@ export const pageDimensionsAsPixels = {
|
||||
width: 816,
|
||||
height: 1056,
|
||||
},
|
||||
"free-form": {
|
||||
width: 794,
|
||||
height: 1123,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const pageDimensionsAsMillimeters = {
|
||||
@@ -18,4 +22,8 @@ export const pageDimensionsAsMillimeters = {
|
||||
width: "216mm",
|
||||
height: "279mm",
|
||||
},
|
||||
"free-form": {
|
||||
width: "210mm",
|
||||
height: "297mm",
|
||||
},
|
||||
} as const;
|
||||
|
||||
@@ -449,7 +449,10 @@ export const pageSchema = z.object({
|
||||
gapY: z.number().min(0).describe("The vertical gap between the sections of the page, defined in points (pt)."),
|
||||
marginX: z.number().min(0).describe("The horizontal margin of the page, defined in points (pt)."),
|
||||
marginY: z.number().min(0).describe("The vertical margin of the page, defined in points (pt)."),
|
||||
format: z.enum(["a4", "letter"]).describe("The format of the page. Can be 'a4' or 'letter'.").catch("a4"),
|
||||
format: z
|
||||
.enum(["a4", "letter", "free-form"])
|
||||
.describe("The format of the page. Can be 'a4', 'letter', or 'free-form'.")
|
||||
.catch("a4"),
|
||||
locale: z
|
||||
.string()
|
||||
.describe("The locale of the page. Used for displaying pre-translated section headings, if not overridden.")
|
||||
|
||||
Reference in New Issue
Block a user