@resumekit/schema 0.0.0-stage → 0.1.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.
@@ -0,0 +1,1705 @@
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
+ };
869
+ export type InkId = keyof typeof INK_COLORS;
870
+ export declare const InkIdSchema: z.ZodEnum<{
871
+ ink: "ink";
872
+ slate: "slate";
873
+ navy: "navy";
874
+ maroon: "maroon";
875
+ forest: "forest";
876
+ grey: "grey";
877
+ }>;
878
+ /**
879
+ * How open the document's vertical rhythm is — a MULTIPLIER on the template's
880
+ * own spacing, for the same reason `scale` multiplies its type scale rather than
881
+ * setting a point size.
882
+ *
883
+ * A template's spacing is a set of relationships: the gap under a section
884
+ * heading is smaller than the gap between two sections, and that is a
885
+ * typographic decision the template made. A multiplier preserves those
886
+ * relationships; a set of measurements would let a candidate put more air
887
+ * between a heading and its own body than between two sections.
888
+ *
889
+ * Named rather than continuous because the useful positions are three —
890
+ * "tighter", "as designed", "more open" — and three named values are three test
891
+ * cases in the guarantee suite.
892
+ */
893
+ export declare const DENSITIES: {
894
+ readonly tight: {
895
+ readonly name: "Tight";
896
+ readonly factor: 0.85;
897
+ };
898
+ readonly normal: {
899
+ readonly name: "Normal";
900
+ readonly factor: 1;
901
+ };
902
+ readonly roomy: {
903
+ readonly name: "Roomy";
904
+ readonly factor: 1.15;
905
+ };
906
+ };
907
+ export type DensityId = keyof typeof DENSITIES;
908
+ export declare const DensityIdSchema: z.ZodEnum<{
909
+ tight: "tight";
910
+ normal: "normal";
911
+ roomy: "roomy";
912
+ }>;
913
+ /** What a document is spaced at before anybody chooses. */
914
+ export declare const DENSITY_DEFAULT: DensityId;
915
+ /**
916
+ * Extra space above one section, or one field.
917
+ *
918
+ * The `steps` are counted in the template's OWN spacing unit, not in any
919
+ * absolute measure — `s2` is two of whatever a section gap is in that template,
920
+ * so Harvard's `s2` and Executive's `s2` are both "noticeably more air" in their
921
+ * respective rhythms rather than the same number of millimetres in both.
922
+ *
923
+ * This is the control a candidate actually reaches for when a section feels
924
+ * cramped. Without it the only way to close a gap is the type scale, which
925
+ * makes every word smaller to fix a margin.
926
+ *
927
+ * A SCALE, not a set of presets, and that is a consequence of what the control
928
+ * turned out to be. The catalog began as `sm` / `md` / `lg` — three names for a
929
+ * picker in a panel. The control is the gap itself now, dragged where the space
930
+ * will appear, and a drag with three stops reads as a switch: somebody closing
931
+ * up a header is adjusting a distance, not choosing an adjective.
932
+ *
933
+ * So it is a fine scale with a ceiling: fifths of a unit, up to 200. Fine
934
+ * enough that the drag tracks the hand and a gap can be nudged rather than
935
+ * jumped, bounded so that the whole product of styling combinations is still
936
+ * enumerable — which is what the ATS guarantee test walks, and the condition on
937
+ * having a drag at all. Nothing here is a measurement: the number counts the
938
+ * template's unit, and the template decides what that is.
939
+ */
940
+ /** The finest adjustment the scale can express, in template units. */
941
+ export declare const SPACE_QUANTUM = 0.2;
942
+ /** The most space a gap can hold, in template units. */
943
+ export declare const SPACE_LIMIT = 200;
944
+ /**
945
+ * Built rather than written out, because 1,000 named constants is a table
946
+ * nobody reads and one that cannot drift from its own arithmetic. The id keeps
947
+ * the number legible in a stored document — `s3_4` is three and two fifths of
948
+ * the template's unit — and the tenths are underscored because a dot is a path
949
+ * separator everywhere else in this file.
950
+ */
951
+ export declare const SECTION_SPACES: Record<string, {
952
+ name: string;
953
+ steps: number;
954
+ }>;
955
+ export type SectionSpaceId = keyof typeof SECTION_SPACES;
956
+ export declare const SectionSpaceIdSchema: z.ZodEnum<{
957
+ [x: string]: string;
958
+ }>;
959
+ /** The scale in order, shallowest first. `none` is the first step, not a gap. */
960
+ export declare const SPACE_SCALE: string[];
961
+ /** The most steps this catalog can express. */
962
+ export declare const SPACE_MAX_STEPS = 200;
963
+ /**
964
+ * How many steps a token is worth. `undefined` is none, which is what an
965
+ * absent record means.
966
+ */
967
+ export declare function spaceSteps(id: SectionSpaceId | undefined): number;
968
+ /**
969
+ * The token for a number of steps, clamped to the scale.
970
+ *
971
+ * The one place a number becomes a token, so a drag — which is arithmetic on a
972
+ * pointer — cannot express a value the catalog does not hold. Anything off the
973
+ * scale lands on its nearest end rather than being refused: a candidate who
974
+ * drags past the bottom has asked for no space, and a control that stopped
975
+ * responding would read as broken.
976
+ */
977
+ export declare function spaceAtStep(steps: number): SectionSpaceId;
978
+ /**
979
+ * The sections spacing can be keyed by.
980
+ *
981
+ * A fixed enum of the sections a `ResumeObject` already has — deliberately NOT a
982
+ * composition model. "Space above Experience" is answerable today, and making it
983
+ * wait for sections to become addable, removable and orderable would hold a small
984
+ * control hostage to a much larger change.
985
+ */
986
+ export declare const RESUME_SECTIONS: readonly ["summary", "skills", "experience", "education", "certifications", "achievements", "courses", "passions", "languages"];
987
+ export type ResumeSectionId = (typeof RESUME_SECTIONS)[number];
988
+ export declare const ResumeSectionIdSchema: z.ZodEnum<{
989
+ summary: "summary";
990
+ skills: "skills";
991
+ experience: "experience";
992
+ education: "education";
993
+ certifications: "certifications";
994
+ achievements: "achievements";
995
+ courses: "courses";
996
+ passions: "passions";
997
+ languages: "languages";
998
+ }>;
999
+ /**
1000
+ * The document size scale — a MULTIPLIER on the template's own type scale, not a
1001
+ * point size.
1002
+ *
1003
+ * The template's sizes are a set of relationships (name over heading over body);
1004
+ * a multiplier preserves them, whereas a point size would let a candidate set
1005
+ * body text larger than the headings above it. Bounded because the useful range
1006
+ * is "fit it on one page" / "fill the page", and everything past that is a worse
1007
+ * resume.
1008
+ */
1009
+ export declare const SCALE_MIN = 0.85;
1010
+ export declare const SCALE_MAX = 1.2;
1011
+ export declare const SCALE_STEP = 0.05;
1012
+ export declare const SCALE_DEFAULT = 1;
1013
+ /** Round to the nearest representable scale, clamped to the bounds. */
1014
+ export declare function normalizeScale(value: number): number;
1015
+ /**
1016
+ * How the whole document is set. Absent means the template's own defaults — a
1017
+ * resume nobody has styled renders exactly as the template defines it.
1018
+ */
1019
+ export declare const DocumentStyleSchema: z.ZodObject<{
1020
+ font: z.ZodEnum<{
1021
+ helvetica: "helvetica";
1022
+ arial: "arial";
1023
+ calibri: "calibri";
1024
+ georgia: "georgia";
1025
+ garamond: "garamond";
1026
+ times: "times";
1027
+ lato: "lato";
1028
+ condensed: "condensed";
1029
+ ptserif: "ptserif";
1030
+ bitter: "bitter";
1031
+ }>;
1032
+ ink: z.ZodEnum<{
1033
+ ink: "ink";
1034
+ slate: "slate";
1035
+ navy: "navy";
1036
+ maroon: "maroon";
1037
+ forest: "forest";
1038
+ grey: "grey";
1039
+ }>;
1040
+ scale: z.ZodNumber;
1041
+ accent: z.ZodOptional<z.ZodEnum<{
1042
+ ink: "ink";
1043
+ slate: "slate";
1044
+ navy: "navy";
1045
+ maroon: "maroon";
1046
+ forest: "forest";
1047
+ grey: "grey";
1048
+ }>>;
1049
+ density: z.ZodOptional<z.ZodEnum<{
1050
+ tight: "tight";
1051
+ normal: "normal";
1052
+ roomy: "roomy";
1053
+ }>>;
1054
+ }, z.core.$strip>;
1055
+ export type DocumentStyle = z.infer<typeof DocumentStyleSchema>;
1056
+ /** How one line is set, over and above the document's own style. */
1057
+ export declare const FieldAlignSchema: z.ZodEnum<{
1058
+ left: "left";
1059
+ center: "center";
1060
+ right: "right";
1061
+ }>;
1062
+ export type FieldAlign = z.infer<typeof FieldAlignSchema>;
1063
+ export declare const FieldFormatSchema: z.ZodObject<{
1064
+ path: z.ZodString;
1065
+ bold: z.ZodOptional<z.ZodBoolean>;
1066
+ align: z.ZodOptional<z.ZodEnum<{
1067
+ left: "left";
1068
+ center: "center";
1069
+ right: "right";
1070
+ }>>;
1071
+ ink: z.ZodOptional<z.ZodEnum<{
1072
+ ink: "ink";
1073
+ slate: "slate";
1074
+ navy: "navy";
1075
+ maroon: "maroon";
1076
+ forest: "forest";
1077
+ grey: "grey";
1078
+ }>>;
1079
+ space: z.ZodOptional<z.ZodEnum<{
1080
+ [x: string]: string;
1081
+ }>>;
1082
+ href: z.ZodOptional<z.ZodString>;
1083
+ }, z.core.$strip>;
1084
+ export type FieldFormat = z.infer<typeof FieldFormatSchema>;
1085
+ /** A format carrying no flags says nothing; it is dropped rather than stored. */
1086
+ export declare function formatIsEmpty(format: FieldFormat): boolean;
1087
+ /**
1088
+ * Per-field formatting.
1089
+ *
1090
+ * A **list** for the same reason `edits` is one: `RunStore.update` writes through
1091
+ * Firestore's `set(…, { merge: true })`, which deep-merges maps, so formatting a
1092
+ * candidate cleared would survive its own clearing.
1093
+ */
1094
+ export declare const ResumeFormatsSchema: z.ZodArray<z.ZodObject<{
1095
+ path: z.ZodString;
1096
+ bold: z.ZodOptional<z.ZodBoolean>;
1097
+ align: z.ZodOptional<z.ZodEnum<{
1098
+ left: "left";
1099
+ center: "center";
1100
+ right: "right";
1101
+ }>>;
1102
+ ink: z.ZodOptional<z.ZodEnum<{
1103
+ ink: "ink";
1104
+ slate: "slate";
1105
+ navy: "navy";
1106
+ maroon: "maroon";
1107
+ forest: "forest";
1108
+ grey: "grey";
1109
+ }>>;
1110
+ space: z.ZodOptional<z.ZodEnum<{
1111
+ [x: string]: string;
1112
+ }>>;
1113
+ href: z.ZodOptional<z.ZodString>;
1114
+ }, z.core.$strip>>;
1115
+ export type ResumeFormats = z.infer<typeof ResumeFormatsSchema>;
1116
+ /** The format for one path, or undefined when the field carries none. */
1117
+ export declare function formatFor(formats: ResumeFormats | undefined, path: string): FieldFormat | undefined;
1118
+ /**
1119
+ * Named presets over the document style.
1120
+ *
1121
+ * A theme is a STARTING POINT, not a mode: applying one writes concrete values
1122
+ * and nothing records that a theme was used. Storing a theme id instead would
1123
+ * make a saved document's appearance depend on a definition that can change
1124
+ * after it was saved — the same class of defect as an unversioned renderer,
1125
+ * reintroduced for no benefit. Concrete values keep rendering a pure function of
1126
+ * stored data, which is what a server-side render requires.
1127
+ *
1128
+ * The cost is that the editor cannot say "you are on Classic" afterwards. That
1129
+ * is a label, and it is not worth a second source of truth about how a document
1130
+ * looks.
1131
+ */
1132
+ export declare const THEMES: {
1133
+ readonly classic: {
1134
+ readonly name: "Classic";
1135
+ readonly description: "Serif and restrained";
1136
+ readonly style: {
1137
+ readonly font: "times";
1138
+ readonly ink: "ink";
1139
+ readonly accent: "ink";
1140
+ readonly density: "normal";
1141
+ };
1142
+ };
1143
+ readonly modern: {
1144
+ readonly name: "Modern";
1145
+ readonly description: "Open and current";
1146
+ readonly style: {
1147
+ readonly font: "helvetica";
1148
+ readonly ink: "slate";
1149
+ readonly accent: "navy";
1150
+ readonly density: "roomy";
1151
+ };
1152
+ };
1153
+ readonly compact: {
1154
+ readonly name: "Compact";
1155
+ readonly description: "Tight, fits more";
1156
+ readonly style: {
1157
+ readonly font: "arial";
1158
+ readonly ink: "ink";
1159
+ readonly accent: "grey";
1160
+ readonly density: "tight";
1161
+ };
1162
+ };
1163
+ readonly academic: {
1164
+ readonly name: "Academic";
1165
+ readonly description: "Formal and sober";
1166
+ readonly style: {
1167
+ readonly font: "georgia";
1168
+ readonly ink: "ink";
1169
+ readonly accent: "maroon";
1170
+ readonly density: "normal";
1171
+ };
1172
+ };
1173
+ };
1174
+ export type ThemeId = keyof typeof THEMES;
1175
+ /**
1176
+ * Apply a theme, preserving what the theme does not speak to.
1177
+ *
1178
+ * The size scale survives: it is how a candidate fits their resume on one page,
1179
+ * which is a decision about THEIR document rather than about its styling, and
1180
+ * silently resetting it would undo work a theme has no opinion about.
1181
+ */
1182
+ export declare function applyTheme(style: DocumentStyle, id: ThemeId): DocumentStyle;
1183
+ /** Extra space above one named section. */
1184
+ export declare const SectionSpacingSchema: z.ZodObject<{
1185
+ section: z.ZodEnum<{
1186
+ summary: "summary";
1187
+ skills: "skills";
1188
+ experience: "experience";
1189
+ education: "education";
1190
+ certifications: "certifications";
1191
+ achievements: "achievements";
1192
+ courses: "courses";
1193
+ passions: "passions";
1194
+ languages: "languages";
1195
+ }>;
1196
+ space: z.ZodEnum<{
1197
+ [x: string]: string;
1198
+ }>;
1199
+ }, z.core.$strip>;
1200
+ export type SectionSpacing = z.infer<typeof SectionSpacingSchema>;
1201
+ /**
1202
+ * Space above the document's sections.
1203
+ *
1204
+ * A **list**, for exactly the reason `edits` and `formats` are lists:
1205
+ * `RunStore.update` writes through Firestore's `set(…, { merge: true })`, which
1206
+ * deep-merges maps — so a spacing the candidate cleared would survive its own
1207
+ * clearing if this were keyed.
1208
+ *
1209
+ * `none` is refused rather than stored for the same reason `formatIsEmpty`
1210
+ * drops an empty format: returning a control to where it started should leave no
1211
+ * trace, so an untouched document stores nothing.
1212
+ */
1213
+ export declare const ResumeSectionSpacingSchema: z.ZodArray<z.ZodObject<{
1214
+ section: z.ZodEnum<{
1215
+ summary: "summary";
1216
+ skills: "skills";
1217
+ experience: "experience";
1218
+ education: "education";
1219
+ certifications: "certifications";
1220
+ achievements: "achievements";
1221
+ courses: "courses";
1222
+ passions: "passions";
1223
+ languages: "languages";
1224
+ }>;
1225
+ space: z.ZodEnum<{
1226
+ [x: string]: string;
1227
+ }>;
1228
+ }, z.core.$strip>>;
1229
+ export type ResumeSectionSpacing = z.infer<typeof ResumeSectionSpacingSchema>;
1230
+ /** The spacing for one section, or undefined when it carries none. */
1231
+ export declare function spacingFor(spacing: ResumeSectionSpacing | undefined, section: string): SectionSpacing | undefined;
1232
+ /**
1233
+ * How a run's resume is presented: which template, and the candidate's own
1234
+ * corrections on top of what the writer produced.
1235
+ *
1236
+ * Deliberately NOT the editor's serialized node tree. The tree is
1237
+ * template-shaped and library-shaped; this is neither, so switching template
1238
+ * loses nothing, `ResumeObjectSchema` still governs the result, and renaming a
1239
+ * React component cannot invalidate a stored document.
1240
+ *
1241
+ * @pii `edits` holds resume text. It lives on the run record beside the result
1242
+ * it corrects, so it shares that run's owner scope, retention, and deletion.
1243
+ */
1244
+ export declare const ResumePresentationSchema: z.ZodObject<{
1245
+ template_id: z.ZodEnum<{
1246
+ split: "split";
1247
+ harvard: "harvard";
1248
+ ivy: "ivy";
1249
+ classic: "classic";
1250
+ compact: "compact";
1251
+ timeline: "timeline";
1252
+ modern: "modern";
1253
+ stylish: "stylish";
1254
+ creative: "creative";
1255
+ contemporary: "contemporary";
1256
+ "double-column": "double-column";
1257
+ "double-column-logos": "double-column-logos";
1258
+ elegant: "elegant";
1259
+ "elegant-logos": "elegant-logos";
1260
+ polished: "polished";
1261
+ executive: "executive";
1262
+ meridian: "meridian";
1263
+ cobalt: "cobalt";
1264
+ crimson: "crimson";
1265
+ engineer: "engineer";
1266
+ academic: "academic";
1267
+ alta: "alta";
1268
+ prism: "prism";
1269
+ hipster: "hipster";
1270
+ scholar: "scholar";
1271
+ portrait: "portrait";
1272
+ curve: "curve";
1273
+ }>;
1274
+ edits: z.ZodDefault<z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
1275
+ kind: z.ZodLiteral<"set">;
1276
+ path: z.ZodString;
1277
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
1278
+ }, z.core.$strip>, z.ZodObject<{
1279
+ kind: z.ZodLiteral<"append">;
1280
+ ref: z.ZodString;
1281
+ section: z.ZodEnum<{
1282
+ links: "links";
1283
+ skills: "skills";
1284
+ experience: "experience";
1285
+ education: "education";
1286
+ certifications: "certifications";
1287
+ achievements: "achievements";
1288
+ courses: "courses";
1289
+ passions: "passions";
1290
+ languages: "languages";
1291
+ }>;
1292
+ entry: z.ZodUnknown;
1293
+ author: z.ZodEnum<{
1294
+ candidate: "candidate";
1295
+ }>;
1296
+ }, z.core.$strip>, z.ZodObject<{
1297
+ kind: z.ZodLiteral<"drop">;
1298
+ ref: z.ZodString;
1299
+ }, z.core.$strip>, z.ZodObject<{
1300
+ kind: z.ZodLiteral<"section">;
1301
+ ref: z.ZodString;
1302
+ heading: z.ZodString;
1303
+ entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
1304
+ title: z.ZodString;
1305
+ detail: z.ZodOptional<z.ZodString>;
1306
+ bullets: z.ZodDefault<z.ZodArray<z.ZodString>>;
1307
+ }, z.core.$strip>>>;
1308
+ author: z.ZodEnum<{
1309
+ candidate: "candidate";
1310
+ }>;
1311
+ }, z.core.$strip>, z.ZodObject<{
1312
+ kind: z.ZodLiteral<"reorder">;
1313
+ section: z.ZodEnum<{
1314
+ links: "links";
1315
+ skills: "skills";
1316
+ experience: "experience";
1317
+ education: "education";
1318
+ certifications: "certifications";
1319
+ achievements: "achievements";
1320
+ courses: "courses";
1321
+ passions: "passions";
1322
+ languages: "languages";
1323
+ }>;
1324
+ order: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1325
+ base: z.ZodNumber;
1326
+ }, z.core.$strip>, z.ZodObject<{
1327
+ ref: z.ZodString;
1328
+ }, z.core.$strip>]>>;
1329
+ }, z.core.$strip>, z.ZodObject<{
1330
+ kind: z.ZodLiteral<"hide">;
1331
+ section: z.ZodEnum<{
1332
+ links: "links";
1333
+ skills: "skills";
1334
+ experience: "experience";
1335
+ education: "education";
1336
+ certifications: "certifications";
1337
+ achievements: "achievements";
1338
+ courses: "courses";
1339
+ passions: "passions";
1340
+ languages: "languages";
1341
+ }>;
1342
+ base: z.ZodNumber;
1343
+ }, z.core.$strip>], "kind">, unknown>>>;
1344
+ style: z.ZodOptional<z.ZodObject<{
1345
+ font: z.ZodEnum<{
1346
+ helvetica: "helvetica";
1347
+ arial: "arial";
1348
+ calibri: "calibri";
1349
+ georgia: "georgia";
1350
+ garamond: "garamond";
1351
+ times: "times";
1352
+ lato: "lato";
1353
+ condensed: "condensed";
1354
+ ptserif: "ptserif";
1355
+ bitter: "bitter";
1356
+ }>;
1357
+ ink: z.ZodEnum<{
1358
+ ink: "ink";
1359
+ slate: "slate";
1360
+ navy: "navy";
1361
+ maroon: "maroon";
1362
+ forest: "forest";
1363
+ grey: "grey";
1364
+ }>;
1365
+ scale: z.ZodNumber;
1366
+ accent: z.ZodOptional<z.ZodEnum<{
1367
+ ink: "ink";
1368
+ slate: "slate";
1369
+ navy: "navy";
1370
+ maroon: "maroon";
1371
+ forest: "forest";
1372
+ grey: "grey";
1373
+ }>>;
1374
+ density: z.ZodOptional<z.ZodEnum<{
1375
+ tight: "tight";
1376
+ normal: "normal";
1377
+ roomy: "roomy";
1378
+ }>>;
1379
+ }, z.core.$strip>>;
1380
+ formats: z.ZodOptional<z.ZodArray<z.ZodObject<{
1381
+ path: z.ZodString;
1382
+ bold: z.ZodOptional<z.ZodBoolean>;
1383
+ align: z.ZodOptional<z.ZodEnum<{
1384
+ left: "left";
1385
+ center: "center";
1386
+ right: "right";
1387
+ }>>;
1388
+ ink: z.ZodOptional<z.ZodEnum<{
1389
+ ink: "ink";
1390
+ slate: "slate";
1391
+ navy: "navy";
1392
+ maroon: "maroon";
1393
+ forest: "forest";
1394
+ grey: "grey";
1395
+ }>>;
1396
+ space: z.ZodOptional<z.ZodEnum<{
1397
+ [x: string]: string;
1398
+ }>>;
1399
+ href: z.ZodOptional<z.ZodString>;
1400
+ }, z.core.$strip>>>;
1401
+ section_spacing: z.ZodOptional<z.ZodArray<z.ZodObject<{
1402
+ section: z.ZodEnum<{
1403
+ summary: "summary";
1404
+ skills: "skills";
1405
+ experience: "experience";
1406
+ education: "education";
1407
+ certifications: "certifications";
1408
+ achievements: "achievements";
1409
+ courses: "courses";
1410
+ passions: "passions";
1411
+ languages: "languages";
1412
+ }>;
1413
+ space: z.ZodEnum<{
1414
+ [x: string]: string;
1415
+ }>;
1416
+ }, z.core.$strip>>>;
1417
+ language: z.ZodOptional<z.ZodEnum<{
1418
+ en: "en";
1419
+ es: "es";
1420
+ }>>;
1421
+ updated_at: z.ZodString;
1422
+ }, z.core.$strip>;
1423
+ export type ResumePresentation = z.infer<typeof ResumePresentationSchema>;
1424
+ /** `PUT /runs/:id/presentation` request. The server owns `updated_at`. */
1425
+ export declare const PutPresentationRequestSchema: z.ZodObject<{
1426
+ template_id: z.ZodEnum<{
1427
+ split: "split";
1428
+ harvard: "harvard";
1429
+ ivy: "ivy";
1430
+ classic: "classic";
1431
+ compact: "compact";
1432
+ timeline: "timeline";
1433
+ modern: "modern";
1434
+ stylish: "stylish";
1435
+ creative: "creative";
1436
+ contemporary: "contemporary";
1437
+ "double-column": "double-column";
1438
+ "double-column-logos": "double-column-logos";
1439
+ elegant: "elegant";
1440
+ "elegant-logos": "elegant-logos";
1441
+ polished: "polished";
1442
+ executive: "executive";
1443
+ meridian: "meridian";
1444
+ cobalt: "cobalt";
1445
+ crimson: "crimson";
1446
+ engineer: "engineer";
1447
+ academic: "academic";
1448
+ alta: "alta";
1449
+ prism: "prism";
1450
+ hipster: "hipster";
1451
+ scholar: "scholar";
1452
+ portrait: "portrait";
1453
+ curve: "curve";
1454
+ }>;
1455
+ edits: z.ZodDefault<z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
1456
+ kind: z.ZodLiteral<"set">;
1457
+ path: z.ZodString;
1458
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
1459
+ }, z.core.$strip>, z.ZodObject<{
1460
+ kind: z.ZodLiteral<"append">;
1461
+ ref: z.ZodString;
1462
+ section: z.ZodEnum<{
1463
+ links: "links";
1464
+ skills: "skills";
1465
+ experience: "experience";
1466
+ education: "education";
1467
+ certifications: "certifications";
1468
+ achievements: "achievements";
1469
+ courses: "courses";
1470
+ passions: "passions";
1471
+ languages: "languages";
1472
+ }>;
1473
+ entry: z.ZodUnknown;
1474
+ author: z.ZodEnum<{
1475
+ candidate: "candidate";
1476
+ }>;
1477
+ }, z.core.$strip>, z.ZodObject<{
1478
+ kind: z.ZodLiteral<"drop">;
1479
+ ref: z.ZodString;
1480
+ }, z.core.$strip>, z.ZodObject<{
1481
+ kind: z.ZodLiteral<"section">;
1482
+ ref: z.ZodString;
1483
+ heading: z.ZodString;
1484
+ entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
1485
+ title: z.ZodString;
1486
+ detail: z.ZodOptional<z.ZodString>;
1487
+ bullets: z.ZodDefault<z.ZodArray<z.ZodString>>;
1488
+ }, z.core.$strip>>>;
1489
+ author: z.ZodEnum<{
1490
+ candidate: "candidate";
1491
+ }>;
1492
+ }, z.core.$strip>, z.ZodObject<{
1493
+ kind: z.ZodLiteral<"reorder">;
1494
+ section: z.ZodEnum<{
1495
+ links: "links";
1496
+ skills: "skills";
1497
+ experience: "experience";
1498
+ education: "education";
1499
+ certifications: "certifications";
1500
+ achievements: "achievements";
1501
+ courses: "courses";
1502
+ passions: "passions";
1503
+ languages: "languages";
1504
+ }>;
1505
+ order: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1506
+ base: z.ZodNumber;
1507
+ }, z.core.$strip>, z.ZodObject<{
1508
+ ref: z.ZodString;
1509
+ }, z.core.$strip>]>>;
1510
+ }, z.core.$strip>, z.ZodObject<{
1511
+ kind: z.ZodLiteral<"hide">;
1512
+ section: z.ZodEnum<{
1513
+ links: "links";
1514
+ skills: "skills";
1515
+ experience: "experience";
1516
+ education: "education";
1517
+ certifications: "certifications";
1518
+ achievements: "achievements";
1519
+ courses: "courses";
1520
+ passions: "passions";
1521
+ languages: "languages";
1522
+ }>;
1523
+ base: z.ZodNumber;
1524
+ }, z.core.$strip>], "kind">, unknown>>>;
1525
+ style: z.ZodOptional<z.ZodObject<{
1526
+ font: z.ZodEnum<{
1527
+ helvetica: "helvetica";
1528
+ arial: "arial";
1529
+ calibri: "calibri";
1530
+ georgia: "georgia";
1531
+ garamond: "garamond";
1532
+ times: "times";
1533
+ lato: "lato";
1534
+ condensed: "condensed";
1535
+ ptserif: "ptserif";
1536
+ bitter: "bitter";
1537
+ }>;
1538
+ ink: z.ZodEnum<{
1539
+ ink: "ink";
1540
+ slate: "slate";
1541
+ navy: "navy";
1542
+ maroon: "maroon";
1543
+ forest: "forest";
1544
+ grey: "grey";
1545
+ }>;
1546
+ scale: z.ZodNumber;
1547
+ accent: z.ZodOptional<z.ZodEnum<{
1548
+ ink: "ink";
1549
+ slate: "slate";
1550
+ navy: "navy";
1551
+ maroon: "maroon";
1552
+ forest: "forest";
1553
+ grey: "grey";
1554
+ }>>;
1555
+ density: z.ZodOptional<z.ZodEnum<{
1556
+ tight: "tight";
1557
+ normal: "normal";
1558
+ roomy: "roomy";
1559
+ }>>;
1560
+ }, z.core.$strip>>;
1561
+ formats: z.ZodOptional<z.ZodArray<z.ZodObject<{
1562
+ path: z.ZodString;
1563
+ bold: z.ZodOptional<z.ZodBoolean>;
1564
+ align: z.ZodOptional<z.ZodEnum<{
1565
+ left: "left";
1566
+ center: "center";
1567
+ right: "right";
1568
+ }>>;
1569
+ ink: z.ZodOptional<z.ZodEnum<{
1570
+ ink: "ink";
1571
+ slate: "slate";
1572
+ navy: "navy";
1573
+ maroon: "maroon";
1574
+ forest: "forest";
1575
+ grey: "grey";
1576
+ }>>;
1577
+ space: z.ZodOptional<z.ZodEnum<{
1578
+ [x: string]: string;
1579
+ }>>;
1580
+ href: z.ZodOptional<z.ZodString>;
1581
+ }, z.core.$strip>>>;
1582
+ section_spacing: z.ZodOptional<z.ZodArray<z.ZodObject<{
1583
+ section: z.ZodEnum<{
1584
+ summary: "summary";
1585
+ skills: "skills";
1586
+ experience: "experience";
1587
+ education: "education";
1588
+ certifications: "certifications";
1589
+ achievements: "achievements";
1590
+ courses: "courses";
1591
+ passions: "passions";
1592
+ languages: "languages";
1593
+ }>;
1594
+ space: z.ZodEnum<{
1595
+ [x: string]: string;
1596
+ }>;
1597
+ }, z.core.$strip>>>;
1598
+ language: z.ZodOptional<z.ZodEnum<{
1599
+ en: "en";
1600
+ es: "es";
1601
+ }>>;
1602
+ }, z.core.$strip>;
1603
+ export type PutPresentationRequest = z.infer<typeof PutPresentationRequestSchema>;
1604
+ /** The value a path addresses, or `undefined` when it does not resolve. */
1605
+ export declare function readAtPath(resume: ResumeObject, path: string): unknown;
1606
+ /**
1607
+ * The order a collection is actually drawn in, as slots.
1608
+ *
1609
+ * THE single definition of "which entries exist here, and in what order" —
1610
+ * `applyPresentation` builds the rendered array from it and the editor builds
1611
+ * its field paths from it, so the document and the paths into it can never
1612
+ * disagree. The same reasoning `appendedEntryRefs` records: a renderer that
1613
+ * recomputed this would be a second definition, free to drift.
1614
+ *
1615
+ * Total by construction. A slot that does not resolve is dropped, an entry no
1616
+ * slot names keeps its natural order after the ones that are named, and a
1617
+ * duplicated slot keeps its first occurrence — so an ordering written against a
1618
+ * résumé the writer has since replaced degrades to the writer's own order
1619
+ * rather than to a document that will not open.
1620
+ */
1621
+ export declare function collectionOrder(base: ResumeObject, edits: ResumeEdits, section: AppendableSection): Slot[];
1622
+ /**
1623
+ * Apply a presentation's edits to the writer's resume and validate the result.
1624
+ *
1625
+ * Pure: no I/O, no model call, and the input is never mutated — the run's
1626
+ * `result.resume_object` stays exactly what the model produced, so an edit is
1627
+ * reversible by dropping the overlay and the grounding record survives.
1628
+ *
1629
+ * A path that does not resolve is **skipped**, not thrown. A stored overlay is
1630
+ * data at rest that outlives the code that wrote it; a retired field must
1631
+ * degrade to a dropped edit, never to a resume that will not open.
1632
+ *
1633
+ * @throws if the edits would produce a resume the schema refuses.
1634
+ */
1635
+ export declare function applyPresentation(resume: ResumeObject, edits: ResumeEdits): PresentedResume;
1636
+ /**
1637
+ * Where each addition's fields are addressed, for the editor that draws them.
1638
+ *
1639
+ * Exported so the document emits the paths this module reads back, from this
1640
+ * module's own arithmetic. The two were computed separately and disagreed —
1641
+ * see `additionSlots` — which is the kind of bug that only shows up as text
1642
+ * appearing in the wrong job.
1643
+ */
1644
+ export declare function additionPaths(base: ResumeObject, edits: ResumeEdits): Map<string, string>;
1645
+ /**
1646
+ * What decides which FIELDS the document has, as opposed to what they say.
1647
+ *
1648
+ * The editor rebuilds its node tree when this changes, and must not when only
1649
+ * the text does. An addition's words live inside its own `append` edit — that
1650
+ * is what `foldAdditions` is for — so serializing the overlay whole made every
1651
+ * character typed into a newly added role look like a structural change: the
1652
+ * tree was rebuilt mid-word and the field the candidate was typing in was
1653
+ * unmounted from under them. What a `ref` SAYS is not part of the document's
1654
+ * shape; that it exists, and where it sits, is.
1655
+ *
1656
+ * A custom section's entry COUNT is shape — one more entry is one more set of
1657
+ * fields — while its heading and its entries' text are not.
1658
+ */
1659
+ export declare function documentShapeKey(edits: ResumeEdits): string;
1660
+ /**
1661
+ * The inverse projection: given the values a surface currently holds, keep only
1662
+ * those that differ from the writer's resume.
1663
+ *
1664
+ * This is what makes an untouched document store nothing, and what keeps the
1665
+ * overlay a record of the candidate's corrections rather than a second copy of
1666
+ * the whole resume.
1667
+ *
1668
+ * Sorted by path so that saving the same document twice produces the same
1669
+ * overlay — a diff of two saves should show what the candidate changed, not what
1670
+ * order a node tree happened to be walked in.
1671
+ */
1672
+ export declare function presentationEdits(base: ResumeObject, values: Record<string, EditValue>, structural?: ResumeEdits, defaults?: Readonly<Record<string, string>>): ResumeEdits;
1673
+ /**
1674
+ * A surface's new overlay, keeping the replacements it could not see.
1675
+ *
1676
+ * An editing surface reports its overlay from the fields it DRAWS. A template
1677
+ * that draws no location for a role therefore reported no replacement for one,
1678
+ * and a location the candidate typed under another template was deleted by
1679
+ * merely switching to this one and back. The résumé's data must not depend on
1680
+ * which template happens to be drawing it.
1681
+ *
1682
+ * So a replacement in `previous` survives when its field is not among `shown`
1683
+ * and `next` says nothing about it. A field that IS shown is reported by the
1684
+ * surface, so its absence from `next` is a real revert and is respected.
1685
+ *
1686
+ * Safe to carry because a replacement only ever addresses the writer's own
1687
+ * entries, and those are hidden rather than deleted. A hidden entry keeps its
1688
+ * corrections for when it is shown again. An addition's words live inside its
1689
+ * own `append` edit and never arrive here.
1690
+ */
1691
+ export declare function withUnshownReplacements(previous: ResumeEdits, next: ResumeEdits, shown: ReadonlySet<string>): ResumeEdits;
1692
+ /**
1693
+ * Which entries of a section the candidate added, by their index in the
1694
+ * PRESENTED résumé, paired with the `ref` that names them.
1695
+ *
1696
+ * Derived rather than stored in the document: appends land after the base
1697
+ * entries in overlay order, so the boundary is `base[section].length` and the
1698
+ * order is the overlay's. That is what lets `ResumeObject` stay exactly the
1699
+ * shape a template already renders, with no editor bookkeeping written into it.
1700
+ *
1701
+ * This is the one place the derivation lives — an editor that recomputed it
1702
+ * would be a second definition of "which of these did I add", free to disagree.
1703
+ */
1704
+ export declare function appendedEntryRefs(base: ResumeObject, edits: ResumeEdits, section: AppendableSection): Map<number, string>;
1705
+ //# sourceMappingURL=template.d.ts.map