@resumekit/schema 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/template.d.ts +722 -1
- package/dist/template.d.ts.map +1 -1
- package/dist/template.js +355 -15
- package/package.json +1 -1
- package/src/template.ts +386 -15
package/dist/template.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAKL,KAAK,YAAY,EACjB,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,aAAa,CAAC;AAGrB;;;;;;;;;GASG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAweZ,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,SAAS,CAAC;AAChD,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC;AAE7D;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE5B,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,EAAE,UAAsB,CAAC;AAEzD,wBAAgB,eAAe,CAAC,EAAE,EAAE,UAAU,GAAG,eAAe,CAE/D;AAED,6EAA6E;AAC7E,wBAAgB,gBAAgB,IAAI;IAClC,EAAE,EAAE,UAAU,C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;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,iBAAiB,GACzB,IAAI,EAAE,CAwCR;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,WAAW,GACjB,eAAe,CAkJjB;AA+ED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,WAAW,GACjB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAKrB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAY3D;AAsFD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,EASjC,UAAU,GAAE,WAAgB,EAgB5B,QAAQ,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM,GAC9C,WAAW,CAkDb;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,WAAW,EACrB,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,GACzB,WAAW,CA0Bb;AA6BD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,iBAAiB,GACzB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAerB"}
|
package/dist/template.js
CHANGED
|
@@ -925,31 +925,37 @@ export const ResumeEditsSchema = z
|
|
|
925
925
|
export const DOCUMENT_FONTS = {
|
|
926
926
|
helvetica: {
|
|
927
927
|
name: 'Helvetica',
|
|
928
|
+
category: 'sans',
|
|
928
929
|
supplied: 'TeX Gyre Heros',
|
|
929
930
|
stack: "'TeX Gyre Heros', 'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', sans-serif",
|
|
930
931
|
},
|
|
931
932
|
arial: {
|
|
932
933
|
name: 'Arial',
|
|
934
|
+
category: 'sans',
|
|
933
935
|
supplied: 'Arimo',
|
|
934
936
|
stack: "Arimo, Arial, 'Helvetica Neue', Helvetica, 'Liberation Sans', sans-serif",
|
|
935
937
|
},
|
|
936
938
|
calibri: {
|
|
937
939
|
name: 'Calibri',
|
|
940
|
+
category: 'sans',
|
|
938
941
|
supplied: 'Carlito',
|
|
939
942
|
stack: "Carlito, Calibri, Candara, Segoe, 'Segoe UI', Optima, Arial, sans-serif",
|
|
940
943
|
},
|
|
941
944
|
georgia: {
|
|
942
945
|
name: 'Georgia',
|
|
946
|
+
category: 'serif',
|
|
943
947
|
supplied: 'Gelasio',
|
|
944
948
|
stack: "Gelasio, Georgia, Cambria, 'Times New Roman', Times, serif",
|
|
945
949
|
},
|
|
946
950
|
garamond: {
|
|
947
951
|
name: 'Garamond',
|
|
952
|
+
category: 'serif',
|
|
948
953
|
supplied: 'EB Garamond',
|
|
949
954
|
stack: "'EB Garamond', Garamond, Baskerville, 'Baskerville Old Face', 'Times New Roman', serif",
|
|
950
955
|
},
|
|
951
956
|
times: {
|
|
952
957
|
name: 'Times',
|
|
958
|
+
category: 'serif',
|
|
953
959
|
supplied: 'Tinos',
|
|
954
960
|
stack: "Tinos, 'Times New Roman', Times, Georgia, serif",
|
|
955
961
|
},
|
|
@@ -969,25 +975,151 @@ export const DOCUMENT_FONTS = {
|
|
|
969
975
|
*/
|
|
970
976
|
lato: {
|
|
971
977
|
name: 'Lato',
|
|
978
|
+
category: 'sans',
|
|
972
979
|
supplied: 'Lato',
|
|
973
980
|
stack: "Lato, 'Segoe UI', Candara, Optima, Calibri, sans-serif",
|
|
974
981
|
},
|
|
975
982
|
condensed: {
|
|
976
983
|
name: 'Roboto Condensed',
|
|
984
|
+
category: 'sans',
|
|
977
985
|
supplied: 'Roboto Condensed',
|
|
978
986
|
stack: "'Roboto Condensed', 'Arial Narrow', 'Helvetica Neue Condensed', 'Liberation Sans Narrow', sans-serif",
|
|
979
987
|
},
|
|
980
988
|
ptserif: {
|
|
981
989
|
name: 'PT Serif',
|
|
990
|
+
category: 'serif',
|
|
982
991
|
supplied: 'PT Serif',
|
|
983
992
|
stack: "'PT Serif', Charter, Cambria, Georgia, 'Times New Roman', serif",
|
|
984
993
|
},
|
|
985
994
|
bitter: {
|
|
986
995
|
name: 'Bitter',
|
|
996
|
+
category: 'slab',
|
|
987
997
|
supplied: 'Bitter',
|
|
988
998
|
stack: "Bitter, 'Roboto Slab', Rockwell, 'Courier New', Cambria, Georgia, serif",
|
|
989
999
|
},
|
|
1000
|
+
/*
|
|
1001
|
+
* The wider catalog. Popular open faces, so a candidate can find the one they
|
|
1002
|
+
* have in mind rather than the nearest of ten. Each is supplied in the same
|
|
1003
|
+
* four styles, and each stack degrades to its own register.
|
|
1004
|
+
*/
|
|
1005
|
+
inter: {
|
|
1006
|
+
name: 'Inter',
|
|
1007
|
+
category: 'sans',
|
|
1008
|
+
supplied: 'Inter',
|
|
1009
|
+
stack: "Inter, 'Helvetica Neue', Arial, sans-serif",
|
|
1010
|
+
},
|
|
1011
|
+
opensans: {
|
|
1012
|
+
name: 'Open Sans',
|
|
1013
|
+
category: 'sans',
|
|
1014
|
+
supplied: 'Open Sans',
|
|
1015
|
+
stack: "'Open Sans', 'Segoe UI', Arial, sans-serif",
|
|
1016
|
+
},
|
|
1017
|
+
montserrat: {
|
|
1018
|
+
name: 'Montserrat',
|
|
1019
|
+
category: 'sans',
|
|
1020
|
+
supplied: 'Montserrat',
|
|
1021
|
+
stack: "Montserrat, 'Century Gothic', Arial, sans-serif",
|
|
1022
|
+
},
|
|
1023
|
+
plexsans: {
|
|
1024
|
+
name: 'IBM Plex Sans',
|
|
1025
|
+
category: 'sans',
|
|
1026
|
+
supplied: 'IBM Plex Sans',
|
|
1027
|
+
stack: "'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif",
|
|
1028
|
+
},
|
|
1029
|
+
worksans: {
|
|
1030
|
+
name: 'Work Sans',
|
|
1031
|
+
category: 'sans',
|
|
1032
|
+
supplied: 'Work Sans',
|
|
1033
|
+
stack: "'Work Sans', 'Helvetica Neue', Arial, sans-serif",
|
|
1034
|
+
},
|
|
1035
|
+
nunitosans: {
|
|
1036
|
+
name: 'Nunito Sans',
|
|
1037
|
+
category: 'sans',
|
|
1038
|
+
supplied: 'Nunito Sans',
|
|
1039
|
+
stack: "'Nunito Sans', 'Segoe UI', Arial, sans-serif",
|
|
1040
|
+
},
|
|
1041
|
+
dmsans: {
|
|
1042
|
+
name: 'DM Sans',
|
|
1043
|
+
category: 'sans',
|
|
1044
|
+
supplied: 'DM Sans',
|
|
1045
|
+
stack: "'DM Sans', 'Helvetica Neue', Arial, sans-serif",
|
|
1046
|
+
},
|
|
1047
|
+
firasans: {
|
|
1048
|
+
name: 'Fira Sans',
|
|
1049
|
+
category: 'sans',
|
|
1050
|
+
supplied: 'Fira Sans',
|
|
1051
|
+
stack: "'Fira Sans', 'Segoe UI', Arial, sans-serif",
|
|
1052
|
+
},
|
|
1053
|
+
librefranklin: {
|
|
1054
|
+
name: 'Libre Franklin',
|
|
1055
|
+
category: 'sans',
|
|
1056
|
+
supplied: 'Libre Franklin',
|
|
1057
|
+
stack: "'Libre Franklin', 'Franklin Gothic', Arial, sans-serif",
|
|
1058
|
+
},
|
|
1059
|
+
notosans: {
|
|
1060
|
+
name: 'Noto Sans',
|
|
1061
|
+
category: 'sans',
|
|
1062
|
+
supplied: 'Noto Sans',
|
|
1063
|
+
stack: "'Noto Sans', 'Segoe UI', Arial, sans-serif",
|
|
1064
|
+
},
|
|
1065
|
+
lora: {
|
|
1066
|
+
name: 'Lora',
|
|
1067
|
+
category: 'serif',
|
|
1068
|
+
supplied: 'Lora',
|
|
1069
|
+
stack: "Lora, Georgia, 'Times New Roman', serif",
|
|
1070
|
+
},
|
|
1071
|
+
sourceserif: {
|
|
1072
|
+
name: 'Source Serif',
|
|
1073
|
+
category: 'serif',
|
|
1074
|
+
supplied: 'Source Serif 4',
|
|
1075
|
+
stack: "'Source Serif 4', Georgia, 'Times New Roman', serif",
|
|
1076
|
+
},
|
|
1077
|
+
plexserif: {
|
|
1078
|
+
name: 'IBM Plex Serif',
|
|
1079
|
+
category: 'serif',
|
|
1080
|
+
supplied: 'IBM Plex Serif',
|
|
1081
|
+
stack: "'IBM Plex Serif', Georgia, 'Times New Roman', serif",
|
|
1082
|
+
},
|
|
1083
|
+
spectral: {
|
|
1084
|
+
name: 'Spectral',
|
|
1085
|
+
category: 'serif',
|
|
1086
|
+
supplied: 'Spectral',
|
|
1087
|
+
stack: 'Spectral, Garamond, Georgia, serif',
|
|
1088
|
+
},
|
|
1089
|
+
playfair: {
|
|
1090
|
+
name: 'Playfair Display',
|
|
1091
|
+
category: 'serif',
|
|
1092
|
+
supplied: 'Playfair Display',
|
|
1093
|
+
stack: "'Playfair Display', Didot, Georgia, serif",
|
|
1094
|
+
},
|
|
1095
|
+
/* Template faces that are also worth picking: already shipped for a design. */
|
|
1096
|
+
roboto: {
|
|
1097
|
+
name: 'Roboto',
|
|
1098
|
+
category: 'sans',
|
|
1099
|
+
supplied: 'Roboto',
|
|
1100
|
+
stack: "Roboto, 'Helvetica Neue', Arial, sans-serif",
|
|
1101
|
+
},
|
|
1102
|
+
sourcesans: {
|
|
1103
|
+
name: 'Source Sans',
|
|
1104
|
+
category: 'sans',
|
|
1105
|
+
supplied: 'Source Sans 3',
|
|
1106
|
+
stack: "'Source Sans 3', 'Segoe UI', Arial, sans-serif",
|
|
1107
|
+
},
|
|
1108
|
+
raleway: {
|
|
1109
|
+
name: 'Raleway',
|
|
1110
|
+
category: 'sans',
|
|
1111
|
+
supplied: 'Raleway',
|
|
1112
|
+
stack: "Raleway, 'Century Gothic', Arial, sans-serif",
|
|
1113
|
+
},
|
|
1114
|
+
latinmodern: {
|
|
1115
|
+
name: 'Latin Modern (LaTeX)',
|
|
1116
|
+
category: 'serif',
|
|
1117
|
+
supplied: 'Latin Modern Roman',
|
|
1118
|
+
stack: "'Latin Modern Roman', 'Computer Modern', 'Times New Roman', serif",
|
|
1119
|
+
},
|
|
990
1120
|
};
|
|
1121
|
+
/** How a picker groups the typefaces, in the order it shows them. */
|
|
1122
|
+
export const FONT_CATEGORIES = ['sans', 'serif', 'slab'];
|
|
991
1123
|
export const DocumentFontIdSchema = z.enum(Object.keys(DOCUMENT_FONTS));
|
|
992
1124
|
/**
|
|
993
1125
|
* Inks a document (or one line of it) may be set in.
|
|
@@ -1003,6 +1135,21 @@ export const INK_COLORS = {
|
|
|
1003
1135
|
maroon: { name: 'Maroon', hex: '#6b2434' },
|
|
1004
1136
|
forest: { name: 'Forest', hex: '#1f4433' },
|
|
1005
1137
|
grey: { name: 'Grey', hex: '#5a5a5a' },
|
|
1138
|
+
/*
|
|
1139
|
+
* The wider palette. Same rule as the first six: every ink holds at least
|
|
1140
|
+
* 4.5:1 against white (WCAG AA for body text; these all clear 8:1), so a
|
|
1141
|
+
* document set in any of them stays readable on paper, in greyscale and in
|
|
1142
|
+
* an ATS preview. `template.spec.ts` asserts the contrast, so a lighter ink
|
|
1143
|
+
* cannot be added.
|
|
1144
|
+
*/
|
|
1145
|
+
charcoal: { name: 'Charcoal', hex: '#2e3236' },
|
|
1146
|
+
cobalt: { name: 'Cobalt', hex: '#1d4a91' },
|
|
1147
|
+
indigo: { name: 'Indigo', hex: '#2f3878' },
|
|
1148
|
+
teal: { name: 'Teal', hex: '#0f5257' },
|
|
1149
|
+
olive: { name: 'Olive', hex: '#404a1c' },
|
|
1150
|
+
plum: { name: 'Plum', hex: '#4e2a5a' },
|
|
1151
|
+
rust: { name: 'Rust', hex: '#7c3416' },
|
|
1152
|
+
brown: { name: 'Brown', hex: '#57382a' },
|
|
1006
1153
|
};
|
|
1007
1154
|
export const InkIdSchema = z.enum(Object.keys(INK_COLORS));
|
|
1008
1155
|
/**
|
|
@@ -1146,6 +1293,24 @@ export const SCALE_MIN = 0.85;
|
|
|
1146
1293
|
export const SCALE_MAX = 1.2;
|
|
1147
1294
|
export const SCALE_STEP = 0.05;
|
|
1148
1295
|
export const SCALE_DEFAULT = 1;
|
|
1296
|
+
/**
|
|
1297
|
+
* Sizes for one role of the document — the name, the section headings, the body
|
|
1298
|
+
* text — as a multiplier on what the template (and the overall scale) already
|
|
1299
|
+
* set for that role. Bounded and stepped like the scale, so there is still no
|
|
1300
|
+
* free numeric size; absent means the template's own size for the role.
|
|
1301
|
+
*/
|
|
1302
|
+
export const ROLE_SIZE_MIN = 0.8;
|
|
1303
|
+
export const ROLE_SIZE_MAX = 1.3;
|
|
1304
|
+
export const ROLE_SIZE_STEP = 0.05;
|
|
1305
|
+
export const ROLE_SIZE_DEFAULT = 1;
|
|
1306
|
+
export const DOCUMENT_ROLES = ['name', 'heading', 'body'];
|
|
1307
|
+
/** Round a role size onto its step, within its bounds. */
|
|
1308
|
+
export function normalizeRoleSize(value) {
|
|
1309
|
+
const stepped = Math.round(value / ROLE_SIZE_STEP) * ROLE_SIZE_STEP;
|
|
1310
|
+
const clamped = Math.min(ROLE_SIZE_MAX, Math.max(ROLE_SIZE_MIN, stepped));
|
|
1311
|
+
return Number(clamped.toFixed(2));
|
|
1312
|
+
}
|
|
1313
|
+
const RoleSizeSchema = z.number().min(ROLE_SIZE_MIN).max(ROLE_SIZE_MAX);
|
|
1149
1314
|
/** Round to the nearest representable scale, clamped to the bounds. */
|
|
1150
1315
|
export function normalizeScale(value) {
|
|
1151
1316
|
const stepped = Math.round(value / SCALE_STEP) * SCALE_STEP;
|
|
@@ -1153,6 +1318,51 @@ export function normalizeScale(value) {
|
|
|
1153
1318
|
// Steps of 0.05 are not exact in binary; two decimals is the domain's precision.
|
|
1154
1319
|
return Number(clamped.toFixed(2));
|
|
1155
1320
|
}
|
|
1321
|
+
/**
|
|
1322
|
+
* How far apart the letters of the document's text sit — an override of the
|
|
1323
|
+
* template's tracking, chosen from presets, never a free number.
|
|
1324
|
+
*
|
|
1325
|
+
* Absent means the template's own tracking, which is what every stored
|
|
1326
|
+
* document has. Headings keep the template's tracking either way: it is part of
|
|
1327
|
+
* how a heading is drawn (an uppercase rule is tracked open on purpose), and
|
|
1328
|
+
* {@link HEADING_CASES} owns it when the candidate changes the heading's case.
|
|
1329
|
+
*/
|
|
1330
|
+
export const LETTER_SPACINGS = {
|
|
1331
|
+
tight: { name: 'Tight', em: -0.01 },
|
|
1332
|
+
wide: { name: 'Wide', em: 0.02 },
|
|
1333
|
+
};
|
|
1334
|
+
export const LetterSpacingIdSchema = z.enum(Object.keys(LETTER_SPACINGS));
|
|
1335
|
+
/**
|
|
1336
|
+
* The distance between lines of the document's text, as a unitless line height
|
|
1337
|
+
* from presets. Absent means the template's own leading. Headings keep theirs.
|
|
1338
|
+
*/
|
|
1339
|
+
export const LINE_HEIGHTS = {
|
|
1340
|
+
compact: { name: 'Compact', value: 1.15 },
|
|
1341
|
+
relaxed: { name: 'Relaxed', value: 1.4 },
|
|
1342
|
+
airy: { name: 'Airy', value: 1.55 },
|
|
1343
|
+
};
|
|
1344
|
+
export const LineHeightIdSchema = z.enum(Object.keys(LINE_HEIGHTS));
|
|
1345
|
+
/**
|
|
1346
|
+
* How section headings are cased. A presentation of the heading, never its
|
|
1347
|
+
* text: the stored heading is unchanged, so copy-out and ATS extraction read
|
|
1348
|
+
* what the candidate wrote. Absent means the template's own casing.
|
|
1349
|
+
*/
|
|
1350
|
+
export const HEADING_CASES = {
|
|
1351
|
+
normal: { name: 'As written' },
|
|
1352
|
+
upper: { name: 'Uppercase' },
|
|
1353
|
+
smallcaps: { name: 'Small caps' },
|
|
1354
|
+
};
|
|
1355
|
+
export const HeadingCaseIdSchema = z.enum(Object.keys(HEADING_CASES));
|
|
1356
|
+
/**
|
|
1357
|
+
* How heavy section headings are. Two weights, because every font in
|
|
1358
|
+
* {@link DOCUMENT_FONTS} ships both, so no choice falls back to a synthesised
|
|
1359
|
+
* weight. Absent means the template's own weight.
|
|
1360
|
+
*/
|
|
1361
|
+
export const HEADING_WEIGHTS = {
|
|
1362
|
+
regular: { name: 'Regular', weight: 400 },
|
|
1363
|
+
bold: { name: 'Bold', weight: 700 },
|
|
1364
|
+
};
|
|
1365
|
+
export const HeadingWeightIdSchema = z.enum(Object.keys(HEADING_WEIGHTS));
|
|
1156
1366
|
/**
|
|
1157
1367
|
* How the whole document is set. Absent means the template's own defaults — a
|
|
1158
1368
|
* resume nobody has styled renders exactly as the template defines it.
|
|
@@ -1179,12 +1389,47 @@ export const DocumentStyleSchema = z.object({
|
|
|
1179
1389
|
accent: InkIdSchema.optional(),
|
|
1180
1390
|
/** Absent means the template's own rhythm — see {@link DENSITIES}. */
|
|
1181
1391
|
density: DensityIdSchema.optional(),
|
|
1392
|
+
/*
|
|
1393
|
+
* The typographic controls a word processor offers, each as a preset over
|
|
1394
|
+
* the template rather than a free value, and each absent unless chosen — so
|
|
1395
|
+
* a document that sets none renders exactly as the template defines it.
|
|
1396
|
+
*/
|
|
1397
|
+
/** Letter spacing of the text — see {@link LETTER_SPACINGS}. */
|
|
1398
|
+
tracking: LetterSpacingIdSchema.optional(),
|
|
1399
|
+
/** Line height of the text — see {@link LINE_HEIGHTS}. */
|
|
1400
|
+
leading: LineHeightIdSchema.optional(),
|
|
1401
|
+
/** The typeface of the name and section headings, from the same vetted set. */
|
|
1402
|
+
headingFont: DocumentFontIdSchema.optional(),
|
|
1403
|
+
/** How section headings are cased — see {@link HEADING_CASES}. */
|
|
1404
|
+
headingCase: HeadingCaseIdSchema.optional(),
|
|
1405
|
+
/** How heavy section headings are — see {@link HEADING_WEIGHTS}. */
|
|
1406
|
+
headingWeight: HeadingWeightIdSchema.optional(),
|
|
1407
|
+
/** The name's size, over the template's — see {@link ROLE_SIZE_MIN}. */
|
|
1408
|
+
nameSize: RoleSizeSchema.optional(),
|
|
1409
|
+
/** The section headings' size, over the template's. */
|
|
1410
|
+
headingSize: RoleSizeSchema.optional(),
|
|
1411
|
+
/** The body text's size, over the template's. */
|
|
1412
|
+
bodySize: RoleSizeSchema.optional(),
|
|
1182
1413
|
});
|
|
1183
1414
|
/** How one line is set, over and above the document's own style. */
|
|
1184
1415
|
export const FieldAlignSchema = z.enum(['left', 'center', 'right']);
|
|
1416
|
+
/**
|
|
1417
|
+
* One step smaller or larger than the template sets the line. A step, not a
|
|
1418
|
+
* size: the template's proportions hold, so a stepped-up bullet still reads
|
|
1419
|
+
* smaller than a heading.
|
|
1420
|
+
*/
|
|
1421
|
+
export const FIELD_STEPS = {
|
|
1422
|
+
smaller: { name: 'Smaller', factor: 0.9 },
|
|
1423
|
+
larger: { name: 'Larger', factor: 1.12 },
|
|
1424
|
+
};
|
|
1425
|
+
export const FieldStepSchema = z.enum(Object.keys(FIELD_STEPS));
|
|
1185
1426
|
export const FieldFormatSchema = z.object({
|
|
1186
1427
|
path: ResumeFieldPathSchema,
|
|
1187
1428
|
bold: z.boolean().optional(),
|
|
1429
|
+
italic: z.boolean().optional(),
|
|
1430
|
+
underline: z.boolean().optional(),
|
|
1431
|
+
/** One step smaller or larger — see {@link FIELD_STEPS}. */
|
|
1432
|
+
step: FieldStepSchema.optional(),
|
|
1188
1433
|
align: FieldAlignSchema.optional(),
|
|
1189
1434
|
ink: InkIdSchema.optional(),
|
|
1190
1435
|
/** Extra space above this field — the one place a section rule cannot reach. */
|
|
@@ -1207,6 +1452,9 @@ export const FieldFormatSchema = z.object({
|
|
|
1207
1452
|
/** A format carrying no flags says nothing; it is dropped rather than stored. */
|
|
1208
1453
|
export function formatIsEmpty(format) {
|
|
1209
1454
|
return (format.bold === undefined &&
|
|
1455
|
+
format.italic === undefined &&
|
|
1456
|
+
format.underline === undefined &&
|
|
1457
|
+
format.step === undefined &&
|
|
1210
1458
|
format.align === undefined &&
|
|
1211
1459
|
format.ink === undefined &&
|
|
1212
1460
|
format.href === undefined &&
|
|
@@ -1251,12 +1499,7 @@ export const THEMES = {
|
|
|
1251
1499
|
classic: {
|
|
1252
1500
|
name: 'Classic',
|
|
1253
1501
|
description: 'Serif and restrained',
|
|
1254
|
-
style: {
|
|
1255
|
-
font: 'times',
|
|
1256
|
-
ink: 'ink',
|
|
1257
|
-
accent: 'ink',
|
|
1258
|
-
density: 'normal',
|
|
1259
|
-
},
|
|
1502
|
+
style: { font: 'times', ink: 'ink', accent: 'ink', density: 'normal' },
|
|
1260
1503
|
},
|
|
1261
1504
|
modern: {
|
|
1262
1505
|
name: 'Modern',
|
|
@@ -1271,33 +1514,130 @@ export const THEMES = {
|
|
|
1271
1514
|
compact: {
|
|
1272
1515
|
name: 'Compact',
|
|
1273
1516
|
description: 'Tight, fits more',
|
|
1517
|
+
style: { font: 'arial', ink: 'ink', accent: 'grey', density: 'tight' },
|
|
1518
|
+
},
|
|
1519
|
+
academic: {
|
|
1520
|
+
name: 'Academic',
|
|
1521
|
+
description: 'Formal and sober',
|
|
1522
|
+
style: { font: 'georgia', ink: 'ink', accent: 'maroon', density: 'normal' },
|
|
1523
|
+
},
|
|
1524
|
+
minimal: {
|
|
1525
|
+
name: 'Minimal',
|
|
1526
|
+
description: 'Quiet, light headings',
|
|
1274
1527
|
style: {
|
|
1275
|
-
font: '
|
|
1276
|
-
ink: '
|
|
1528
|
+
font: 'inter',
|
|
1529
|
+
ink: 'charcoal',
|
|
1277
1530
|
accent: 'grey',
|
|
1531
|
+
density: 'roomy',
|
|
1532
|
+
headingWeight: 'regular',
|
|
1533
|
+
},
|
|
1534
|
+
},
|
|
1535
|
+
corporate: {
|
|
1536
|
+
name: 'Corporate',
|
|
1537
|
+
description: 'Clean and businesslike',
|
|
1538
|
+
style: {
|
|
1539
|
+
font: 'opensans',
|
|
1540
|
+
ink: 'slate',
|
|
1541
|
+
accent: 'cobalt',
|
|
1542
|
+
density: 'normal',
|
|
1543
|
+
headingCase: 'upper',
|
|
1544
|
+
},
|
|
1545
|
+
},
|
|
1546
|
+
tech: {
|
|
1547
|
+
name: 'Tech',
|
|
1548
|
+
description: 'Precise and compact',
|
|
1549
|
+
style: {
|
|
1550
|
+
font: 'plexsans',
|
|
1551
|
+
ink: 'charcoal',
|
|
1552
|
+
accent: 'teal',
|
|
1278
1553
|
density: 'tight',
|
|
1554
|
+
headingFont: 'plexserif',
|
|
1279
1555
|
},
|
|
1280
1556
|
},
|
|
1281
|
-
|
|
1282
|
-
name: '
|
|
1283
|
-
description: '
|
|
1557
|
+
boardroom: {
|
|
1558
|
+
name: 'Boardroom',
|
|
1559
|
+
description: 'Stately small capitals',
|
|
1560
|
+
style: {
|
|
1561
|
+
font: 'garamond',
|
|
1562
|
+
ink: 'ink',
|
|
1563
|
+
accent: 'navy',
|
|
1564
|
+
density: 'normal',
|
|
1565
|
+
headingCase: 'smallcaps',
|
|
1566
|
+
},
|
|
1567
|
+
},
|
|
1568
|
+
editorial: {
|
|
1569
|
+
name: 'Editorial',
|
|
1570
|
+
description: 'Warm magazine serif',
|
|
1571
|
+
style: {
|
|
1572
|
+
font: 'lora',
|
|
1573
|
+
ink: 'brown',
|
|
1574
|
+
accent: 'rust',
|
|
1575
|
+
density: 'normal',
|
|
1576
|
+
headingFont: 'montserrat',
|
|
1577
|
+
headingCase: 'upper',
|
|
1578
|
+
},
|
|
1579
|
+
},
|
|
1580
|
+
creative: {
|
|
1581
|
+
name: 'Creative',
|
|
1582
|
+
description: 'Expressive display headings',
|
|
1284
1583
|
style: {
|
|
1285
|
-
font: '
|
|
1584
|
+
font: 'worksans',
|
|
1585
|
+
ink: 'charcoal',
|
|
1586
|
+
accent: 'plum',
|
|
1587
|
+
density: 'roomy',
|
|
1588
|
+
headingFont: 'playfair',
|
|
1589
|
+
},
|
|
1590
|
+
},
|
|
1591
|
+
fresh: {
|
|
1592
|
+
name: 'Fresh',
|
|
1593
|
+
description: 'Friendly and airy',
|
|
1594
|
+
style: {
|
|
1595
|
+
font: 'nunitosans',
|
|
1596
|
+
ink: 'slate',
|
|
1597
|
+
accent: 'forest',
|
|
1598
|
+
density: 'roomy',
|
|
1599
|
+
leading: 'relaxed',
|
|
1600
|
+
},
|
|
1601
|
+
},
|
|
1602
|
+
latex: {
|
|
1603
|
+
name: 'LaTeX',
|
|
1604
|
+
description: 'The look of a typeset paper',
|
|
1605
|
+
style: {
|
|
1606
|
+
font: 'latinmodern',
|
|
1286
1607
|
ink: 'ink',
|
|
1287
|
-
accent: '
|
|
1608
|
+
accent: 'ink',
|
|
1288
1609
|
density: 'normal',
|
|
1610
|
+
headingCase: 'smallcaps',
|
|
1289
1611
|
},
|
|
1290
1612
|
},
|
|
1291
1613
|
};
|
|
1614
|
+
/**
|
|
1615
|
+
* What a theme speaks to. Applying one clears all of these before setting its
|
|
1616
|
+
* own, so a heading case one theme chose does not leak into the next.
|
|
1617
|
+
*/
|
|
1618
|
+
export const THEME_KEYS = [
|
|
1619
|
+
'font',
|
|
1620
|
+
'ink',
|
|
1621
|
+
'accent',
|
|
1622
|
+
'density',
|
|
1623
|
+
'headingFont',
|
|
1624
|
+
'headingCase',
|
|
1625
|
+
'headingWeight',
|
|
1626
|
+
'tracking',
|
|
1627
|
+
'leading',
|
|
1628
|
+
];
|
|
1292
1629
|
/**
|
|
1293
1630
|
* Apply a theme, preserving what the theme does not speak to.
|
|
1294
1631
|
*
|
|
1295
|
-
* The size scale
|
|
1632
|
+
* The size scale and the role sizes survive: they are how a candidate fits their resume on one page,
|
|
1296
1633
|
* which is a decision about THEIR document rather than about its styling, and
|
|
1297
1634
|
* silently resetting it would undo work a theme has no opinion about.
|
|
1298
1635
|
*/
|
|
1299
1636
|
export function applyTheme(style, id) {
|
|
1300
|
-
|
|
1637
|
+
const kept = { ...style };
|
|
1638
|
+
for (const key of THEME_KEYS)
|
|
1639
|
+
delete kept[key];
|
|
1640
|
+
return { ...kept, ...THEMES[id].style };
|
|
1301
1641
|
}
|
|
1302
1642
|
/** Extra space above one named section. */
|
|
1303
1643
|
export const SectionSpacingSchema = z.object({
|
package/package.json
CHANGED