@resumekit/schema 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +27 -2
- package/dist/collections.d.ts +572 -0
- package/dist/collections.d.ts.map +1 -0
- package/dist/collections.js +479 -0
- package/dist/export-contract.d.ts +52 -0
- package/dist/export-contract.d.ts.map +1 -0
- package/dist/export-contract.js +17 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/letter.d.ts +13 -0
- package/dist/letter.d.ts.map +1 -0
- package/dist/letter.js +1 -0
- package/dist/library.d.ts +60 -0
- package/dist/library.d.ts.map +1 -0
- package/dist/library.js +118 -0
- package/dist/locale.d.ts +11 -0
- package/dist/locale.d.ts.map +1 -0
- package/dist/locale.js +6 -0
- package/dist/resume-dates.d.ts +122 -0
- package/dist/resume-dates.d.ts.map +1 -0
- package/dist/resume-dates.js +185 -0
- package/dist/resume.d.ts +271 -0
- package/dist/resume.d.ts.map +1 -0
- package/dist/resume.js +367 -0
- package/dist/template.d.ts +2049 -0
- package/dist/template.d.ts.map +1 -0
- package/dist/template.js +2050 -0
- package/package.json +51 -3
- package/src/collections.ts +595 -0
- package/src/export-contract.ts +64 -0
- package/src/index.ts +8 -0
- package/src/letter.ts +12 -0
- package/src/library.ts +179 -0
- package/src/locale.ts +8 -0
- package/src/resume-dates.ts +252 -0
- package/src/resume.ts +410 -0
- package/src/template.ts +2360 -0
|
@@ -0,0 +1,2049 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type CollectionId, type PresentedResume } from './collections.js';
|
|
3
|
+
import { type ResumeObject } from './resume.js';
|
|
4
|
+
/**
|
|
5
|
+
* Resume templates — the renderers that turn a {@link ResumeObject} into a
|
|
6
|
+
* document — plus the **presentation overlay** that records a candidate's own
|
|
7
|
+
* corrections to one.
|
|
8
|
+
*
|
|
9
|
+
* Framework-free on purpose. A template is data here and a renderer in whichever
|
|
10
|
+
* surface draws it, so the same catalog is readable by the API, the web app, and
|
|
11
|
+
* any future render service, and switching template stays a data operation
|
|
12
|
+
* costing zero LLM tokens.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* The template catalog. Data — add an entry plus a renderer and a new template
|
|
16
|
+
* exists; nothing about the editor changes.
|
|
17
|
+
*
|
|
18
|
+
* `ats` states what a template guarantees against the knowledge base's format
|
|
19
|
+
* rules. It is not marketing copy: every line must be true of the rendered
|
|
20
|
+
* document, because it is the reason a candidate can trust this output in a
|
|
21
|
+
* screening system.
|
|
22
|
+
*
|
|
23
|
+
* `columns` states the same fact as a NUMBER, because the chooser draws a badge
|
|
24
|
+
* from it and a badge cannot be produced by reading English. The `ats` lines are
|
|
25
|
+
* sentences written for a candidate, and matching `/two columns/i` against one
|
|
26
|
+
* would make the badge silently wrong the first time somebody reworded it — in
|
|
27
|
+
* the one property a screening system reads differently. Structured here, and
|
|
28
|
+
* `template.spec.ts` asserts the two AGREE rather than deriving one from the
|
|
29
|
+
* other. See `editor-tabbed-rail` (#48), design decision 3.
|
|
30
|
+
*/
|
|
31
|
+
export declare const TEMPLATES: {
|
|
32
|
+
readonly harvard: {
|
|
33
|
+
readonly name: "Harvard";
|
|
34
|
+
readonly description: string;
|
|
35
|
+
readonly page: "letter";
|
|
36
|
+
readonly columns: 1;
|
|
37
|
+
readonly ats: readonly ["Single column — no sidebar, no text boxes", "No tables, images, or icon fonts carrying meaning", "Real selectable text, standard system typefaces", "Reverse-chronological sections with YYYY-MM dates"];
|
|
38
|
+
};
|
|
39
|
+
readonly ivy: {
|
|
40
|
+
readonly name: "Ivy League";
|
|
41
|
+
readonly description: string;
|
|
42
|
+
readonly page: "letter";
|
|
43
|
+
readonly columns: 1;
|
|
44
|
+
readonly ats: readonly ["Single column — no sidebar, no text boxes", "Skills as a list, one keyword per item, under their categories", "No tables, images, or icon fonts carrying meaning", "Real selectable text, standard system typefaces", "Reverse-chronological sections with YYYY-MM dates"];
|
|
45
|
+
};
|
|
46
|
+
readonly classic: {
|
|
47
|
+
readonly name: "Classic";
|
|
48
|
+
readonly description: string;
|
|
49
|
+
readonly page: "letter";
|
|
50
|
+
readonly columns: 1;
|
|
51
|
+
readonly ats: readonly ["Single column — no sidebar, no text boxes", "Headings in plain text, with no rules or bands to parse around", "No tables, images, or icon fonts carrying meaning", "Real selectable text, standard system typefaces", "Reverse-chronological sections with YYYY-MM dates"];
|
|
52
|
+
};
|
|
53
|
+
readonly compact: {
|
|
54
|
+
readonly name: "Compact";
|
|
55
|
+
readonly description: string;
|
|
56
|
+
readonly page: "letter";
|
|
57
|
+
readonly columns: 2;
|
|
58
|
+
readonly ats: readonly ["Two columns — the resume is written first, so extracted text reads the work history through before the rail", "Skills are chips by appearance and a list by structure — one skill per extracted line", "No tables, images, or icon fonts carrying meaning", "Real selectable text, standard system typefaces", "Reverse-chronological sections with YYYY-MM dates"];
|
|
59
|
+
};
|
|
60
|
+
readonly timeline: {
|
|
61
|
+
readonly name: "Timeline";
|
|
62
|
+
readonly description: string;
|
|
63
|
+
readonly page: "letter";
|
|
64
|
+
readonly columns: 1;
|
|
65
|
+
readonly ats: readonly ["Single column — the spine is a border, not a layout", "Each entry extracts as its dates, its place, then the role and employer", "Skills are chips by appearance and a list by structure — one skill per extracted line", "No tables, images, or icon fonts carrying meaning", "Reverse-chronological sections with YYYY-MM dates"];
|
|
66
|
+
};
|
|
67
|
+
readonly modern: {
|
|
68
|
+
readonly name: "Modern";
|
|
69
|
+
readonly description: string;
|
|
70
|
+
readonly page: "letter";
|
|
71
|
+
readonly columns: 2;
|
|
72
|
+
readonly ats: readonly ["Two columns — the work history is written first, so extracted text reads it through before the rail", "The initials are decoration with no text of their own to extract", "Skills are chips by appearance and a list by structure — one skill per extracted line", "No tables, images, or icon fonts carrying meaning", "Reverse-chronological sections with YYYY-MM dates"];
|
|
73
|
+
};
|
|
74
|
+
readonly stylish: {
|
|
75
|
+
readonly name: "Stylish";
|
|
76
|
+
readonly description: string;
|
|
77
|
+
readonly page: "letter";
|
|
78
|
+
readonly columns: 2;
|
|
79
|
+
readonly ats: readonly ["Two columns, written in the order they are read — the rail is on the left, so extracted text gives the highlights and skills before the work history", "The initials are decoration with no text of their own to extract", "Skills are chips by appearance and a list by structure — one skill per extracted line", "No tables, images, or icon fonts carrying meaning", "Reverse-chronological sections with YYYY-MM dates"];
|
|
80
|
+
};
|
|
81
|
+
readonly creative: {
|
|
82
|
+
readonly name: "Creative";
|
|
83
|
+
readonly description: string;
|
|
84
|
+
readonly page: "letter";
|
|
85
|
+
readonly columns: 2;
|
|
86
|
+
readonly ats: readonly ["Two columns — the work history is written first, so extracted text reads it through before the rail", "Band colour is forced to print, so white-on-navy never vanishes", "Skills are chips by appearance and a list by structure — one skill per extracted line", "No tables, images, or icon fonts carrying meaning", "Reverse-chronological sections with YYYY-MM dates"];
|
|
87
|
+
};
|
|
88
|
+
readonly contemporary: {
|
|
89
|
+
readonly name: "Contemporary";
|
|
90
|
+
readonly description: string;
|
|
91
|
+
readonly page: "letter";
|
|
92
|
+
readonly columns: 2;
|
|
93
|
+
readonly ats: readonly ["Two columns, written in the order they are read — the rail is on the left, so extracted text gives the contact details and highlights before the work history", "The headline’s pill is a background behind ordinary text — nothing is lost when the colour is not printed", "Skills as a list, one keyword per item, under their categories", "No tables, images, or icon fonts carrying meaning", "Reverse-chronological sections with YYYY-MM dates"];
|
|
94
|
+
};
|
|
95
|
+
readonly 'double-column': {
|
|
96
|
+
readonly name: "Double Column";
|
|
97
|
+
readonly description: string;
|
|
98
|
+
readonly page: "letter";
|
|
99
|
+
readonly columns: 2;
|
|
100
|
+
readonly ats: readonly ["Two columns — the work history is written first, so extracted text reads it through before the rail", "Skills are filled chips by appearance and a list by structure — one skill per extracted line", "Nothing on the page depends on a printed background", "No tables, images, or icon fonts carrying meaning", "Reverse-chronological sections with YYYY-MM dates"];
|
|
101
|
+
};
|
|
102
|
+
readonly 'double-column-logos': {
|
|
103
|
+
readonly name: "Double Column with Logos";
|
|
104
|
+
readonly description: string;
|
|
105
|
+
readonly page: "letter";
|
|
106
|
+
readonly columns: 2;
|
|
107
|
+
readonly ats: readonly ["Two columns — the work history is written first, so extracted text reads it through before the rail", "The marks are initials with no text of their own to extract, and no image is fetched", "Skills are filled chips by appearance and a list by structure — one skill per extracted line", "No tables, images, or icon fonts carrying meaning", "Reverse-chronological sections with YYYY-MM dates"];
|
|
108
|
+
};
|
|
109
|
+
readonly elegant: {
|
|
110
|
+
readonly name: "Elegant";
|
|
111
|
+
readonly description: string;
|
|
112
|
+
readonly page: "letter";
|
|
113
|
+
readonly columns: 2;
|
|
114
|
+
readonly ats: readonly ["Two columns — the work history is written first, so extracted text reads it through before the rail", "Rail colour is forced to print, so white-on-navy never vanishes", "The rail is a column with a background, not a box the text is placed inside", "No tables, images, or icon fonts carrying meaning", "Reverse-chronological sections with YYYY-MM dates"];
|
|
115
|
+
};
|
|
116
|
+
readonly 'elegant-logos': {
|
|
117
|
+
readonly name: "Elegant with Logos";
|
|
118
|
+
readonly description: string;
|
|
119
|
+
readonly page: "letter";
|
|
120
|
+
readonly columns: 2;
|
|
121
|
+
readonly ats: readonly ["Two columns — the work history is written first, so extracted text reads it through before the rail", "Rail colour is forced to print, so white-on-navy never vanishes", "The marks are initials with no text of their own to extract, and no image is fetched", "No tables, images, or icon fonts carrying meaning", "Reverse-chronological sections with YYYY-MM dates"];
|
|
122
|
+
};
|
|
123
|
+
readonly polished: {
|
|
124
|
+
readonly name: "Polished";
|
|
125
|
+
readonly description: string;
|
|
126
|
+
readonly page: "letter";
|
|
127
|
+
readonly columns: 2;
|
|
128
|
+
readonly ats: readonly ["Two columns, written in the order they are read — the rail is on the left, so extracted text opens with the name and the highlights", "Rail colour is forced to print, so white-on-teal never vanishes", "The rail is a column with a background, not a box the text is placed inside", "No tables, images, or icon fonts carrying meaning", "Reverse-chronological sections with YYYY-MM dates"];
|
|
129
|
+
};
|
|
130
|
+
readonly executive: {
|
|
131
|
+
readonly name: "Executive";
|
|
132
|
+
readonly description: string;
|
|
133
|
+
readonly page: "letter";
|
|
134
|
+
readonly columns: 1;
|
|
135
|
+
readonly ats: readonly ["Skills in visual columns over a single list — extracted text stays linear", "No tables, images, or icon fonts carrying meaning", "Real selectable text, standard system typefaces", "Header colour is forced to print, so white-on-navy never vanishes", "Reverse-chronological sections with YYYY-MM dates"];
|
|
136
|
+
};
|
|
137
|
+
readonly meridian: {
|
|
138
|
+
readonly name: "Meridian";
|
|
139
|
+
readonly description: string;
|
|
140
|
+
readonly page: "letter";
|
|
141
|
+
readonly columns: 2;
|
|
142
|
+
readonly ats: readonly ["Two columns — the resume is written first, so extracted text reads it through before the sidebar", "No tables, images, or icon fonts carrying meaning", "Real selectable text, standard system typefaces", "Both bands are forced to print, so white-on-charcoal never vanishes", "Reverse-chronological sections with YYYY-MM dates"];
|
|
143
|
+
};
|
|
144
|
+
readonly cobalt: {
|
|
145
|
+
readonly name: "Cobalt";
|
|
146
|
+
readonly description: string;
|
|
147
|
+
readonly page: "letter";
|
|
148
|
+
readonly columns: 2;
|
|
149
|
+
readonly ats: readonly ["Two columns, written in the order they are read — extracted text runs summary, skills and education, then the work history", "No tables, images, or icon fonts carrying meaning", "Real selectable text, standard system typefaces", "No printed band — every mark is foreground ink, so it prints complete with background graphics off", "Reverse-chronological sections with YYYY-MM dates"];
|
|
150
|
+
};
|
|
151
|
+
readonly crimson: {
|
|
152
|
+
readonly name: "Crimson";
|
|
153
|
+
readonly description: string;
|
|
154
|
+
readonly page: "letter";
|
|
155
|
+
readonly columns: 1;
|
|
156
|
+
readonly ats: readonly ["Single column — no sidebar, no text boxes", "Skills under their categories, one keyword per extracted unit — never a comma run", "Contact icons are drawn marks with no text of their own to extract", "Real selectable text, set in typefaces embedded in the file", "Reverse-chronological sections with YYYY-MM dates"];
|
|
157
|
+
};
|
|
158
|
+
readonly engineer: {
|
|
159
|
+
readonly name: "Engineer";
|
|
160
|
+
readonly description: string;
|
|
161
|
+
readonly page: "letter";
|
|
162
|
+
readonly columns: 1;
|
|
163
|
+
readonly ats: readonly ["Single column — no sidebar, no text boxes", "Skills under their categories, one keyword per extracted unit — never a comma run", "No tables, images, or icon fonts carrying meaning", "Real selectable text, set in typefaces embedded in the file", "Reverse-chronological sections with YYYY-MM dates"];
|
|
164
|
+
};
|
|
165
|
+
readonly split: {
|
|
166
|
+
readonly name: "Split";
|
|
167
|
+
readonly description: string;
|
|
168
|
+
readonly page: "letter";
|
|
169
|
+
readonly columns: 2;
|
|
170
|
+
readonly ats: readonly ["Two columns, written in the order they are read — the narrow column is on the left, so extracted text gives education, skills and links before the work history", "Skills under their categories, one keyword per extracted unit — never a comma run", "No tables, images, or icon fonts carrying meaning", "Real selectable text, set in typefaces embedded in the file", "Reverse-chronological sections with YYYY-MM dates"];
|
|
171
|
+
};
|
|
172
|
+
readonly academic: {
|
|
173
|
+
readonly name: "Academic";
|
|
174
|
+
readonly description: string;
|
|
175
|
+
readonly page: "letter";
|
|
176
|
+
readonly columns: 1;
|
|
177
|
+
readonly ats: readonly ["Single column — the date margin is part of each entry, not a layout", "Each entry extracts as its dates first, then the role, the organisation and the details", "Skills under their categories, one keyword per extracted unit — never a comma run", "No tables, images, or icon fonts carrying meaning", "Reverse-chronological sections with YYYY-MM dates"];
|
|
178
|
+
};
|
|
179
|
+
readonly alta: {
|
|
180
|
+
readonly name: "Alta";
|
|
181
|
+
readonly description: string;
|
|
182
|
+
readonly page: "letter";
|
|
183
|
+
readonly columns: 2;
|
|
184
|
+
readonly ats: readonly ["Two columns — the work history is written first, so extracted text reads it through before the rail", "Language levels print as words; the dots beside them are decoration", "Contact icons are drawn marks with no text of their own to extract", "Real selectable text, set in typefaces embedded in the file", "Reverse-chronological sections with YYYY-MM dates"];
|
|
185
|
+
};
|
|
186
|
+
readonly prism: {
|
|
187
|
+
readonly name: "Prism";
|
|
188
|
+
readonly description: string;
|
|
189
|
+
readonly page: "letter";
|
|
190
|
+
readonly columns: 2;
|
|
191
|
+
readonly ats: readonly ["Two columns, written in the order they are read — the label column is on the left, so extracted text gives the contact details and skills before the work history", "Not built for screening systems — a design to hand to a reader, not to upload to a job portal", "The header band is forced to print, so white-on-charcoal never vanishes", "Reverse-chronological sections with YYYY-MM dates"];
|
|
192
|
+
};
|
|
193
|
+
readonly hipster: {
|
|
194
|
+
readonly name: "Hipster";
|
|
195
|
+
readonly description: string;
|
|
196
|
+
readonly page: "letter";
|
|
197
|
+
readonly columns: 2;
|
|
198
|
+
readonly ats: readonly ["Two columns, written in the order they are read — the sidebar is on the left, so extracted text gives the summary and skills before the work history", "Not built for screening systems — a design to hand to a reader, not to upload to a job portal", "The header band is forced to print, so white-on-charcoal never vanishes", "The rail is a column with a background, not a box the text is placed inside", "The initials are decoration with no text of their own to extract"];
|
|
199
|
+
};
|
|
200
|
+
readonly scholar: {
|
|
201
|
+
readonly name: "Scholar";
|
|
202
|
+
readonly description: string;
|
|
203
|
+
readonly page: "letter";
|
|
204
|
+
readonly columns: 1;
|
|
205
|
+
readonly ats: readonly ["Single column — no sidebar, no text boxes", "Skills under their categories, one keyword per extracted unit — never a comma run", "Contact details in one centred block of plain text, with no icons", "Real selectable text, set in typefaces embedded in the file", "Reverse-chronological sections with YYYY-MM dates"];
|
|
206
|
+
};
|
|
207
|
+
readonly portrait: {
|
|
208
|
+
readonly name: "Portrait";
|
|
209
|
+
readonly description: string;
|
|
210
|
+
readonly page: "letter";
|
|
211
|
+
readonly columns: 2;
|
|
212
|
+
readonly ats: readonly ["Two columns, written in the order they are read — the sidebar is on the left, so extracted text opens with the name, the contact details and the skills", "Not built for screening systems — a design to hand to a reader, not to upload to a job portal", "The rail is a column with a background, not a box the text is placed inside", "The initials are decoration with no text of their own to extract"];
|
|
213
|
+
};
|
|
214
|
+
readonly curve: {
|
|
215
|
+
readonly name: "Curve";
|
|
216
|
+
readonly description: string;
|
|
217
|
+
readonly page: "letter";
|
|
218
|
+
readonly columns: 1;
|
|
219
|
+
readonly ats: readonly ["Single column — the date margin is part of each entry, not a layout", "Each entry extracts as its dates first, then the role, the organisation and the details", "Entry markers are drawn shapes with no text of their own to extract", "No tables, images, or icon fonts carrying meaning", "Reverse-chronological sections with YYYY-MM dates"];
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
export type TemplateId = keyof typeof TEMPLATES;
|
|
223
|
+
export type TemplateDetails = (typeof TEMPLATES)[TemplateId];
|
|
224
|
+
/**
|
|
225
|
+
* Derived from the catalog keys rather than declared a second time: a template
|
|
226
|
+
* that exists but cannot be requested (or the reverse) is exactly the drift this
|
|
227
|
+
* avoids.
|
|
228
|
+
*/
|
|
229
|
+
export declare const TemplateIdSchema: z.ZodEnum<{
|
|
230
|
+
split: "split";
|
|
231
|
+
harvard: "harvard";
|
|
232
|
+
ivy: "ivy";
|
|
233
|
+
classic: "classic";
|
|
234
|
+
compact: "compact";
|
|
235
|
+
timeline: "timeline";
|
|
236
|
+
modern: "modern";
|
|
237
|
+
stylish: "stylish";
|
|
238
|
+
creative: "creative";
|
|
239
|
+
contemporary: "contemporary";
|
|
240
|
+
"double-column": "double-column";
|
|
241
|
+
"double-column-logos": "double-column-logos";
|
|
242
|
+
elegant: "elegant";
|
|
243
|
+
"elegant-logos": "elegant-logos";
|
|
244
|
+
polished: "polished";
|
|
245
|
+
executive: "executive";
|
|
246
|
+
meridian: "meridian";
|
|
247
|
+
cobalt: "cobalt";
|
|
248
|
+
crimson: "crimson";
|
|
249
|
+
engineer: "engineer";
|
|
250
|
+
academic: "academic";
|
|
251
|
+
alta: "alta";
|
|
252
|
+
prism: "prism";
|
|
253
|
+
hipster: "hipster";
|
|
254
|
+
scholar: "scholar";
|
|
255
|
+
portrait: "portrait";
|
|
256
|
+
curve: "curve";
|
|
257
|
+
}>;
|
|
258
|
+
/** What a resume is presented in when nobody has chosen. */
|
|
259
|
+
export declare const DEFAULT_TEMPLATE_ID: TemplateId;
|
|
260
|
+
export declare function templateDetails(id: TemplateId): TemplateDetails;
|
|
261
|
+
/** The catalog paired with the ids that address it, in declaration order. */
|
|
262
|
+
export declare function orderedTemplates(): {
|
|
263
|
+
id: TemplateId;
|
|
264
|
+
details: TemplateDetails;
|
|
265
|
+
}[];
|
|
266
|
+
/**
|
|
267
|
+
* Operator configuration for one template.
|
|
268
|
+
*
|
|
269
|
+
* Deliberately NOT the whole catalog. Two kinds of fact get called "template
|
|
270
|
+
* metadata" and they have opposite requirements:
|
|
271
|
+
*
|
|
272
|
+
* - **Renderer-bound facts** — id, page size, ATS guarantees — describe what
|
|
273
|
+
* the code DOES. `harvard` is single-column at US Letter because
|
|
274
|
+
* `HarvardDocument` and `harvard.css` say so. In a database the two can
|
|
275
|
+
* disagree, and the product's central claim becomes a string somebody typed.
|
|
276
|
+
* They stay in {@link TEMPLATES}, where a test can hold them to it.
|
|
277
|
+
* - **Operator decisions** — offered or not, in what order, emphasised,
|
|
278
|
+
* badged — describe what the business wants this week and change without
|
|
279
|
+
* any code changing. Needing a deploy for those is the actual complaint.
|
|
280
|
+
*
|
|
281
|
+
* This is the second kind. Every field but the id is optional, so a document
|
|
282
|
+
* that sets only `enabled` is valid configuration.
|
|
283
|
+
*/
|
|
284
|
+
export declare const TemplateConfigSchema: z.ZodObject<{
|
|
285
|
+
template_id: z.ZodString;
|
|
286
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
287
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
288
|
+
featured: z.ZodOptional<z.ZodBoolean>;
|
|
289
|
+
badge: z.ZodOptional<z.ZodString>;
|
|
290
|
+
}, z.core.$strip>;
|
|
291
|
+
export type TemplateConfig = z.infer<typeof TemplateConfigSchema>;
|
|
292
|
+
/** A template as offered to a candidate: catalog facts plus operator emphasis. */
|
|
293
|
+
export declare const OfferedTemplateSchema: z.ZodObject<{
|
|
294
|
+
id: z.ZodEnum<{
|
|
295
|
+
split: "split";
|
|
296
|
+
harvard: "harvard";
|
|
297
|
+
ivy: "ivy";
|
|
298
|
+
classic: "classic";
|
|
299
|
+
compact: "compact";
|
|
300
|
+
timeline: "timeline";
|
|
301
|
+
modern: "modern";
|
|
302
|
+
stylish: "stylish";
|
|
303
|
+
creative: "creative";
|
|
304
|
+
contemporary: "contemporary";
|
|
305
|
+
"double-column": "double-column";
|
|
306
|
+
"double-column-logos": "double-column-logos";
|
|
307
|
+
elegant: "elegant";
|
|
308
|
+
"elegant-logos": "elegant-logos";
|
|
309
|
+
polished: "polished";
|
|
310
|
+
executive: "executive";
|
|
311
|
+
meridian: "meridian";
|
|
312
|
+
cobalt: "cobalt";
|
|
313
|
+
crimson: "crimson";
|
|
314
|
+
engineer: "engineer";
|
|
315
|
+
academic: "academic";
|
|
316
|
+
alta: "alta";
|
|
317
|
+
prism: "prism";
|
|
318
|
+
hipster: "hipster";
|
|
319
|
+
scholar: "scholar";
|
|
320
|
+
portrait: "portrait";
|
|
321
|
+
curve: "curve";
|
|
322
|
+
}>;
|
|
323
|
+
name: z.ZodString;
|
|
324
|
+
description: z.ZodString;
|
|
325
|
+
page: z.ZodString;
|
|
326
|
+
columns: z.ZodNumber;
|
|
327
|
+
ats: z.ZodArray<z.ZodString>;
|
|
328
|
+
featured: z.ZodOptional<z.ZodBoolean>;
|
|
329
|
+
badge: z.ZodOptional<z.ZodString>;
|
|
330
|
+
}, z.core.$strip>;
|
|
331
|
+
export type OfferedTemplate = z.infer<typeof OfferedTemplateSchema>;
|
|
332
|
+
/**
|
|
333
|
+
* The templates a candidate is offered: the catalog, layered with operator
|
|
334
|
+
* configuration. Pure — no I/O, no model call.
|
|
335
|
+
*
|
|
336
|
+
* Configuration can hide a template, order it, and emphasise it. It can NEVER
|
|
337
|
+
* introduce one: an id the catalog does not contain is ignored, because a
|
|
338
|
+
* template without a renderer is a row that draws nothing.
|
|
339
|
+
*
|
|
340
|
+
* The result is never empty. If configuration would leave nothing offered — a
|
|
341
|
+
* bad seed, a typo, a half-finished migration — the default is offered anyway.
|
|
342
|
+
* An editor with no template to choose is not a degraded screen but a broken
|
|
343
|
+
* one, and that failure would arrive through data, where no test would catch it.
|
|
344
|
+
*/
|
|
345
|
+
export declare function resolveTemplates(configs?: readonly TemplateConfig[]): OfferedTemplate[];
|
|
346
|
+
/**
|
|
347
|
+
* Whether a string addresses a location in a {@link ResumeObject} —
|
|
348
|
+
* `summary`, `contact.email`, `experience.2.bullets`.
|
|
349
|
+
*
|
|
350
|
+
* Grammar only. Whether the path *resolves* against a particular resume is a
|
|
351
|
+
* separate question, answered at apply time, because an overlay outlives the
|
|
352
|
+
* resume it was written against.
|
|
353
|
+
*/
|
|
354
|
+
export declare function isResumeFieldPath(path: string): boolean;
|
|
355
|
+
export declare const ResumeFieldPathSchema: z.ZodString;
|
|
356
|
+
/**
|
|
357
|
+
* One edited value: a single field, or a whole list.
|
|
358
|
+
*
|
|
359
|
+
* A list is stored whole rather than as a patch. Resume bullets are bare
|
|
360
|
+
* strings with no stable identity, so any per-item merge would need synthetic
|
|
361
|
+
* ids invented purely to serve the editor — see `design.md`, decision 2.
|
|
362
|
+
*/
|
|
363
|
+
export declare const EditValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
364
|
+
export type EditValue = z.infer<typeof EditValueSchema>;
|
|
365
|
+
/** One replaced field: where, and what it now says. */
|
|
366
|
+
export declare const SetEditSchema: z.ZodObject<{
|
|
367
|
+
kind: z.ZodLiteral<"set">;
|
|
368
|
+
path: z.ZodString;
|
|
369
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
370
|
+
}, z.core.$strip>;
|
|
371
|
+
export type SetEdit = z.infer<typeof SetEditSchema>;
|
|
372
|
+
/**
|
|
373
|
+
* A section that takes appended entries.
|
|
374
|
+
*
|
|
375
|
+
* An allowlist rather than any array path: appending is only meaningful for the
|
|
376
|
+
* listed sections a template draws as repeated entries, and naming them keeps
|
|
377
|
+
* `experience.0.bullets` — which has its own add/remove control — out of a
|
|
378
|
+
* second, structural route to the same thing.
|
|
379
|
+
*/
|
|
380
|
+
export declare const APPENDABLE_SECTIONS: readonly ["experience", "education", "skills", "certifications", "links", "achievements", "courses", "passions", "languages"];
|
|
381
|
+
/**
|
|
382
|
+
* The same set, derived from {@link COLLECTIONS}.
|
|
383
|
+
*
|
|
384
|
+
* `template.spec.ts` asserts the two agree, so a collection cannot be addable
|
|
385
|
+
* here and unknown there — the check `registry.spec.ts` already performs for
|
|
386
|
+
* templates and their renderers. A tuple is kept above because `z.enum` needs
|
|
387
|
+
* one; the derivation is what makes it a projection rather than a second list.
|
|
388
|
+
*
|
|
389
|
+
* `custom_sections` is excluded: a section carries a heading, so declaring one
|
|
390
|
+
* is a different act from appending an entry, and it has its own operation.
|
|
391
|
+
*/
|
|
392
|
+
export declare const APPENDABLE_FROM_COLLECTIONS: readonly CollectionId[];
|
|
393
|
+
export type AppendableSection = (typeof APPENDABLE_SECTIONS)[number];
|
|
394
|
+
export declare const AppendableSectionSchema: z.ZodEnum<{
|
|
395
|
+
links: "links";
|
|
396
|
+
skills: "skills";
|
|
397
|
+
experience: "experience";
|
|
398
|
+
education: "education";
|
|
399
|
+
certifications: "certifications";
|
|
400
|
+
achievements: "achievements";
|
|
401
|
+
courses: "courses";
|
|
402
|
+
passions: "passions";
|
|
403
|
+
languages: "languages";
|
|
404
|
+
}>;
|
|
405
|
+
/**
|
|
406
|
+
* An entry the candidate added to a listed section.
|
|
407
|
+
*
|
|
408
|
+
* `ref` is minted when the entry is created and is how a later `drop` names it.
|
|
409
|
+
* NOT an index: an index is a claim about the base the overlay was written
|
|
410
|
+
* against, and the base changes every time the writer runs again.
|
|
411
|
+
*
|
|
412
|
+
* `entry` is validated against the section's own schema at apply time, so an
|
|
413
|
+
* appended role is the same shape as a written one and is edited through the
|
|
414
|
+
* same locked nodes.
|
|
415
|
+
*/
|
|
416
|
+
export declare const AppendEditSchema: z.ZodObject<{
|
|
417
|
+
kind: z.ZodLiteral<"append">;
|
|
418
|
+
ref: z.ZodString;
|
|
419
|
+
section: z.ZodEnum<{
|
|
420
|
+
links: "links";
|
|
421
|
+
skills: "skills";
|
|
422
|
+
experience: "experience";
|
|
423
|
+
education: "education";
|
|
424
|
+
certifications: "certifications";
|
|
425
|
+
achievements: "achievements";
|
|
426
|
+
courses: "courses";
|
|
427
|
+
passions: "passions";
|
|
428
|
+
languages: "languages";
|
|
429
|
+
}>;
|
|
430
|
+
entry: z.ZodUnknown;
|
|
431
|
+
author: z.ZodEnum<{
|
|
432
|
+
candidate: "candidate";
|
|
433
|
+
}>;
|
|
434
|
+
}, z.core.$strip>;
|
|
435
|
+
export type AppendEdit = z.infer<typeof AppendEditSchema>;
|
|
436
|
+
/**
|
|
437
|
+
* Removal of an addition THIS overlay made.
|
|
438
|
+
*
|
|
439
|
+
* There is deliberately no way to express the removal of writer-produced
|
|
440
|
+
* content. The match score, the requirement audit and `still_missing[]` are all
|
|
441
|
+
* derived against what the writer produced; a document that can silently lose a
|
|
442
|
+
* grounded role is one those derivations no longer describe. Correcting such a
|
|
443
|
+
* role is the `set` path, which already exists.
|
|
444
|
+
*/
|
|
445
|
+
export declare const DropEditSchema: z.ZodObject<{
|
|
446
|
+
kind: z.ZodLiteral<"drop">;
|
|
447
|
+
ref: z.ZodString;
|
|
448
|
+
}, z.core.$strip>;
|
|
449
|
+
export type DropEdit = z.infer<typeof DropEditSchema>;
|
|
450
|
+
/** A section the schema has no concept of, declared by the candidate. */
|
|
451
|
+
export declare const SectionEditSchema: z.ZodObject<{
|
|
452
|
+
kind: z.ZodLiteral<"section">;
|
|
453
|
+
ref: z.ZodString;
|
|
454
|
+
heading: z.ZodString;
|
|
455
|
+
entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
456
|
+
title: z.ZodString;
|
|
457
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
458
|
+
bullets: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
459
|
+
}, z.core.$strip>>>;
|
|
460
|
+
author: z.ZodEnum<{
|
|
461
|
+
candidate: "candidate";
|
|
462
|
+
}>;
|
|
463
|
+
}, z.core.$strip>;
|
|
464
|
+
export type SectionEdit = z.infer<typeof SectionEditSchema>;
|
|
465
|
+
/**
|
|
466
|
+
* One position in a collection, named by WHAT it is rather than by where it sits.
|
|
467
|
+
*
|
|
468
|
+
* A base index names an entry the writer produced; a `ref` names an addition
|
|
469
|
+
* this overlay made. Naming an addition by its ref rather than by its index is
|
|
470
|
+
* what stops dropping one addition from silently re-pointing the slots after it,
|
|
471
|
+
* which a bare list of numbers would.
|
|
472
|
+
*
|
|
473
|
+
* When `document-composition` (#37) mints server-side entry ids, both arms
|
|
474
|
+
* collapse into `{ id }` and the resolution below loses its stale-index branch.
|
|
475
|
+
*/
|
|
476
|
+
export declare const SlotSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
477
|
+
base: z.ZodNumber;
|
|
478
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
479
|
+
ref: z.ZodString;
|
|
480
|
+
}, z.core.$strip>]>;
|
|
481
|
+
export type Slot = z.infer<typeof SlotSchema>;
|
|
482
|
+
/** Stable text for a slot, so two slots can be compared without a type test. */
|
|
483
|
+
export declare const slotKey: (slot: Slot) => string;
|
|
484
|
+
/**
|
|
485
|
+
* The order the candidate put a collection in.
|
|
486
|
+
*
|
|
487
|
+
* Stored as an ORDERING rather than applied by renumbering the overlay's paths.
|
|
488
|
+
* A renumbering is a claim about the base an overlay was written against, and
|
|
489
|
+
* that base changes every time the writer runs again; an ordering is a claim
|
|
490
|
+
* about nothing but itself. Applied last — see `applyPresentation` — so every
|
|
491
|
+
* replacement has already landed on the position it was written against.
|
|
492
|
+
*/
|
|
493
|
+
export declare const ReorderEditSchema: z.ZodObject<{
|
|
494
|
+
kind: z.ZodLiteral<"reorder">;
|
|
495
|
+
section: z.ZodEnum<{
|
|
496
|
+
links: "links";
|
|
497
|
+
skills: "skills";
|
|
498
|
+
experience: "experience";
|
|
499
|
+
education: "education";
|
|
500
|
+
certifications: "certifications";
|
|
501
|
+
achievements: "achievements";
|
|
502
|
+
courses: "courses";
|
|
503
|
+
passions: "passions";
|
|
504
|
+
languages: "languages";
|
|
505
|
+
}>;
|
|
506
|
+
order: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
507
|
+
base: z.ZodNumber;
|
|
508
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
509
|
+
ref: z.ZodString;
|
|
510
|
+
}, z.core.$strip>]>>;
|
|
511
|
+
}, z.core.$strip>;
|
|
512
|
+
export type ReorderEdit = z.infer<typeof ReorderEditSchema>;
|
|
513
|
+
/**
|
|
514
|
+
* A writer-produced entry the candidate does not want on this document.
|
|
515
|
+
*
|
|
516
|
+
* HIDDEN, not deleted, and the distinction is not softness. `match_score`, the
|
|
517
|
+
* requirement audit and `still_missing[]` are all derived against what the
|
|
518
|
+
* writer produced; deleting a role would leave those figures describing a
|
|
519
|
+
* document that no longer exists. A hidden entry is absent from the render and
|
|
520
|
+
* from every export, restorable by the candidate, and still visible as a hidden
|
|
521
|
+
* entry to anything that reads the overlay.
|
|
522
|
+
*/
|
|
523
|
+
export declare const HideEditSchema: z.ZodObject<{
|
|
524
|
+
kind: z.ZodLiteral<"hide">;
|
|
525
|
+
section: z.ZodEnum<{
|
|
526
|
+
links: "links";
|
|
527
|
+
skills: "skills";
|
|
528
|
+
experience: "experience";
|
|
529
|
+
education: "education";
|
|
530
|
+
certifications: "certifications";
|
|
531
|
+
achievements: "achievements";
|
|
532
|
+
courses: "courses";
|
|
533
|
+
passions: "passions";
|
|
534
|
+
languages: "languages";
|
|
535
|
+
}>;
|
|
536
|
+
base: z.ZodNumber;
|
|
537
|
+
}, z.core.$strip>;
|
|
538
|
+
export type HideEdit = z.infer<typeof HideEditSchema>;
|
|
539
|
+
/**
|
|
540
|
+
* One operation in the overlay.
|
|
541
|
+
*
|
|
542
|
+
* `kind` is INJECTED as `'set'` when absent, which is what makes this change
|
|
543
|
+
* additive rather than a migration: every overlay stored before structural
|
|
544
|
+
* operations existed is a list of bare `{path, value}` objects, and each one
|
|
545
|
+
* parses here as the replacement it has always been, with exactly its previous
|
|
546
|
+
* meaning.
|
|
547
|
+
*/
|
|
548
|
+
export declare const ResumeEditSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
549
|
+
kind: z.ZodLiteral<"set">;
|
|
550
|
+
path: z.ZodString;
|
|
551
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
552
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
553
|
+
kind: z.ZodLiteral<"append">;
|
|
554
|
+
ref: z.ZodString;
|
|
555
|
+
section: z.ZodEnum<{
|
|
556
|
+
links: "links";
|
|
557
|
+
skills: "skills";
|
|
558
|
+
experience: "experience";
|
|
559
|
+
education: "education";
|
|
560
|
+
certifications: "certifications";
|
|
561
|
+
achievements: "achievements";
|
|
562
|
+
courses: "courses";
|
|
563
|
+
passions: "passions";
|
|
564
|
+
languages: "languages";
|
|
565
|
+
}>;
|
|
566
|
+
entry: z.ZodUnknown;
|
|
567
|
+
author: z.ZodEnum<{
|
|
568
|
+
candidate: "candidate";
|
|
569
|
+
}>;
|
|
570
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
571
|
+
kind: z.ZodLiteral<"drop">;
|
|
572
|
+
ref: z.ZodString;
|
|
573
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
574
|
+
kind: z.ZodLiteral<"section">;
|
|
575
|
+
ref: z.ZodString;
|
|
576
|
+
heading: z.ZodString;
|
|
577
|
+
entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
578
|
+
title: z.ZodString;
|
|
579
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
580
|
+
bullets: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
581
|
+
}, z.core.$strip>>>;
|
|
582
|
+
author: z.ZodEnum<{
|
|
583
|
+
candidate: "candidate";
|
|
584
|
+
}>;
|
|
585
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
586
|
+
kind: z.ZodLiteral<"reorder">;
|
|
587
|
+
section: z.ZodEnum<{
|
|
588
|
+
links: "links";
|
|
589
|
+
skills: "skills";
|
|
590
|
+
experience: "experience";
|
|
591
|
+
education: "education";
|
|
592
|
+
certifications: "certifications";
|
|
593
|
+
achievements: "achievements";
|
|
594
|
+
courses: "courses";
|
|
595
|
+
passions: "passions";
|
|
596
|
+
languages: "languages";
|
|
597
|
+
}>;
|
|
598
|
+
order: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
599
|
+
base: z.ZodNumber;
|
|
600
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
601
|
+
ref: z.ZodString;
|
|
602
|
+
}, z.core.$strip>]>>;
|
|
603
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
604
|
+
kind: z.ZodLiteral<"hide">;
|
|
605
|
+
section: z.ZodEnum<{
|
|
606
|
+
links: "links";
|
|
607
|
+
skills: "skills";
|
|
608
|
+
experience: "experience";
|
|
609
|
+
education: "education";
|
|
610
|
+
certifications: "certifications";
|
|
611
|
+
achievements: "achievements";
|
|
612
|
+
courses: "courses";
|
|
613
|
+
passions: "passions";
|
|
614
|
+
languages: "languages";
|
|
615
|
+
}>;
|
|
616
|
+
base: z.ZodNumber;
|
|
617
|
+
}, z.core.$strip>], "kind">, unknown>;
|
|
618
|
+
export type ResumeEdit = z.infer<typeof ResumeEditSchema>;
|
|
619
|
+
/**
|
|
620
|
+
* Narrowing helpers, so callers never re-derive the discriminant by hand.
|
|
621
|
+
*
|
|
622
|
+
* `isSetEdit` treats a MISSING `kind` as a replacement, and that is not
|
|
623
|
+
* belt-and-braces: the schema injects the default only for values that pass
|
|
624
|
+
* through it, and an overlay read straight out of storage and handed to
|
|
625
|
+
* `applyPresentation` never does. Without this, every edit written before
|
|
626
|
+
* structural operations existed would be silently skipped — the whole document
|
|
627
|
+
* reverting to the writer's wording with nothing reported. Backward
|
|
628
|
+
* compatibility has to hold at runtime, not only at the parse boundary.
|
|
629
|
+
*/
|
|
630
|
+
export declare const isSetEdit: (edit: ResumeEdit) => edit is SetEdit;
|
|
631
|
+
export declare const isAppendEdit: (edit: ResumeEdit) => edit is AppendEdit;
|
|
632
|
+
export declare const isDropEdit: (edit: ResumeEdit) => edit is DropEdit;
|
|
633
|
+
export declare const isSectionEdit: (edit: ResumeEdit) => edit is SectionEdit;
|
|
634
|
+
export declare const isReorderEdit: (edit: ResumeEdit) => edit is ReorderEdit;
|
|
635
|
+
export declare const isHideEdit: (edit: ResumeEdit) => edit is HideEdit;
|
|
636
|
+
/**
|
|
637
|
+
* The overlay with additions nobody ever typed into taken out of it.
|
|
638
|
+
*
|
|
639
|
+
* An overlay records what the candidate DECIDED. An addition whose entry is
|
|
640
|
+
* still entirely empty records no decision: there is nothing in it, `renderText`
|
|
641
|
+
* already omits it from the text export, and the document being read draws no
|
|
642
|
+
* item for it. What it does do is persist — so pressing add and walking away
|
|
643
|
+
* leaves a permanent, invisible entry behind, and a control that appeared not to
|
|
644
|
+
* work left one per press.
|
|
645
|
+
*
|
|
646
|
+
* Applied when a stored overlay is ADOPTED, and deliberately nowhere else. As a
|
|
647
|
+
* filter on the projection it would delete the entry the candidate has this
|
|
648
|
+
* second pressed add for, before they could type a character into it; as a rule
|
|
649
|
+
* of the save it would race the typing. At load the question is unambiguous:
|
|
650
|
+
* this addition survived a reload with nothing in it, so nothing is lost by
|
|
651
|
+
* dropping it, and one press brings back an identical one.
|
|
652
|
+
*
|
|
653
|
+
* `drop` edits naming a removed addition go with it — there is nothing left to
|
|
654
|
+
* drop — and the refs are taken out of any ordering, since a slot pointing at an
|
|
655
|
+
* addition that no longer exists is a slot `collectionOrder` would skip anyway.
|
|
656
|
+
*
|
|
657
|
+
* Additions the candidate has typed into are untouched: `presentationEdits`
|
|
658
|
+
* folds typed values INTO the addition's own entry, so an entry with a word in
|
|
659
|
+
* it is not unfilled.
|
|
660
|
+
*/
|
|
661
|
+
export declare function withoutUnfilledAdditions(edits: ResumeEdits): ResumeEdits;
|
|
662
|
+
/**
|
|
663
|
+
* The overlay: only what actually changed.
|
|
664
|
+
*
|
|
665
|
+
* A **list**, not a `path → value` map, and the reason is the storage layer.
|
|
666
|
+
* `RunStore.update` writes with Firestore's `set(…, { merge: true })`, which
|
|
667
|
+
* DEEP-merges maps: a candidate who reverted a bullet to the writer's wording
|
|
668
|
+
* would drop that key from the overlay and Firestore would faithfully keep the
|
|
669
|
+
* old one, so the edit could never be undone. Merge replaces an array wholesale,
|
|
670
|
+
* so the overlay says what it means. (It also sidesteps the question of dots in
|
|
671
|
+
* Firestore map keys, which every path would have had.)
|
|
672
|
+
*
|
|
673
|
+
* Paths are unique — two replacements of one field is an ambiguity, not an
|
|
674
|
+
* ordering question.
|
|
675
|
+
*/
|
|
676
|
+
export declare const ResumeEditsSchema: z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
677
|
+
kind: z.ZodLiteral<"set">;
|
|
678
|
+
path: z.ZodString;
|
|
679
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
680
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
681
|
+
kind: z.ZodLiteral<"append">;
|
|
682
|
+
ref: z.ZodString;
|
|
683
|
+
section: z.ZodEnum<{
|
|
684
|
+
links: "links";
|
|
685
|
+
skills: "skills";
|
|
686
|
+
experience: "experience";
|
|
687
|
+
education: "education";
|
|
688
|
+
certifications: "certifications";
|
|
689
|
+
achievements: "achievements";
|
|
690
|
+
courses: "courses";
|
|
691
|
+
passions: "passions";
|
|
692
|
+
languages: "languages";
|
|
693
|
+
}>;
|
|
694
|
+
entry: z.ZodUnknown;
|
|
695
|
+
author: z.ZodEnum<{
|
|
696
|
+
candidate: "candidate";
|
|
697
|
+
}>;
|
|
698
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
699
|
+
kind: z.ZodLiteral<"drop">;
|
|
700
|
+
ref: z.ZodString;
|
|
701
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
702
|
+
kind: z.ZodLiteral<"section">;
|
|
703
|
+
ref: z.ZodString;
|
|
704
|
+
heading: z.ZodString;
|
|
705
|
+
entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
706
|
+
title: z.ZodString;
|
|
707
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
708
|
+
bullets: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
709
|
+
}, z.core.$strip>>>;
|
|
710
|
+
author: z.ZodEnum<{
|
|
711
|
+
candidate: "candidate";
|
|
712
|
+
}>;
|
|
713
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
714
|
+
kind: z.ZodLiteral<"reorder">;
|
|
715
|
+
section: z.ZodEnum<{
|
|
716
|
+
links: "links";
|
|
717
|
+
skills: "skills";
|
|
718
|
+
experience: "experience";
|
|
719
|
+
education: "education";
|
|
720
|
+
certifications: "certifications";
|
|
721
|
+
achievements: "achievements";
|
|
722
|
+
courses: "courses";
|
|
723
|
+
passions: "passions";
|
|
724
|
+
languages: "languages";
|
|
725
|
+
}>;
|
|
726
|
+
order: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
727
|
+
base: z.ZodNumber;
|
|
728
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
729
|
+
ref: z.ZodString;
|
|
730
|
+
}, z.core.$strip>]>>;
|
|
731
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
732
|
+
kind: z.ZodLiteral<"hide">;
|
|
733
|
+
section: z.ZodEnum<{
|
|
734
|
+
links: "links";
|
|
735
|
+
skills: "skills";
|
|
736
|
+
experience: "experience";
|
|
737
|
+
education: "education";
|
|
738
|
+
certifications: "certifications";
|
|
739
|
+
achievements: "achievements";
|
|
740
|
+
courses: "courses";
|
|
741
|
+
passions: "passions";
|
|
742
|
+
languages: "languages";
|
|
743
|
+
}>;
|
|
744
|
+
base: z.ZodNumber;
|
|
745
|
+
}, z.core.$strip>], "kind">, unknown>>;
|
|
746
|
+
export type ResumeEdits = z.infer<typeof ResumeEditsSchema>;
|
|
747
|
+
/**
|
|
748
|
+
* Typefaces the document may use.
|
|
749
|
+
*
|
|
750
|
+
* A curated set, and the curation is the point: every entry is metrically
|
|
751
|
+
* common and extracts cleanly in a screening system. That is what lets a
|
|
752
|
+
* template keep advertising ATS safety while the candidate chooses — a free
|
|
753
|
+
* font field could not.
|
|
754
|
+
*
|
|
755
|
+
* Each entry has two parts. `supplied` is the face the **product ships**, in
|
|
756
|
+
* `libs/resume-templates/src/fonts`, and it leads `stack` so it is what the
|
|
757
|
+
* document is actually drawn in; every supplied face is metrically compatible
|
|
758
|
+
* with the typeface the entry names, wherever such a face exists. `stack` keeps
|
|
759
|
+
* the system families behind it as the declared fallback, so a font file that
|
|
760
|
+
* fails to load degrades to the previous behaviour rather than to nothing.
|
|
761
|
+
*
|
|
762
|
+
* Supplying the faces is what makes the document the same everywhere. A résumé
|
|
763
|
+
* set in "Calibri" used to reach a Mac with no Calibri, Candara, Segoe or Optima
|
|
764
|
+
* installed, fall through the whole stack, and be drawn in Arial — so no two
|
|
765
|
+
* readers saw the same document and no server could match either of them.
|
|
766
|
+
*
|
|
767
|
+
* Data here rather than in the toolbar because two surfaces read it: the editor
|
|
768
|
+
* and the PDF renderer. A font list maintained inside a React component is a
|
|
769
|
+
* list the server renderer silently disagrees with.
|
|
770
|
+
*/
|
|
771
|
+
export declare const DOCUMENT_FONTS: {
|
|
772
|
+
readonly helvetica: {
|
|
773
|
+
readonly name: "Helvetica";
|
|
774
|
+
readonly supplied: "TeX Gyre Heros";
|
|
775
|
+
readonly stack: "'TeX Gyre Heros', 'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', sans-serif";
|
|
776
|
+
};
|
|
777
|
+
readonly arial: {
|
|
778
|
+
readonly name: "Arial";
|
|
779
|
+
readonly supplied: "Arimo";
|
|
780
|
+
readonly stack: "Arimo, Arial, 'Helvetica Neue', Helvetica, 'Liberation Sans', sans-serif";
|
|
781
|
+
};
|
|
782
|
+
readonly calibri: {
|
|
783
|
+
readonly name: "Calibri";
|
|
784
|
+
readonly supplied: "Carlito";
|
|
785
|
+
readonly stack: "Carlito, Calibri, Candara, Segoe, 'Segoe UI', Optima, Arial, sans-serif";
|
|
786
|
+
};
|
|
787
|
+
readonly georgia: {
|
|
788
|
+
readonly name: "Georgia";
|
|
789
|
+
readonly supplied: "Gelasio";
|
|
790
|
+
readonly stack: "Gelasio, Georgia, Cambria, 'Times New Roman', Times, serif";
|
|
791
|
+
};
|
|
792
|
+
readonly garamond: {
|
|
793
|
+
readonly name: "Garamond";
|
|
794
|
+
readonly supplied: "EB Garamond";
|
|
795
|
+
readonly stack: "'EB Garamond', Garamond, Baskerville, 'Baskerville Old Face', 'Times New Roman', serif";
|
|
796
|
+
};
|
|
797
|
+
readonly times: {
|
|
798
|
+
readonly name: "Times";
|
|
799
|
+
readonly supplied: "Tinos";
|
|
800
|
+
readonly stack: "Tinos, 'Times New Roman', Times, Georgia, serif";
|
|
801
|
+
};
|
|
802
|
+
readonly lato: {
|
|
803
|
+
readonly name: "Lato";
|
|
804
|
+
readonly supplied: "Lato";
|
|
805
|
+
readonly stack: "Lato, 'Segoe UI', Candara, Optima, Calibri, sans-serif";
|
|
806
|
+
};
|
|
807
|
+
readonly condensed: {
|
|
808
|
+
readonly name: "Roboto Condensed";
|
|
809
|
+
readonly supplied: "Roboto Condensed";
|
|
810
|
+
readonly stack: "'Roboto Condensed', 'Arial Narrow', 'Helvetica Neue Condensed', 'Liberation Sans Narrow', sans-serif";
|
|
811
|
+
};
|
|
812
|
+
readonly ptserif: {
|
|
813
|
+
readonly name: "PT Serif";
|
|
814
|
+
readonly supplied: "PT Serif";
|
|
815
|
+
readonly stack: "'PT Serif', Charter, Cambria, Georgia, 'Times New Roman', serif";
|
|
816
|
+
};
|
|
817
|
+
readonly bitter: {
|
|
818
|
+
readonly name: "Bitter";
|
|
819
|
+
readonly supplied: "Bitter";
|
|
820
|
+
readonly stack: "Bitter, 'Roboto Slab', Rockwell, 'Courier New', Cambria, Georgia, serif";
|
|
821
|
+
};
|
|
822
|
+
};
|
|
823
|
+
export type DocumentFontId = keyof typeof DOCUMENT_FONTS;
|
|
824
|
+
export declare const DocumentFontIdSchema: z.ZodEnum<{
|
|
825
|
+
helvetica: "helvetica";
|
|
826
|
+
arial: "arial";
|
|
827
|
+
calibri: "calibri";
|
|
828
|
+
georgia: "georgia";
|
|
829
|
+
garamond: "garamond";
|
|
830
|
+
times: "times";
|
|
831
|
+
lato: "lato";
|
|
832
|
+
condensed: "condensed";
|
|
833
|
+
ptserif: "ptserif";
|
|
834
|
+
bitter: "bitter";
|
|
835
|
+
}>;
|
|
836
|
+
/**
|
|
837
|
+
* Inks a document (or one line of it) may be set in.
|
|
838
|
+
*
|
|
839
|
+
* Document colours, deliberately dark and low-chroma: a resume is read on paper
|
|
840
|
+
* and in an ATS, and a palette is what keeps "readable when printed in
|
|
841
|
+
* greyscale" true without asking the candidate to know that.
|
|
842
|
+
*/
|
|
843
|
+
export declare const INK_COLORS: {
|
|
844
|
+
readonly ink: {
|
|
845
|
+
readonly name: "Ink";
|
|
846
|
+
readonly hex: "#111111";
|
|
847
|
+
};
|
|
848
|
+
readonly slate: {
|
|
849
|
+
readonly name: "Slate";
|
|
850
|
+
readonly hex: "#33414f";
|
|
851
|
+
};
|
|
852
|
+
readonly navy: {
|
|
853
|
+
readonly name: "Navy";
|
|
854
|
+
readonly hex: "#1c3a63";
|
|
855
|
+
};
|
|
856
|
+
readonly maroon: {
|
|
857
|
+
readonly name: "Maroon";
|
|
858
|
+
readonly hex: "#6b2434";
|
|
859
|
+
};
|
|
860
|
+
readonly forest: {
|
|
861
|
+
readonly name: "Forest";
|
|
862
|
+
readonly hex: "#1f4433";
|
|
863
|
+
};
|
|
864
|
+
readonly grey: {
|
|
865
|
+
readonly name: "Grey";
|
|
866
|
+
readonly hex: "#5a5a5a";
|
|
867
|
+
};
|
|
868
|
+
readonly charcoal: {
|
|
869
|
+
readonly name: "Charcoal";
|
|
870
|
+
readonly hex: "#2e3236";
|
|
871
|
+
};
|
|
872
|
+
readonly cobalt: {
|
|
873
|
+
readonly name: "Cobalt";
|
|
874
|
+
readonly hex: "#1d4a91";
|
|
875
|
+
};
|
|
876
|
+
readonly indigo: {
|
|
877
|
+
readonly name: "Indigo";
|
|
878
|
+
readonly hex: "#2f3878";
|
|
879
|
+
};
|
|
880
|
+
readonly teal: {
|
|
881
|
+
readonly name: "Teal";
|
|
882
|
+
readonly hex: "#0f5257";
|
|
883
|
+
};
|
|
884
|
+
readonly olive: {
|
|
885
|
+
readonly name: "Olive";
|
|
886
|
+
readonly hex: "#404a1c";
|
|
887
|
+
};
|
|
888
|
+
readonly plum: {
|
|
889
|
+
readonly name: "Plum";
|
|
890
|
+
readonly hex: "#4e2a5a";
|
|
891
|
+
};
|
|
892
|
+
readonly rust: {
|
|
893
|
+
readonly name: "Rust";
|
|
894
|
+
readonly hex: "#7c3416";
|
|
895
|
+
};
|
|
896
|
+
readonly brown: {
|
|
897
|
+
readonly name: "Brown";
|
|
898
|
+
readonly hex: "#57382a";
|
|
899
|
+
};
|
|
900
|
+
};
|
|
901
|
+
export type InkId = keyof typeof INK_COLORS;
|
|
902
|
+
export declare const InkIdSchema: z.ZodEnum<{
|
|
903
|
+
cobalt: "cobalt";
|
|
904
|
+
ink: "ink";
|
|
905
|
+
slate: "slate";
|
|
906
|
+
navy: "navy";
|
|
907
|
+
maroon: "maroon";
|
|
908
|
+
forest: "forest";
|
|
909
|
+
grey: "grey";
|
|
910
|
+
charcoal: "charcoal";
|
|
911
|
+
indigo: "indigo";
|
|
912
|
+
teal: "teal";
|
|
913
|
+
olive: "olive";
|
|
914
|
+
plum: "plum";
|
|
915
|
+
rust: "rust";
|
|
916
|
+
brown: "brown";
|
|
917
|
+
}>;
|
|
918
|
+
/**
|
|
919
|
+
* How open the document's vertical rhythm is — a MULTIPLIER on the template's
|
|
920
|
+
* own spacing, for the same reason `scale` multiplies its type scale rather than
|
|
921
|
+
* setting a point size.
|
|
922
|
+
*
|
|
923
|
+
* A template's spacing is a set of relationships: the gap under a section
|
|
924
|
+
* heading is smaller than the gap between two sections, and that is a
|
|
925
|
+
* typographic decision the template made. A multiplier preserves those
|
|
926
|
+
* relationships; a set of measurements would let a candidate put more air
|
|
927
|
+
* between a heading and its own body than between two sections.
|
|
928
|
+
*
|
|
929
|
+
* Named rather than continuous because the useful positions are three —
|
|
930
|
+
* "tighter", "as designed", "more open" — and three named values are three test
|
|
931
|
+
* cases in the guarantee suite.
|
|
932
|
+
*/
|
|
933
|
+
export declare const DENSITIES: {
|
|
934
|
+
readonly tight: {
|
|
935
|
+
readonly name: "Tight";
|
|
936
|
+
readonly factor: 0.85;
|
|
937
|
+
};
|
|
938
|
+
readonly normal: {
|
|
939
|
+
readonly name: "Normal";
|
|
940
|
+
readonly factor: 1;
|
|
941
|
+
};
|
|
942
|
+
readonly roomy: {
|
|
943
|
+
readonly name: "Roomy";
|
|
944
|
+
readonly factor: 1.15;
|
|
945
|
+
};
|
|
946
|
+
};
|
|
947
|
+
export type DensityId = keyof typeof DENSITIES;
|
|
948
|
+
export declare const DensityIdSchema: z.ZodEnum<{
|
|
949
|
+
tight: "tight";
|
|
950
|
+
normal: "normal";
|
|
951
|
+
roomy: "roomy";
|
|
952
|
+
}>;
|
|
953
|
+
/** What a document is spaced at before anybody chooses. */
|
|
954
|
+
export declare const DENSITY_DEFAULT: DensityId;
|
|
955
|
+
/**
|
|
956
|
+
* Extra space above one section, or one field.
|
|
957
|
+
*
|
|
958
|
+
* The `steps` are counted in the template's OWN spacing unit, not in any
|
|
959
|
+
* absolute measure — `s2` is two of whatever a section gap is in that template,
|
|
960
|
+
* so Harvard's `s2` and Executive's `s2` are both "noticeably more air" in their
|
|
961
|
+
* respective rhythms rather than the same number of millimetres in both.
|
|
962
|
+
*
|
|
963
|
+
* This is the control a candidate actually reaches for when a section feels
|
|
964
|
+
* cramped. Without it the only way to close a gap is the type scale, which
|
|
965
|
+
* makes every word smaller to fix a margin.
|
|
966
|
+
*
|
|
967
|
+
* A SCALE, not a set of presets, and that is a consequence of what the control
|
|
968
|
+
* turned out to be. The catalog began as `sm` / `md` / `lg` — three names for a
|
|
969
|
+
* picker in a panel. The control is the gap itself now, dragged where the space
|
|
970
|
+
* will appear, and a drag with three stops reads as a switch: somebody closing
|
|
971
|
+
* up a header is adjusting a distance, not choosing an adjective.
|
|
972
|
+
*
|
|
973
|
+
* So it is a fine scale with a ceiling: fifths of a unit, up to 200. Fine
|
|
974
|
+
* enough that the drag tracks the hand and a gap can be nudged rather than
|
|
975
|
+
* jumped, bounded so that the whole product of styling combinations is still
|
|
976
|
+
* enumerable — which is what the ATS guarantee test walks, and the condition on
|
|
977
|
+
* having a drag at all. Nothing here is a measurement: the number counts the
|
|
978
|
+
* template's unit, and the template decides what that is.
|
|
979
|
+
*/
|
|
980
|
+
/** The finest adjustment the scale can express, in template units. */
|
|
981
|
+
export declare const SPACE_QUANTUM = 0.2;
|
|
982
|
+
/** The most space a gap can hold, in template units. */
|
|
983
|
+
export declare const SPACE_LIMIT = 200;
|
|
984
|
+
/**
|
|
985
|
+
* Built rather than written out, because 1,000 named constants is a table
|
|
986
|
+
* nobody reads and one that cannot drift from its own arithmetic. The id keeps
|
|
987
|
+
* the number legible in a stored document — `s3_4` is three and two fifths of
|
|
988
|
+
* the template's unit — and the tenths are underscored because a dot is a path
|
|
989
|
+
* separator everywhere else in this file.
|
|
990
|
+
*/
|
|
991
|
+
export declare const SECTION_SPACES: Record<string, {
|
|
992
|
+
name: string;
|
|
993
|
+
steps: number;
|
|
994
|
+
}>;
|
|
995
|
+
export type SectionSpaceId = keyof typeof SECTION_SPACES;
|
|
996
|
+
export declare const SectionSpaceIdSchema: z.ZodEnum<{
|
|
997
|
+
[x: string]: string;
|
|
998
|
+
}>;
|
|
999
|
+
/** The scale in order, shallowest first. `none` is the first step, not a gap. */
|
|
1000
|
+
export declare const SPACE_SCALE: string[];
|
|
1001
|
+
/** The most steps this catalog can express. */
|
|
1002
|
+
export declare const SPACE_MAX_STEPS = 200;
|
|
1003
|
+
/**
|
|
1004
|
+
* How many steps a token is worth. `undefined` is none, which is what an
|
|
1005
|
+
* absent record means.
|
|
1006
|
+
*/
|
|
1007
|
+
export declare function spaceSteps(id: SectionSpaceId | undefined): number;
|
|
1008
|
+
/**
|
|
1009
|
+
* The token for a number of steps, clamped to the scale.
|
|
1010
|
+
*
|
|
1011
|
+
* The one place a number becomes a token, so a drag — which is arithmetic on a
|
|
1012
|
+
* pointer — cannot express a value the catalog does not hold. Anything off the
|
|
1013
|
+
* scale lands on its nearest end rather than being refused: a candidate who
|
|
1014
|
+
* drags past the bottom has asked for no space, and a control that stopped
|
|
1015
|
+
* responding would read as broken.
|
|
1016
|
+
*/
|
|
1017
|
+
export declare function spaceAtStep(steps: number): SectionSpaceId;
|
|
1018
|
+
/**
|
|
1019
|
+
* The sections spacing can be keyed by.
|
|
1020
|
+
*
|
|
1021
|
+
* A fixed enum of the sections a `ResumeObject` already has — deliberately NOT a
|
|
1022
|
+
* composition model. "Space above Experience" is answerable today, and making it
|
|
1023
|
+
* wait for sections to become addable, removable and orderable would hold a small
|
|
1024
|
+
* control hostage to a much larger change.
|
|
1025
|
+
*/
|
|
1026
|
+
export declare const RESUME_SECTIONS: readonly ["summary", "skills", "experience", "education", "certifications", "achievements", "courses", "passions", "languages"];
|
|
1027
|
+
export type ResumeSectionId = (typeof RESUME_SECTIONS)[number];
|
|
1028
|
+
export declare const ResumeSectionIdSchema: z.ZodEnum<{
|
|
1029
|
+
summary: "summary";
|
|
1030
|
+
skills: "skills";
|
|
1031
|
+
experience: "experience";
|
|
1032
|
+
education: "education";
|
|
1033
|
+
certifications: "certifications";
|
|
1034
|
+
achievements: "achievements";
|
|
1035
|
+
courses: "courses";
|
|
1036
|
+
passions: "passions";
|
|
1037
|
+
languages: "languages";
|
|
1038
|
+
}>;
|
|
1039
|
+
/**
|
|
1040
|
+
* The document size scale — a MULTIPLIER on the template's own type scale, not a
|
|
1041
|
+
* point size.
|
|
1042
|
+
*
|
|
1043
|
+
* The template's sizes are a set of relationships (name over heading over body);
|
|
1044
|
+
* a multiplier preserves them, whereas a point size would let a candidate set
|
|
1045
|
+
* body text larger than the headings above it. Bounded because the useful range
|
|
1046
|
+
* is "fit it on one page" / "fill the page", and everything past that is a worse
|
|
1047
|
+
* resume.
|
|
1048
|
+
*/
|
|
1049
|
+
export declare const SCALE_MIN = 0.85;
|
|
1050
|
+
export declare const SCALE_MAX = 1.2;
|
|
1051
|
+
export declare const SCALE_STEP = 0.05;
|
|
1052
|
+
export declare const SCALE_DEFAULT = 1;
|
|
1053
|
+
/** Round to the nearest representable scale, clamped to the bounds. */
|
|
1054
|
+
export declare function normalizeScale(value: number): number;
|
|
1055
|
+
/**
|
|
1056
|
+
* How far apart the letters of the document's text sit — an override of the
|
|
1057
|
+
* template's tracking, chosen from presets, never a free number.
|
|
1058
|
+
*
|
|
1059
|
+
* Absent means the template's own tracking, which is what every stored
|
|
1060
|
+
* document has. Headings keep the template's tracking either way: it is part of
|
|
1061
|
+
* how a heading is drawn (an uppercase rule is tracked open on purpose), and
|
|
1062
|
+
* {@link HEADING_CASES} owns it when the candidate changes the heading's case.
|
|
1063
|
+
*/
|
|
1064
|
+
export declare const LETTER_SPACINGS: {
|
|
1065
|
+
readonly tight: {
|
|
1066
|
+
readonly name: "Tight";
|
|
1067
|
+
readonly em: -0.01;
|
|
1068
|
+
};
|
|
1069
|
+
readonly wide: {
|
|
1070
|
+
readonly name: "Wide";
|
|
1071
|
+
readonly em: 0.02;
|
|
1072
|
+
};
|
|
1073
|
+
};
|
|
1074
|
+
export type LetterSpacingId = keyof typeof LETTER_SPACINGS;
|
|
1075
|
+
export declare const LetterSpacingIdSchema: z.ZodEnum<{
|
|
1076
|
+
tight: "tight";
|
|
1077
|
+
wide: "wide";
|
|
1078
|
+
}>;
|
|
1079
|
+
/**
|
|
1080
|
+
* The distance between lines of the document's text, as a unitless line height
|
|
1081
|
+
* from presets. Absent means the template's own leading. Headings keep theirs.
|
|
1082
|
+
*/
|
|
1083
|
+
export declare const LINE_HEIGHTS: {
|
|
1084
|
+
readonly compact: {
|
|
1085
|
+
readonly name: "Compact";
|
|
1086
|
+
readonly value: 1.15;
|
|
1087
|
+
};
|
|
1088
|
+
readonly relaxed: {
|
|
1089
|
+
readonly name: "Relaxed";
|
|
1090
|
+
readonly value: 1.4;
|
|
1091
|
+
};
|
|
1092
|
+
readonly airy: {
|
|
1093
|
+
readonly name: "Airy";
|
|
1094
|
+
readonly value: 1.55;
|
|
1095
|
+
};
|
|
1096
|
+
};
|
|
1097
|
+
export type LineHeightId = keyof typeof LINE_HEIGHTS;
|
|
1098
|
+
export declare const LineHeightIdSchema: z.ZodEnum<{
|
|
1099
|
+
compact: "compact";
|
|
1100
|
+
relaxed: "relaxed";
|
|
1101
|
+
airy: "airy";
|
|
1102
|
+
}>;
|
|
1103
|
+
/**
|
|
1104
|
+
* How section headings are cased. A presentation of the heading, never its
|
|
1105
|
+
* text: the stored heading is unchanged, so copy-out and ATS extraction read
|
|
1106
|
+
* what the candidate wrote. Absent means the template's own casing.
|
|
1107
|
+
*/
|
|
1108
|
+
export declare const HEADING_CASES: {
|
|
1109
|
+
readonly normal: {
|
|
1110
|
+
readonly name: "As written";
|
|
1111
|
+
};
|
|
1112
|
+
readonly upper: {
|
|
1113
|
+
readonly name: "Uppercase";
|
|
1114
|
+
};
|
|
1115
|
+
readonly smallcaps: {
|
|
1116
|
+
readonly name: "Small caps";
|
|
1117
|
+
};
|
|
1118
|
+
};
|
|
1119
|
+
export type HeadingCaseId = keyof typeof HEADING_CASES;
|
|
1120
|
+
export declare const HeadingCaseIdSchema: z.ZodEnum<{
|
|
1121
|
+
normal: "normal";
|
|
1122
|
+
upper: "upper";
|
|
1123
|
+
smallcaps: "smallcaps";
|
|
1124
|
+
}>;
|
|
1125
|
+
/**
|
|
1126
|
+
* How heavy section headings are. Two weights, because every font in
|
|
1127
|
+
* {@link DOCUMENT_FONTS} ships both, so no choice falls back to a synthesised
|
|
1128
|
+
* weight. Absent means the template's own weight.
|
|
1129
|
+
*/
|
|
1130
|
+
export declare const HEADING_WEIGHTS: {
|
|
1131
|
+
readonly regular: {
|
|
1132
|
+
readonly name: "Regular";
|
|
1133
|
+
readonly weight: 400;
|
|
1134
|
+
};
|
|
1135
|
+
readonly bold: {
|
|
1136
|
+
readonly name: "Bold";
|
|
1137
|
+
readonly weight: 700;
|
|
1138
|
+
};
|
|
1139
|
+
};
|
|
1140
|
+
export type HeadingWeightId = keyof typeof HEADING_WEIGHTS;
|
|
1141
|
+
export declare const HeadingWeightIdSchema: z.ZodEnum<{
|
|
1142
|
+
bold: "bold";
|
|
1143
|
+
regular: "regular";
|
|
1144
|
+
}>;
|
|
1145
|
+
/**
|
|
1146
|
+
* How the whole document is set. Absent means the template's own defaults — a
|
|
1147
|
+
* resume nobody has styled renders exactly as the template defines it.
|
|
1148
|
+
*/
|
|
1149
|
+
export declare const DocumentStyleSchema: z.ZodObject<{
|
|
1150
|
+
font: z.ZodEnum<{
|
|
1151
|
+
helvetica: "helvetica";
|
|
1152
|
+
arial: "arial";
|
|
1153
|
+
calibri: "calibri";
|
|
1154
|
+
georgia: "georgia";
|
|
1155
|
+
garamond: "garamond";
|
|
1156
|
+
times: "times";
|
|
1157
|
+
lato: "lato";
|
|
1158
|
+
condensed: "condensed";
|
|
1159
|
+
ptserif: "ptserif";
|
|
1160
|
+
bitter: "bitter";
|
|
1161
|
+
}>;
|
|
1162
|
+
ink: z.ZodEnum<{
|
|
1163
|
+
cobalt: "cobalt";
|
|
1164
|
+
ink: "ink";
|
|
1165
|
+
slate: "slate";
|
|
1166
|
+
navy: "navy";
|
|
1167
|
+
maroon: "maroon";
|
|
1168
|
+
forest: "forest";
|
|
1169
|
+
grey: "grey";
|
|
1170
|
+
charcoal: "charcoal";
|
|
1171
|
+
indigo: "indigo";
|
|
1172
|
+
teal: "teal";
|
|
1173
|
+
olive: "olive";
|
|
1174
|
+
plum: "plum";
|
|
1175
|
+
rust: "rust";
|
|
1176
|
+
brown: "brown";
|
|
1177
|
+
}>;
|
|
1178
|
+
scale: z.ZodNumber;
|
|
1179
|
+
accent: z.ZodOptional<z.ZodEnum<{
|
|
1180
|
+
cobalt: "cobalt";
|
|
1181
|
+
ink: "ink";
|
|
1182
|
+
slate: "slate";
|
|
1183
|
+
navy: "navy";
|
|
1184
|
+
maroon: "maroon";
|
|
1185
|
+
forest: "forest";
|
|
1186
|
+
grey: "grey";
|
|
1187
|
+
charcoal: "charcoal";
|
|
1188
|
+
indigo: "indigo";
|
|
1189
|
+
teal: "teal";
|
|
1190
|
+
olive: "olive";
|
|
1191
|
+
plum: "plum";
|
|
1192
|
+
rust: "rust";
|
|
1193
|
+
brown: "brown";
|
|
1194
|
+
}>>;
|
|
1195
|
+
density: z.ZodOptional<z.ZodEnum<{
|
|
1196
|
+
tight: "tight";
|
|
1197
|
+
normal: "normal";
|
|
1198
|
+
roomy: "roomy";
|
|
1199
|
+
}>>;
|
|
1200
|
+
tracking: z.ZodOptional<z.ZodEnum<{
|
|
1201
|
+
tight: "tight";
|
|
1202
|
+
wide: "wide";
|
|
1203
|
+
}>>;
|
|
1204
|
+
leading: z.ZodOptional<z.ZodEnum<{
|
|
1205
|
+
compact: "compact";
|
|
1206
|
+
relaxed: "relaxed";
|
|
1207
|
+
airy: "airy";
|
|
1208
|
+
}>>;
|
|
1209
|
+
headingFont: z.ZodOptional<z.ZodEnum<{
|
|
1210
|
+
helvetica: "helvetica";
|
|
1211
|
+
arial: "arial";
|
|
1212
|
+
calibri: "calibri";
|
|
1213
|
+
georgia: "georgia";
|
|
1214
|
+
garamond: "garamond";
|
|
1215
|
+
times: "times";
|
|
1216
|
+
lato: "lato";
|
|
1217
|
+
condensed: "condensed";
|
|
1218
|
+
ptserif: "ptserif";
|
|
1219
|
+
bitter: "bitter";
|
|
1220
|
+
}>>;
|
|
1221
|
+
headingCase: z.ZodOptional<z.ZodEnum<{
|
|
1222
|
+
normal: "normal";
|
|
1223
|
+
upper: "upper";
|
|
1224
|
+
smallcaps: "smallcaps";
|
|
1225
|
+
}>>;
|
|
1226
|
+
headingWeight: z.ZodOptional<z.ZodEnum<{
|
|
1227
|
+
bold: "bold";
|
|
1228
|
+
regular: "regular";
|
|
1229
|
+
}>>;
|
|
1230
|
+
}, z.core.$strip>;
|
|
1231
|
+
export type DocumentStyle = z.infer<typeof DocumentStyleSchema>;
|
|
1232
|
+
/** How one line is set, over and above the document's own style. */
|
|
1233
|
+
export declare const FieldAlignSchema: z.ZodEnum<{
|
|
1234
|
+
left: "left";
|
|
1235
|
+
center: "center";
|
|
1236
|
+
right: "right";
|
|
1237
|
+
}>;
|
|
1238
|
+
export type FieldAlign = z.infer<typeof FieldAlignSchema>;
|
|
1239
|
+
/**
|
|
1240
|
+
* One step smaller or larger than the template sets the line. A step, not a
|
|
1241
|
+
* size: the template's proportions hold, so a stepped-up bullet still reads
|
|
1242
|
+
* smaller than a heading.
|
|
1243
|
+
*/
|
|
1244
|
+
export declare const FIELD_STEPS: {
|
|
1245
|
+
readonly smaller: {
|
|
1246
|
+
readonly name: "Smaller";
|
|
1247
|
+
readonly factor: 0.9;
|
|
1248
|
+
};
|
|
1249
|
+
readonly larger: {
|
|
1250
|
+
readonly name: "Larger";
|
|
1251
|
+
readonly factor: 1.12;
|
|
1252
|
+
};
|
|
1253
|
+
};
|
|
1254
|
+
export type FieldStepId = keyof typeof FIELD_STEPS;
|
|
1255
|
+
export declare const FieldStepSchema: z.ZodEnum<{
|
|
1256
|
+
smaller: "smaller";
|
|
1257
|
+
larger: "larger";
|
|
1258
|
+
}>;
|
|
1259
|
+
export declare const FieldFormatSchema: z.ZodObject<{
|
|
1260
|
+
path: z.ZodString;
|
|
1261
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
1262
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
1263
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
1264
|
+
step: z.ZodOptional<z.ZodEnum<{
|
|
1265
|
+
smaller: "smaller";
|
|
1266
|
+
larger: "larger";
|
|
1267
|
+
}>>;
|
|
1268
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
1269
|
+
left: "left";
|
|
1270
|
+
center: "center";
|
|
1271
|
+
right: "right";
|
|
1272
|
+
}>>;
|
|
1273
|
+
ink: z.ZodOptional<z.ZodEnum<{
|
|
1274
|
+
cobalt: "cobalt";
|
|
1275
|
+
ink: "ink";
|
|
1276
|
+
slate: "slate";
|
|
1277
|
+
navy: "navy";
|
|
1278
|
+
maroon: "maroon";
|
|
1279
|
+
forest: "forest";
|
|
1280
|
+
grey: "grey";
|
|
1281
|
+
charcoal: "charcoal";
|
|
1282
|
+
indigo: "indigo";
|
|
1283
|
+
teal: "teal";
|
|
1284
|
+
olive: "olive";
|
|
1285
|
+
plum: "plum";
|
|
1286
|
+
rust: "rust";
|
|
1287
|
+
brown: "brown";
|
|
1288
|
+
}>>;
|
|
1289
|
+
space: z.ZodOptional<z.ZodEnum<{
|
|
1290
|
+
[x: string]: string;
|
|
1291
|
+
}>>;
|
|
1292
|
+
href: z.ZodOptional<z.ZodString>;
|
|
1293
|
+
}, z.core.$strip>;
|
|
1294
|
+
export type FieldFormat = z.infer<typeof FieldFormatSchema>;
|
|
1295
|
+
/** A format carrying no flags says nothing; it is dropped rather than stored. */
|
|
1296
|
+
export declare function formatIsEmpty(format: FieldFormat): boolean;
|
|
1297
|
+
/**
|
|
1298
|
+
* Per-field formatting.
|
|
1299
|
+
*
|
|
1300
|
+
* A **list** for the same reason `edits` is one: `RunStore.update` writes through
|
|
1301
|
+
* Firestore's `set(…, { merge: true })`, which deep-merges maps, so formatting a
|
|
1302
|
+
* candidate cleared would survive its own clearing.
|
|
1303
|
+
*/
|
|
1304
|
+
export declare const ResumeFormatsSchema: z.ZodArray<z.ZodObject<{
|
|
1305
|
+
path: z.ZodString;
|
|
1306
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
1307
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
1308
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
1309
|
+
step: z.ZodOptional<z.ZodEnum<{
|
|
1310
|
+
smaller: "smaller";
|
|
1311
|
+
larger: "larger";
|
|
1312
|
+
}>>;
|
|
1313
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
1314
|
+
left: "left";
|
|
1315
|
+
center: "center";
|
|
1316
|
+
right: "right";
|
|
1317
|
+
}>>;
|
|
1318
|
+
ink: z.ZodOptional<z.ZodEnum<{
|
|
1319
|
+
cobalt: "cobalt";
|
|
1320
|
+
ink: "ink";
|
|
1321
|
+
slate: "slate";
|
|
1322
|
+
navy: "navy";
|
|
1323
|
+
maroon: "maroon";
|
|
1324
|
+
forest: "forest";
|
|
1325
|
+
grey: "grey";
|
|
1326
|
+
charcoal: "charcoal";
|
|
1327
|
+
indigo: "indigo";
|
|
1328
|
+
teal: "teal";
|
|
1329
|
+
olive: "olive";
|
|
1330
|
+
plum: "plum";
|
|
1331
|
+
rust: "rust";
|
|
1332
|
+
brown: "brown";
|
|
1333
|
+
}>>;
|
|
1334
|
+
space: z.ZodOptional<z.ZodEnum<{
|
|
1335
|
+
[x: string]: string;
|
|
1336
|
+
}>>;
|
|
1337
|
+
href: z.ZodOptional<z.ZodString>;
|
|
1338
|
+
}, z.core.$strip>>;
|
|
1339
|
+
export type ResumeFormats = z.infer<typeof ResumeFormatsSchema>;
|
|
1340
|
+
/** The format for one path, or undefined when the field carries none. */
|
|
1341
|
+
export declare function formatFor(formats: ResumeFormats | undefined, path: string): FieldFormat | undefined;
|
|
1342
|
+
/**
|
|
1343
|
+
* Named presets over the document style.
|
|
1344
|
+
*
|
|
1345
|
+
* A theme is a STARTING POINT, not a mode: applying one writes concrete values
|
|
1346
|
+
* and nothing records that a theme was used. Storing a theme id instead would
|
|
1347
|
+
* make a saved document's appearance depend on a definition that can change
|
|
1348
|
+
* after it was saved — the same class of defect as an unversioned renderer,
|
|
1349
|
+
* reintroduced for no benefit. Concrete values keep rendering a pure function of
|
|
1350
|
+
* stored data, which is what a server-side render requires.
|
|
1351
|
+
*
|
|
1352
|
+
* The cost is that the editor cannot say "you are on Classic" afterwards. That
|
|
1353
|
+
* is a label, and it is not worth a second source of truth about how a document
|
|
1354
|
+
* looks.
|
|
1355
|
+
*/
|
|
1356
|
+
export declare const THEMES: {
|
|
1357
|
+
readonly classic: {
|
|
1358
|
+
readonly name: "Classic";
|
|
1359
|
+
readonly description: "Serif and restrained";
|
|
1360
|
+
readonly style: {
|
|
1361
|
+
readonly font: "times";
|
|
1362
|
+
readonly ink: "ink";
|
|
1363
|
+
readonly accent: "ink";
|
|
1364
|
+
readonly density: "normal";
|
|
1365
|
+
};
|
|
1366
|
+
};
|
|
1367
|
+
readonly modern: {
|
|
1368
|
+
readonly name: "Modern";
|
|
1369
|
+
readonly description: "Open and current";
|
|
1370
|
+
readonly style: {
|
|
1371
|
+
readonly font: "helvetica";
|
|
1372
|
+
readonly ink: "slate";
|
|
1373
|
+
readonly accent: "navy";
|
|
1374
|
+
readonly density: "roomy";
|
|
1375
|
+
};
|
|
1376
|
+
};
|
|
1377
|
+
readonly compact: {
|
|
1378
|
+
readonly name: "Compact";
|
|
1379
|
+
readonly description: "Tight, fits more";
|
|
1380
|
+
readonly style: {
|
|
1381
|
+
readonly font: "arial";
|
|
1382
|
+
readonly ink: "ink";
|
|
1383
|
+
readonly accent: "grey";
|
|
1384
|
+
readonly density: "tight";
|
|
1385
|
+
};
|
|
1386
|
+
};
|
|
1387
|
+
readonly academic: {
|
|
1388
|
+
readonly name: "Academic";
|
|
1389
|
+
readonly description: "Formal and sober";
|
|
1390
|
+
readonly style: {
|
|
1391
|
+
readonly font: "georgia";
|
|
1392
|
+
readonly ink: "ink";
|
|
1393
|
+
readonly accent: "maroon";
|
|
1394
|
+
readonly density: "normal";
|
|
1395
|
+
};
|
|
1396
|
+
};
|
|
1397
|
+
};
|
|
1398
|
+
export type ThemeId = keyof typeof THEMES;
|
|
1399
|
+
/**
|
|
1400
|
+
* Apply a theme, preserving what the theme does not speak to.
|
|
1401
|
+
*
|
|
1402
|
+
* The size scale survives: it is how a candidate fits their resume on one page,
|
|
1403
|
+
* which is a decision about THEIR document rather than about its styling, and
|
|
1404
|
+
* silently resetting it would undo work a theme has no opinion about.
|
|
1405
|
+
*/
|
|
1406
|
+
export declare function applyTheme(style: DocumentStyle, id: ThemeId): DocumentStyle;
|
|
1407
|
+
/** Extra space above one named section. */
|
|
1408
|
+
export declare const SectionSpacingSchema: z.ZodObject<{
|
|
1409
|
+
section: z.ZodEnum<{
|
|
1410
|
+
summary: "summary";
|
|
1411
|
+
skills: "skills";
|
|
1412
|
+
experience: "experience";
|
|
1413
|
+
education: "education";
|
|
1414
|
+
certifications: "certifications";
|
|
1415
|
+
achievements: "achievements";
|
|
1416
|
+
courses: "courses";
|
|
1417
|
+
passions: "passions";
|
|
1418
|
+
languages: "languages";
|
|
1419
|
+
}>;
|
|
1420
|
+
space: z.ZodEnum<{
|
|
1421
|
+
[x: string]: string;
|
|
1422
|
+
}>;
|
|
1423
|
+
}, z.core.$strip>;
|
|
1424
|
+
export type SectionSpacing = z.infer<typeof SectionSpacingSchema>;
|
|
1425
|
+
/**
|
|
1426
|
+
* Space above the document's sections.
|
|
1427
|
+
*
|
|
1428
|
+
* A **list**, for exactly the reason `edits` and `formats` are lists:
|
|
1429
|
+
* `RunStore.update` writes through Firestore's `set(…, { merge: true })`, which
|
|
1430
|
+
* deep-merges maps — so a spacing the candidate cleared would survive its own
|
|
1431
|
+
* clearing if this were keyed.
|
|
1432
|
+
*
|
|
1433
|
+
* `none` is refused rather than stored for the same reason `formatIsEmpty`
|
|
1434
|
+
* drops an empty format: returning a control to where it started should leave no
|
|
1435
|
+
* trace, so an untouched document stores nothing.
|
|
1436
|
+
*/
|
|
1437
|
+
export declare const ResumeSectionSpacingSchema: z.ZodArray<z.ZodObject<{
|
|
1438
|
+
section: z.ZodEnum<{
|
|
1439
|
+
summary: "summary";
|
|
1440
|
+
skills: "skills";
|
|
1441
|
+
experience: "experience";
|
|
1442
|
+
education: "education";
|
|
1443
|
+
certifications: "certifications";
|
|
1444
|
+
achievements: "achievements";
|
|
1445
|
+
courses: "courses";
|
|
1446
|
+
passions: "passions";
|
|
1447
|
+
languages: "languages";
|
|
1448
|
+
}>;
|
|
1449
|
+
space: z.ZodEnum<{
|
|
1450
|
+
[x: string]: string;
|
|
1451
|
+
}>;
|
|
1452
|
+
}, z.core.$strip>>;
|
|
1453
|
+
export type ResumeSectionSpacing = z.infer<typeof ResumeSectionSpacingSchema>;
|
|
1454
|
+
/** The spacing for one section, or undefined when it carries none. */
|
|
1455
|
+
export declare function spacingFor(spacing: ResumeSectionSpacing | undefined, section: string): SectionSpacing | undefined;
|
|
1456
|
+
/**
|
|
1457
|
+
* How a run's resume is presented: which template, and the candidate's own
|
|
1458
|
+
* corrections on top of what the writer produced.
|
|
1459
|
+
*
|
|
1460
|
+
* Deliberately NOT the editor's serialized node tree. The tree is
|
|
1461
|
+
* template-shaped and library-shaped; this is neither, so switching template
|
|
1462
|
+
* loses nothing, `ResumeObjectSchema` still governs the result, and renaming a
|
|
1463
|
+
* React component cannot invalidate a stored document.
|
|
1464
|
+
*
|
|
1465
|
+
* @pii `edits` holds resume text. It lives on the run record beside the result
|
|
1466
|
+
* it corrects, so it shares that run's owner scope, retention, and deletion.
|
|
1467
|
+
*/
|
|
1468
|
+
export declare const ResumePresentationSchema: z.ZodObject<{
|
|
1469
|
+
template_id: z.ZodEnum<{
|
|
1470
|
+
split: "split";
|
|
1471
|
+
harvard: "harvard";
|
|
1472
|
+
ivy: "ivy";
|
|
1473
|
+
classic: "classic";
|
|
1474
|
+
compact: "compact";
|
|
1475
|
+
timeline: "timeline";
|
|
1476
|
+
modern: "modern";
|
|
1477
|
+
stylish: "stylish";
|
|
1478
|
+
creative: "creative";
|
|
1479
|
+
contemporary: "contemporary";
|
|
1480
|
+
"double-column": "double-column";
|
|
1481
|
+
"double-column-logos": "double-column-logos";
|
|
1482
|
+
elegant: "elegant";
|
|
1483
|
+
"elegant-logos": "elegant-logos";
|
|
1484
|
+
polished: "polished";
|
|
1485
|
+
executive: "executive";
|
|
1486
|
+
meridian: "meridian";
|
|
1487
|
+
cobalt: "cobalt";
|
|
1488
|
+
crimson: "crimson";
|
|
1489
|
+
engineer: "engineer";
|
|
1490
|
+
academic: "academic";
|
|
1491
|
+
alta: "alta";
|
|
1492
|
+
prism: "prism";
|
|
1493
|
+
hipster: "hipster";
|
|
1494
|
+
scholar: "scholar";
|
|
1495
|
+
portrait: "portrait";
|
|
1496
|
+
curve: "curve";
|
|
1497
|
+
}>;
|
|
1498
|
+
edits: z.ZodDefault<z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1499
|
+
kind: z.ZodLiteral<"set">;
|
|
1500
|
+
path: z.ZodString;
|
|
1501
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
1502
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1503
|
+
kind: z.ZodLiteral<"append">;
|
|
1504
|
+
ref: z.ZodString;
|
|
1505
|
+
section: z.ZodEnum<{
|
|
1506
|
+
links: "links";
|
|
1507
|
+
skills: "skills";
|
|
1508
|
+
experience: "experience";
|
|
1509
|
+
education: "education";
|
|
1510
|
+
certifications: "certifications";
|
|
1511
|
+
achievements: "achievements";
|
|
1512
|
+
courses: "courses";
|
|
1513
|
+
passions: "passions";
|
|
1514
|
+
languages: "languages";
|
|
1515
|
+
}>;
|
|
1516
|
+
entry: z.ZodUnknown;
|
|
1517
|
+
author: z.ZodEnum<{
|
|
1518
|
+
candidate: "candidate";
|
|
1519
|
+
}>;
|
|
1520
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1521
|
+
kind: z.ZodLiteral<"drop">;
|
|
1522
|
+
ref: z.ZodString;
|
|
1523
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1524
|
+
kind: z.ZodLiteral<"section">;
|
|
1525
|
+
ref: z.ZodString;
|
|
1526
|
+
heading: z.ZodString;
|
|
1527
|
+
entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1528
|
+
title: z.ZodString;
|
|
1529
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1530
|
+
bullets: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1531
|
+
}, z.core.$strip>>>;
|
|
1532
|
+
author: z.ZodEnum<{
|
|
1533
|
+
candidate: "candidate";
|
|
1534
|
+
}>;
|
|
1535
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1536
|
+
kind: z.ZodLiteral<"reorder">;
|
|
1537
|
+
section: z.ZodEnum<{
|
|
1538
|
+
links: "links";
|
|
1539
|
+
skills: "skills";
|
|
1540
|
+
experience: "experience";
|
|
1541
|
+
education: "education";
|
|
1542
|
+
certifications: "certifications";
|
|
1543
|
+
achievements: "achievements";
|
|
1544
|
+
courses: "courses";
|
|
1545
|
+
passions: "passions";
|
|
1546
|
+
languages: "languages";
|
|
1547
|
+
}>;
|
|
1548
|
+
order: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1549
|
+
base: z.ZodNumber;
|
|
1550
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1551
|
+
ref: z.ZodString;
|
|
1552
|
+
}, z.core.$strip>]>>;
|
|
1553
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1554
|
+
kind: z.ZodLiteral<"hide">;
|
|
1555
|
+
section: z.ZodEnum<{
|
|
1556
|
+
links: "links";
|
|
1557
|
+
skills: "skills";
|
|
1558
|
+
experience: "experience";
|
|
1559
|
+
education: "education";
|
|
1560
|
+
certifications: "certifications";
|
|
1561
|
+
achievements: "achievements";
|
|
1562
|
+
courses: "courses";
|
|
1563
|
+
passions: "passions";
|
|
1564
|
+
languages: "languages";
|
|
1565
|
+
}>;
|
|
1566
|
+
base: z.ZodNumber;
|
|
1567
|
+
}, z.core.$strip>], "kind">, unknown>>>;
|
|
1568
|
+
style: z.ZodOptional<z.ZodObject<{
|
|
1569
|
+
font: z.ZodEnum<{
|
|
1570
|
+
helvetica: "helvetica";
|
|
1571
|
+
arial: "arial";
|
|
1572
|
+
calibri: "calibri";
|
|
1573
|
+
georgia: "georgia";
|
|
1574
|
+
garamond: "garamond";
|
|
1575
|
+
times: "times";
|
|
1576
|
+
lato: "lato";
|
|
1577
|
+
condensed: "condensed";
|
|
1578
|
+
ptserif: "ptserif";
|
|
1579
|
+
bitter: "bitter";
|
|
1580
|
+
}>;
|
|
1581
|
+
ink: z.ZodEnum<{
|
|
1582
|
+
cobalt: "cobalt";
|
|
1583
|
+
ink: "ink";
|
|
1584
|
+
slate: "slate";
|
|
1585
|
+
navy: "navy";
|
|
1586
|
+
maroon: "maroon";
|
|
1587
|
+
forest: "forest";
|
|
1588
|
+
grey: "grey";
|
|
1589
|
+
charcoal: "charcoal";
|
|
1590
|
+
indigo: "indigo";
|
|
1591
|
+
teal: "teal";
|
|
1592
|
+
olive: "olive";
|
|
1593
|
+
plum: "plum";
|
|
1594
|
+
rust: "rust";
|
|
1595
|
+
brown: "brown";
|
|
1596
|
+
}>;
|
|
1597
|
+
scale: z.ZodNumber;
|
|
1598
|
+
accent: z.ZodOptional<z.ZodEnum<{
|
|
1599
|
+
cobalt: "cobalt";
|
|
1600
|
+
ink: "ink";
|
|
1601
|
+
slate: "slate";
|
|
1602
|
+
navy: "navy";
|
|
1603
|
+
maroon: "maroon";
|
|
1604
|
+
forest: "forest";
|
|
1605
|
+
grey: "grey";
|
|
1606
|
+
charcoal: "charcoal";
|
|
1607
|
+
indigo: "indigo";
|
|
1608
|
+
teal: "teal";
|
|
1609
|
+
olive: "olive";
|
|
1610
|
+
plum: "plum";
|
|
1611
|
+
rust: "rust";
|
|
1612
|
+
brown: "brown";
|
|
1613
|
+
}>>;
|
|
1614
|
+
density: z.ZodOptional<z.ZodEnum<{
|
|
1615
|
+
tight: "tight";
|
|
1616
|
+
normal: "normal";
|
|
1617
|
+
roomy: "roomy";
|
|
1618
|
+
}>>;
|
|
1619
|
+
tracking: z.ZodOptional<z.ZodEnum<{
|
|
1620
|
+
tight: "tight";
|
|
1621
|
+
wide: "wide";
|
|
1622
|
+
}>>;
|
|
1623
|
+
leading: z.ZodOptional<z.ZodEnum<{
|
|
1624
|
+
compact: "compact";
|
|
1625
|
+
relaxed: "relaxed";
|
|
1626
|
+
airy: "airy";
|
|
1627
|
+
}>>;
|
|
1628
|
+
headingFont: z.ZodOptional<z.ZodEnum<{
|
|
1629
|
+
helvetica: "helvetica";
|
|
1630
|
+
arial: "arial";
|
|
1631
|
+
calibri: "calibri";
|
|
1632
|
+
georgia: "georgia";
|
|
1633
|
+
garamond: "garamond";
|
|
1634
|
+
times: "times";
|
|
1635
|
+
lato: "lato";
|
|
1636
|
+
condensed: "condensed";
|
|
1637
|
+
ptserif: "ptserif";
|
|
1638
|
+
bitter: "bitter";
|
|
1639
|
+
}>>;
|
|
1640
|
+
headingCase: z.ZodOptional<z.ZodEnum<{
|
|
1641
|
+
normal: "normal";
|
|
1642
|
+
upper: "upper";
|
|
1643
|
+
smallcaps: "smallcaps";
|
|
1644
|
+
}>>;
|
|
1645
|
+
headingWeight: z.ZodOptional<z.ZodEnum<{
|
|
1646
|
+
bold: "bold";
|
|
1647
|
+
regular: "regular";
|
|
1648
|
+
}>>;
|
|
1649
|
+
}, z.core.$strip>>;
|
|
1650
|
+
formats: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1651
|
+
path: z.ZodString;
|
|
1652
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
1653
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
1654
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
1655
|
+
step: z.ZodOptional<z.ZodEnum<{
|
|
1656
|
+
smaller: "smaller";
|
|
1657
|
+
larger: "larger";
|
|
1658
|
+
}>>;
|
|
1659
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
1660
|
+
left: "left";
|
|
1661
|
+
center: "center";
|
|
1662
|
+
right: "right";
|
|
1663
|
+
}>>;
|
|
1664
|
+
ink: z.ZodOptional<z.ZodEnum<{
|
|
1665
|
+
cobalt: "cobalt";
|
|
1666
|
+
ink: "ink";
|
|
1667
|
+
slate: "slate";
|
|
1668
|
+
navy: "navy";
|
|
1669
|
+
maroon: "maroon";
|
|
1670
|
+
forest: "forest";
|
|
1671
|
+
grey: "grey";
|
|
1672
|
+
charcoal: "charcoal";
|
|
1673
|
+
indigo: "indigo";
|
|
1674
|
+
teal: "teal";
|
|
1675
|
+
olive: "olive";
|
|
1676
|
+
plum: "plum";
|
|
1677
|
+
rust: "rust";
|
|
1678
|
+
brown: "brown";
|
|
1679
|
+
}>>;
|
|
1680
|
+
space: z.ZodOptional<z.ZodEnum<{
|
|
1681
|
+
[x: string]: string;
|
|
1682
|
+
}>>;
|
|
1683
|
+
href: z.ZodOptional<z.ZodString>;
|
|
1684
|
+
}, z.core.$strip>>>;
|
|
1685
|
+
section_spacing: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1686
|
+
section: z.ZodEnum<{
|
|
1687
|
+
summary: "summary";
|
|
1688
|
+
skills: "skills";
|
|
1689
|
+
experience: "experience";
|
|
1690
|
+
education: "education";
|
|
1691
|
+
certifications: "certifications";
|
|
1692
|
+
achievements: "achievements";
|
|
1693
|
+
courses: "courses";
|
|
1694
|
+
passions: "passions";
|
|
1695
|
+
languages: "languages";
|
|
1696
|
+
}>;
|
|
1697
|
+
space: z.ZodEnum<{
|
|
1698
|
+
[x: string]: string;
|
|
1699
|
+
}>;
|
|
1700
|
+
}, z.core.$strip>>>;
|
|
1701
|
+
language: z.ZodOptional<z.ZodEnum<{
|
|
1702
|
+
en: "en";
|
|
1703
|
+
es: "es";
|
|
1704
|
+
}>>;
|
|
1705
|
+
updated_at: z.ZodString;
|
|
1706
|
+
}, z.core.$strip>;
|
|
1707
|
+
export type ResumePresentation = z.infer<typeof ResumePresentationSchema>;
|
|
1708
|
+
/** `PUT /runs/:id/presentation` request. The server owns `updated_at`. */
|
|
1709
|
+
export declare const PutPresentationRequestSchema: z.ZodObject<{
|
|
1710
|
+
template_id: z.ZodEnum<{
|
|
1711
|
+
split: "split";
|
|
1712
|
+
harvard: "harvard";
|
|
1713
|
+
ivy: "ivy";
|
|
1714
|
+
classic: "classic";
|
|
1715
|
+
compact: "compact";
|
|
1716
|
+
timeline: "timeline";
|
|
1717
|
+
modern: "modern";
|
|
1718
|
+
stylish: "stylish";
|
|
1719
|
+
creative: "creative";
|
|
1720
|
+
contemporary: "contemporary";
|
|
1721
|
+
"double-column": "double-column";
|
|
1722
|
+
"double-column-logos": "double-column-logos";
|
|
1723
|
+
elegant: "elegant";
|
|
1724
|
+
"elegant-logos": "elegant-logos";
|
|
1725
|
+
polished: "polished";
|
|
1726
|
+
executive: "executive";
|
|
1727
|
+
meridian: "meridian";
|
|
1728
|
+
cobalt: "cobalt";
|
|
1729
|
+
crimson: "crimson";
|
|
1730
|
+
engineer: "engineer";
|
|
1731
|
+
academic: "academic";
|
|
1732
|
+
alta: "alta";
|
|
1733
|
+
prism: "prism";
|
|
1734
|
+
hipster: "hipster";
|
|
1735
|
+
scholar: "scholar";
|
|
1736
|
+
portrait: "portrait";
|
|
1737
|
+
curve: "curve";
|
|
1738
|
+
}>;
|
|
1739
|
+
edits: z.ZodDefault<z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1740
|
+
kind: z.ZodLiteral<"set">;
|
|
1741
|
+
path: z.ZodString;
|
|
1742
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
1743
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1744
|
+
kind: z.ZodLiteral<"append">;
|
|
1745
|
+
ref: z.ZodString;
|
|
1746
|
+
section: z.ZodEnum<{
|
|
1747
|
+
links: "links";
|
|
1748
|
+
skills: "skills";
|
|
1749
|
+
experience: "experience";
|
|
1750
|
+
education: "education";
|
|
1751
|
+
certifications: "certifications";
|
|
1752
|
+
achievements: "achievements";
|
|
1753
|
+
courses: "courses";
|
|
1754
|
+
passions: "passions";
|
|
1755
|
+
languages: "languages";
|
|
1756
|
+
}>;
|
|
1757
|
+
entry: z.ZodUnknown;
|
|
1758
|
+
author: z.ZodEnum<{
|
|
1759
|
+
candidate: "candidate";
|
|
1760
|
+
}>;
|
|
1761
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1762
|
+
kind: z.ZodLiteral<"drop">;
|
|
1763
|
+
ref: z.ZodString;
|
|
1764
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1765
|
+
kind: z.ZodLiteral<"section">;
|
|
1766
|
+
ref: z.ZodString;
|
|
1767
|
+
heading: z.ZodString;
|
|
1768
|
+
entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1769
|
+
title: z.ZodString;
|
|
1770
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1771
|
+
bullets: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1772
|
+
}, z.core.$strip>>>;
|
|
1773
|
+
author: z.ZodEnum<{
|
|
1774
|
+
candidate: "candidate";
|
|
1775
|
+
}>;
|
|
1776
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1777
|
+
kind: z.ZodLiteral<"reorder">;
|
|
1778
|
+
section: z.ZodEnum<{
|
|
1779
|
+
links: "links";
|
|
1780
|
+
skills: "skills";
|
|
1781
|
+
experience: "experience";
|
|
1782
|
+
education: "education";
|
|
1783
|
+
certifications: "certifications";
|
|
1784
|
+
achievements: "achievements";
|
|
1785
|
+
courses: "courses";
|
|
1786
|
+
passions: "passions";
|
|
1787
|
+
languages: "languages";
|
|
1788
|
+
}>;
|
|
1789
|
+
order: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1790
|
+
base: z.ZodNumber;
|
|
1791
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1792
|
+
ref: z.ZodString;
|
|
1793
|
+
}, z.core.$strip>]>>;
|
|
1794
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1795
|
+
kind: z.ZodLiteral<"hide">;
|
|
1796
|
+
section: z.ZodEnum<{
|
|
1797
|
+
links: "links";
|
|
1798
|
+
skills: "skills";
|
|
1799
|
+
experience: "experience";
|
|
1800
|
+
education: "education";
|
|
1801
|
+
certifications: "certifications";
|
|
1802
|
+
achievements: "achievements";
|
|
1803
|
+
courses: "courses";
|
|
1804
|
+
passions: "passions";
|
|
1805
|
+
languages: "languages";
|
|
1806
|
+
}>;
|
|
1807
|
+
base: z.ZodNumber;
|
|
1808
|
+
}, z.core.$strip>], "kind">, unknown>>>;
|
|
1809
|
+
style: z.ZodOptional<z.ZodObject<{
|
|
1810
|
+
font: z.ZodEnum<{
|
|
1811
|
+
helvetica: "helvetica";
|
|
1812
|
+
arial: "arial";
|
|
1813
|
+
calibri: "calibri";
|
|
1814
|
+
georgia: "georgia";
|
|
1815
|
+
garamond: "garamond";
|
|
1816
|
+
times: "times";
|
|
1817
|
+
lato: "lato";
|
|
1818
|
+
condensed: "condensed";
|
|
1819
|
+
ptserif: "ptserif";
|
|
1820
|
+
bitter: "bitter";
|
|
1821
|
+
}>;
|
|
1822
|
+
ink: z.ZodEnum<{
|
|
1823
|
+
cobalt: "cobalt";
|
|
1824
|
+
ink: "ink";
|
|
1825
|
+
slate: "slate";
|
|
1826
|
+
navy: "navy";
|
|
1827
|
+
maroon: "maroon";
|
|
1828
|
+
forest: "forest";
|
|
1829
|
+
grey: "grey";
|
|
1830
|
+
charcoal: "charcoal";
|
|
1831
|
+
indigo: "indigo";
|
|
1832
|
+
teal: "teal";
|
|
1833
|
+
olive: "olive";
|
|
1834
|
+
plum: "plum";
|
|
1835
|
+
rust: "rust";
|
|
1836
|
+
brown: "brown";
|
|
1837
|
+
}>;
|
|
1838
|
+
scale: z.ZodNumber;
|
|
1839
|
+
accent: z.ZodOptional<z.ZodEnum<{
|
|
1840
|
+
cobalt: "cobalt";
|
|
1841
|
+
ink: "ink";
|
|
1842
|
+
slate: "slate";
|
|
1843
|
+
navy: "navy";
|
|
1844
|
+
maroon: "maroon";
|
|
1845
|
+
forest: "forest";
|
|
1846
|
+
grey: "grey";
|
|
1847
|
+
charcoal: "charcoal";
|
|
1848
|
+
indigo: "indigo";
|
|
1849
|
+
teal: "teal";
|
|
1850
|
+
olive: "olive";
|
|
1851
|
+
plum: "plum";
|
|
1852
|
+
rust: "rust";
|
|
1853
|
+
brown: "brown";
|
|
1854
|
+
}>>;
|
|
1855
|
+
density: z.ZodOptional<z.ZodEnum<{
|
|
1856
|
+
tight: "tight";
|
|
1857
|
+
normal: "normal";
|
|
1858
|
+
roomy: "roomy";
|
|
1859
|
+
}>>;
|
|
1860
|
+
tracking: z.ZodOptional<z.ZodEnum<{
|
|
1861
|
+
tight: "tight";
|
|
1862
|
+
wide: "wide";
|
|
1863
|
+
}>>;
|
|
1864
|
+
leading: z.ZodOptional<z.ZodEnum<{
|
|
1865
|
+
compact: "compact";
|
|
1866
|
+
relaxed: "relaxed";
|
|
1867
|
+
airy: "airy";
|
|
1868
|
+
}>>;
|
|
1869
|
+
headingFont: z.ZodOptional<z.ZodEnum<{
|
|
1870
|
+
helvetica: "helvetica";
|
|
1871
|
+
arial: "arial";
|
|
1872
|
+
calibri: "calibri";
|
|
1873
|
+
georgia: "georgia";
|
|
1874
|
+
garamond: "garamond";
|
|
1875
|
+
times: "times";
|
|
1876
|
+
lato: "lato";
|
|
1877
|
+
condensed: "condensed";
|
|
1878
|
+
ptserif: "ptserif";
|
|
1879
|
+
bitter: "bitter";
|
|
1880
|
+
}>>;
|
|
1881
|
+
headingCase: z.ZodOptional<z.ZodEnum<{
|
|
1882
|
+
normal: "normal";
|
|
1883
|
+
upper: "upper";
|
|
1884
|
+
smallcaps: "smallcaps";
|
|
1885
|
+
}>>;
|
|
1886
|
+
headingWeight: z.ZodOptional<z.ZodEnum<{
|
|
1887
|
+
bold: "bold";
|
|
1888
|
+
regular: "regular";
|
|
1889
|
+
}>>;
|
|
1890
|
+
}, z.core.$strip>>;
|
|
1891
|
+
formats: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1892
|
+
path: z.ZodString;
|
|
1893
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
1894
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
1895
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
1896
|
+
step: z.ZodOptional<z.ZodEnum<{
|
|
1897
|
+
smaller: "smaller";
|
|
1898
|
+
larger: "larger";
|
|
1899
|
+
}>>;
|
|
1900
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
1901
|
+
left: "left";
|
|
1902
|
+
center: "center";
|
|
1903
|
+
right: "right";
|
|
1904
|
+
}>>;
|
|
1905
|
+
ink: z.ZodOptional<z.ZodEnum<{
|
|
1906
|
+
cobalt: "cobalt";
|
|
1907
|
+
ink: "ink";
|
|
1908
|
+
slate: "slate";
|
|
1909
|
+
navy: "navy";
|
|
1910
|
+
maroon: "maroon";
|
|
1911
|
+
forest: "forest";
|
|
1912
|
+
grey: "grey";
|
|
1913
|
+
charcoal: "charcoal";
|
|
1914
|
+
indigo: "indigo";
|
|
1915
|
+
teal: "teal";
|
|
1916
|
+
olive: "olive";
|
|
1917
|
+
plum: "plum";
|
|
1918
|
+
rust: "rust";
|
|
1919
|
+
brown: "brown";
|
|
1920
|
+
}>>;
|
|
1921
|
+
space: z.ZodOptional<z.ZodEnum<{
|
|
1922
|
+
[x: string]: string;
|
|
1923
|
+
}>>;
|
|
1924
|
+
href: z.ZodOptional<z.ZodString>;
|
|
1925
|
+
}, z.core.$strip>>>;
|
|
1926
|
+
section_spacing: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1927
|
+
section: z.ZodEnum<{
|
|
1928
|
+
summary: "summary";
|
|
1929
|
+
skills: "skills";
|
|
1930
|
+
experience: "experience";
|
|
1931
|
+
education: "education";
|
|
1932
|
+
certifications: "certifications";
|
|
1933
|
+
achievements: "achievements";
|
|
1934
|
+
courses: "courses";
|
|
1935
|
+
passions: "passions";
|
|
1936
|
+
languages: "languages";
|
|
1937
|
+
}>;
|
|
1938
|
+
space: z.ZodEnum<{
|
|
1939
|
+
[x: string]: string;
|
|
1940
|
+
}>;
|
|
1941
|
+
}, z.core.$strip>>>;
|
|
1942
|
+
language: z.ZodOptional<z.ZodEnum<{
|
|
1943
|
+
en: "en";
|
|
1944
|
+
es: "es";
|
|
1945
|
+
}>>;
|
|
1946
|
+
}, z.core.$strip>;
|
|
1947
|
+
export type PutPresentationRequest = z.infer<typeof PutPresentationRequestSchema>;
|
|
1948
|
+
/** The value a path addresses, or `undefined` when it does not resolve. */
|
|
1949
|
+
export declare function readAtPath(resume: ResumeObject, path: string): unknown;
|
|
1950
|
+
/**
|
|
1951
|
+
* The order a collection is actually drawn in, as slots.
|
|
1952
|
+
*
|
|
1953
|
+
* THE single definition of "which entries exist here, and in what order" —
|
|
1954
|
+
* `applyPresentation` builds the rendered array from it and the editor builds
|
|
1955
|
+
* its field paths from it, so the document and the paths into it can never
|
|
1956
|
+
* disagree. The same reasoning `appendedEntryRefs` records: a renderer that
|
|
1957
|
+
* recomputed this would be a second definition, free to drift.
|
|
1958
|
+
*
|
|
1959
|
+
* Total by construction. A slot that does not resolve is dropped, an entry no
|
|
1960
|
+
* slot names keeps its natural order after the ones that are named, and a
|
|
1961
|
+
* duplicated slot keeps its first occurrence — so an ordering written against a
|
|
1962
|
+
* résumé the writer has since replaced degrades to the writer's own order
|
|
1963
|
+
* rather than to a document that will not open.
|
|
1964
|
+
*/
|
|
1965
|
+
export declare function collectionOrder(base: ResumeObject, edits: ResumeEdits, section: AppendableSection): Slot[];
|
|
1966
|
+
/**
|
|
1967
|
+
* Apply a presentation's edits to the writer's resume and validate the result.
|
|
1968
|
+
*
|
|
1969
|
+
* Pure: no I/O, no model call, and the input is never mutated — the run's
|
|
1970
|
+
* `result.resume_object` stays exactly what the model produced, so an edit is
|
|
1971
|
+
* reversible by dropping the overlay and the grounding record survives.
|
|
1972
|
+
*
|
|
1973
|
+
* A path that does not resolve is **skipped**, not thrown. A stored overlay is
|
|
1974
|
+
* data at rest that outlives the code that wrote it; a retired field must
|
|
1975
|
+
* degrade to a dropped edit, never to a resume that will not open.
|
|
1976
|
+
*
|
|
1977
|
+
* @throws if the edits would produce a resume the schema refuses.
|
|
1978
|
+
*/
|
|
1979
|
+
export declare function applyPresentation(resume: ResumeObject, edits: ResumeEdits): PresentedResume;
|
|
1980
|
+
/**
|
|
1981
|
+
* Where each addition's fields are addressed, for the editor that draws them.
|
|
1982
|
+
*
|
|
1983
|
+
* Exported so the document emits the paths this module reads back, from this
|
|
1984
|
+
* module's own arithmetic. The two were computed separately and disagreed —
|
|
1985
|
+
* see `additionSlots` — which is the kind of bug that only shows up as text
|
|
1986
|
+
* appearing in the wrong job.
|
|
1987
|
+
*/
|
|
1988
|
+
export declare function additionPaths(base: ResumeObject, edits: ResumeEdits): Map<string, string>;
|
|
1989
|
+
/**
|
|
1990
|
+
* What decides which FIELDS the document has, as opposed to what they say.
|
|
1991
|
+
*
|
|
1992
|
+
* The editor rebuilds its node tree when this changes, and must not when only
|
|
1993
|
+
* the text does. An addition's words live inside its own `append` edit — that
|
|
1994
|
+
* is what `foldAdditions` is for — so serializing the overlay whole made every
|
|
1995
|
+
* character typed into a newly added role look like a structural change: the
|
|
1996
|
+
* tree was rebuilt mid-word and the field the candidate was typing in was
|
|
1997
|
+
* unmounted from under them. What a `ref` SAYS is not part of the document's
|
|
1998
|
+
* shape; that it exists, and where it sits, is.
|
|
1999
|
+
*
|
|
2000
|
+
* A custom section's entry COUNT is shape — one more entry is one more set of
|
|
2001
|
+
* fields — while its heading and its entries' text are not.
|
|
2002
|
+
*/
|
|
2003
|
+
export declare function documentShapeKey(edits: ResumeEdits): string;
|
|
2004
|
+
/**
|
|
2005
|
+
* The inverse projection: given the values a surface currently holds, keep only
|
|
2006
|
+
* those that differ from the writer's resume.
|
|
2007
|
+
*
|
|
2008
|
+
* This is what makes an untouched document store nothing, and what keeps the
|
|
2009
|
+
* overlay a record of the candidate's corrections rather than a second copy of
|
|
2010
|
+
* the whole resume.
|
|
2011
|
+
*
|
|
2012
|
+
* Sorted by path so that saving the same document twice produces the same
|
|
2013
|
+
* overlay — a diff of two saves should show what the candidate changed, not what
|
|
2014
|
+
* order a node tree happened to be walked in.
|
|
2015
|
+
*/
|
|
2016
|
+
export declare function presentationEdits(base: ResumeObject, values: Record<string, EditValue>, structural?: ResumeEdits, defaults?: Readonly<Record<string, string>>): ResumeEdits;
|
|
2017
|
+
/**
|
|
2018
|
+
* A surface's new overlay, keeping the replacements it could not see.
|
|
2019
|
+
*
|
|
2020
|
+
* An editing surface reports its overlay from the fields it DRAWS. A template
|
|
2021
|
+
* that draws no location for a role therefore reported no replacement for one,
|
|
2022
|
+
* and a location the candidate typed under another template was deleted by
|
|
2023
|
+
* merely switching to this one and back. The résumé's data must not depend on
|
|
2024
|
+
* which template happens to be drawing it.
|
|
2025
|
+
*
|
|
2026
|
+
* So a replacement in `previous` survives when its field is not among `shown`
|
|
2027
|
+
* and `next` says nothing about it. A field that IS shown is reported by the
|
|
2028
|
+
* surface, so its absence from `next` is a real revert and is respected.
|
|
2029
|
+
*
|
|
2030
|
+
* Safe to carry because a replacement only ever addresses the writer's own
|
|
2031
|
+
* entries, and those are hidden rather than deleted. A hidden entry keeps its
|
|
2032
|
+
* corrections for when it is shown again. An addition's words live inside its
|
|
2033
|
+
* own `append` edit and never arrive here.
|
|
2034
|
+
*/
|
|
2035
|
+
export declare function withUnshownReplacements(previous: ResumeEdits, next: ResumeEdits, shown: ReadonlySet<string>): ResumeEdits;
|
|
2036
|
+
/**
|
|
2037
|
+
* Which entries of a section the candidate added, by their index in the
|
|
2038
|
+
* PRESENTED résumé, paired with the `ref` that names them.
|
|
2039
|
+
*
|
|
2040
|
+
* Derived rather than stored in the document: appends land after the base
|
|
2041
|
+
* entries in overlay order, so the boundary is `base[section].length` and the
|
|
2042
|
+
* order is the overlay's. That is what lets `ResumeObject` stay exactly the
|
|
2043
|
+
* shape a template already renders, with no editor bookkeeping written into it.
|
|
2044
|
+
*
|
|
2045
|
+
* This is the one place the derivation lives — an editor that recomputed it
|
|
2046
|
+
* would be a second definition of "which of these did I add", free to disagree.
|
|
2047
|
+
*/
|
|
2048
|
+
export declare function appendedEntryRefs(base: ResumeObject, edits: ResumeEdits, section: AppendableSection): Map<number, string>;
|
|
2049
|
+
//# sourceMappingURL=template.d.ts.map
|