@resumekit/react 0.1.0 → 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.
Files changed (99) hide show
  1. package/dist/document.css +1 -0
  2. package/dist/export-bundle/bundle.css +1 -1
  3. package/dist/export-bundle/bundle.js +10 -10
  4. package/dist/kit/documentStyle.d.ts +8 -0
  5. package/dist/kit/documentStyle.d.ts.map +1 -1
  6. package/dist/kit/documentStyle.js +41 -1
  7. package/dist/kit/typography.css +86 -0
  8. package/dist/nodes/formatting.d.ts +5 -1
  9. package/dist/nodes/formatting.d.ts.map +1 -1
  10. package/dist/nodes/formatting.js +4 -1
  11. package/dist/nodes/locked.d.ts.map +1 -1
  12. package/dist/nodes/locked.js +3 -0
  13. package/dist/static/static.mjs +155 -4
  14. package/dist/templates/academic/AcademicDocument.d.ts.map +1 -1
  15. package/dist/templates/academic/AcademicDocument.js +2 -2
  16. package/dist/templates/alta/AltaDocument.d.ts.map +1 -1
  17. package/dist/templates/alta/AltaDocument.js +2 -2
  18. package/dist/templates/classic/ClassicDocument.d.ts.map +1 -1
  19. package/dist/templates/classic/ClassicDocument.js +2 -2
  20. package/dist/templates/cobalt/CobaltDocument.d.ts.map +1 -1
  21. package/dist/templates/cobalt/CobaltDocument.js +2 -2
  22. package/dist/templates/compact/CompactDocument.d.ts.map +1 -1
  23. package/dist/templates/compact/CompactDocument.js +2 -2
  24. package/dist/templates/contemporary/ContemporaryDocument.d.ts.map +1 -1
  25. package/dist/templates/contemporary/ContemporaryDocument.js +2 -2
  26. package/dist/templates/creative/CreativeDocument.d.ts.map +1 -1
  27. package/dist/templates/creative/CreativeDocument.js +2 -2
  28. package/dist/templates/crimson/CrimsonDocument.d.ts.map +1 -1
  29. package/dist/templates/crimson/CrimsonDocument.js +2 -2
  30. package/dist/templates/curve/CurveDocument.d.ts.map +1 -1
  31. package/dist/templates/curve/CurveDocument.js +2 -2
  32. package/dist/templates/double-column/DoubleColumnDocument.d.ts.map +1 -1
  33. package/dist/templates/double-column/DoubleColumnDocument.js +2 -2
  34. package/dist/templates/double-column-logos/DoubleColumnLogosDocument.d.ts.map +1 -1
  35. package/dist/templates/double-column-logos/DoubleColumnLogosDocument.js +2 -2
  36. package/dist/templates/elegant/ElegantDocument.d.ts.map +1 -1
  37. package/dist/templates/elegant/ElegantDocument.js +2 -2
  38. package/dist/templates/elegant-logos/ElegantLogosDocument.d.ts.map +1 -1
  39. package/dist/templates/elegant-logos/ElegantLogosDocument.js +2 -2
  40. package/dist/templates/engineer/EngineerDocument.d.ts.map +1 -1
  41. package/dist/templates/engineer/EngineerDocument.js +2 -2
  42. package/dist/templates/executive/ExecutiveDocument.d.ts.map +1 -1
  43. package/dist/templates/executive/ExecutiveDocument.js +2 -2
  44. package/dist/templates/harvard/HarvardDocument.d.ts.map +1 -1
  45. package/dist/templates/harvard/HarvardDocument.js +2 -2
  46. package/dist/templates/hipster/HipsterDocument.d.ts.map +1 -1
  47. package/dist/templates/hipster/HipsterDocument.js +2 -2
  48. package/dist/templates/ivy/IvyDocument.d.ts.map +1 -1
  49. package/dist/templates/ivy/IvyDocument.js +2 -2
  50. package/dist/templates/meridian/MeridianDocument.d.ts.map +1 -1
  51. package/dist/templates/meridian/MeridianDocument.js +2 -2
  52. package/dist/templates/modern/ModernDocument.d.ts.map +1 -1
  53. package/dist/templates/modern/ModernDocument.js +2 -2
  54. package/dist/templates/polished/PolishedDocument.d.ts.map +1 -1
  55. package/dist/templates/polished/PolishedDocument.js +2 -2
  56. package/dist/templates/portrait/PortraitDocument.d.ts.map +1 -1
  57. package/dist/templates/portrait/PortraitDocument.js +2 -2
  58. package/dist/templates/prism/PrismDocument.d.ts.map +1 -1
  59. package/dist/templates/prism/PrismDocument.js +2 -2
  60. package/dist/templates/scholar/ScholarDocument.d.ts.map +1 -1
  61. package/dist/templates/scholar/ScholarDocument.js +2 -2
  62. package/dist/templates/split/SplitDocument.d.ts.map +1 -1
  63. package/dist/templates/split/SplitDocument.js +2 -2
  64. package/dist/templates/stylish/StylishDocument.d.ts.map +1 -1
  65. package/dist/templates/stylish/StylishDocument.js +2 -2
  66. package/dist/templates/timeline/TimelineDocument.d.ts.map +1 -1
  67. package/dist/templates/timeline/TimelineDocument.js +2 -2
  68. package/package.json +2 -2
  69. package/src/compiler/emit.ts +2 -2
  70. package/src/kit/documentStyle.ts +47 -0
  71. package/src/nodes/formatting.ts +13 -1
  72. package/src/nodes/locked.ts +3 -0
  73. package/src/templates/academic/AcademicDocument.tsx +5 -1
  74. package/src/templates/alta/AltaDocument.tsx +5 -1
  75. package/src/templates/classic/ClassicDocument.tsx +5 -1
  76. package/src/templates/cobalt/CobaltDocument.tsx +5 -1
  77. package/src/templates/compact/CompactDocument.tsx +5 -1
  78. package/src/templates/contemporary/ContemporaryDocument.tsx +5 -1
  79. package/src/templates/creative/CreativeDocument.tsx +5 -1
  80. package/src/templates/crimson/CrimsonDocument.tsx +5 -1
  81. package/src/templates/curve/CurveDocument.tsx +5 -1
  82. package/src/templates/double-column/DoubleColumnDocument.tsx +5 -1
  83. package/src/templates/double-column-logos/DoubleColumnLogosDocument.tsx +5 -1
  84. package/src/templates/elegant/ElegantDocument.tsx +5 -1
  85. package/src/templates/elegant-logos/ElegantLogosDocument.tsx +5 -1
  86. package/src/templates/engineer/EngineerDocument.tsx +5 -1
  87. package/src/templates/executive/ExecutiveDocument.tsx +5 -1
  88. package/src/templates/harvard/HarvardDocument.tsx +5 -1
  89. package/src/templates/hipster/HipsterDocument.tsx +5 -1
  90. package/src/templates/ivy/IvyDocument.tsx +5 -1
  91. package/src/templates/meridian/MeridianDocument.tsx +5 -1
  92. package/src/templates/modern/ModernDocument.tsx +5 -1
  93. package/src/templates/polished/PolishedDocument.tsx +5 -1
  94. package/src/templates/portrait/PortraitDocument.tsx +5 -1
  95. package/src/templates/prism/PrismDocument.tsx +5 -1
  96. package/src/templates/scholar/ScholarDocument.tsx +5 -1
  97. package/src/templates/split/SplitDocument.tsx +5 -1
  98. package/src/templates/stylish/StylishDocument.tsx +5 -1
  99. package/src/templates/timeline/TimelineDocument.tsx +5 -1
@@ -9,4 +9,12 @@ import { type DocumentStyle } from '@resumekit/schema';
9
9
  * requires a document that sets neither to render as the template defines it.
10
10
  */
11
11
  export declare function documentStyle(prefix: string, style: DocumentStyle | undefined): CSSProperties;
12
+ /**
13
+ * Which typographic presets the document chose, as attributes on the template's
14
+ * root. Only a chosen preset is written: `typography.css` keys every rule on
15
+ * the attribute's presence, so a document that chose none is drawn by the
16
+ * template's stylesheet alone — the same guarantee `documentStyle` keeps for
17
+ * accent and density.
18
+ */
19
+ export declare function documentStyleAttributes(style: DocumentStyle | undefined): Record<`data-rk-${string}`, string>;
12
20
  //# sourceMappingURL=documentStyle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"documentStyle.d.ts","sourceRoot":"","sources":["../../src/kit/documentStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,aAAa,GAAG,SAAS,GAC/B,aAAa,CAaf"}
1
+ {"version":3,"file":"documentStyle.d.ts","sourceRoot":"","sources":["../../src/kit/documentStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAOL,KAAK,aAAa,EACnB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,aAAa,GAAG,SAAS,GAC/B,aAAa,CAmCf;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,aAAa,GAAG,SAAS,GAC/B,MAAM,CAAC,WAAW,MAAM,EAAE,EAAE,MAAM,CAAC,CAWrC"}
@@ -1,4 +1,4 @@
1
- import { DENSITIES, DOCUMENT_FONTS, INK_COLORS, } from '@resumekit/schema';
1
+ import { DENSITIES, DOCUMENT_FONTS, HEADING_WEIGHTS, INK_COLORS, LETTER_SPACINGS, LINE_HEIGHTS, } from '@resumekit/schema';
2
2
  /**
3
3
  * The candidate's document style as custom properties on a template's root,
4
4
  * named with the template's own prefix (`--h-font`, `--c-ink`, …) so its
@@ -20,5 +20,45 @@ export function documentStyle(prefix, style) {
20
20
  ...(style.density
21
21
  ? { [`--${prefix}-density`]: String(DENSITIES[style.density].factor) }
22
22
  : {}),
23
+ /*
24
+ * The typographic presets, under one shared prefix rather than the
25
+ * template's: `typography.css` applies them the same way in every
26
+ * template, keyed on the `data-rk-*` attributes below, so a template's
27
+ * stylesheet never has to know they exist.
28
+ */
29
+ ...(style.tracking
30
+ ? { '--rk-tracking': `${LETTER_SPACINGS[style.tracking].em}em` }
31
+ : {}),
32
+ ...(style.leading
33
+ ? { '--rk-leading': String(LINE_HEIGHTS[style.leading].value) }
34
+ : {}),
35
+ ...(style.headingFont
36
+ ? { '--rk-heading-font': DOCUMENT_FONTS[style.headingFont].stack }
37
+ : {}),
38
+ ...(style.headingWeight
39
+ ? {
40
+ '--rk-heading-weight': String(HEADING_WEIGHTS[style.headingWeight].weight),
41
+ }
42
+ : {}),
43
+ };
44
+ }
45
+ /**
46
+ * Which typographic presets the document chose, as attributes on the template's
47
+ * root. Only a chosen preset is written: `typography.css` keys every rule on
48
+ * the attribute's presence, so a document that chose none is drawn by the
49
+ * template's stylesheet alone — the same guarantee `documentStyle` keeps for
50
+ * accent and density.
51
+ */
52
+ export function documentStyleAttributes(style) {
53
+ if (!style)
54
+ return {};
55
+ return {
56
+ ...(style.tracking && { 'data-rk-tracking': style.tracking }),
57
+ ...(style.leading && { 'data-rk-leading': style.leading }),
58
+ ...(style.headingFont && { 'data-rk-heading-font': style.headingFont }),
59
+ ...(style.headingCase && { 'data-rk-heading-case': style.headingCase }),
60
+ ...(style.headingWeight && {
61
+ 'data-rk-heading-weight': style.headingWeight,
62
+ }),
23
63
  };
24
64
  }
@@ -0,0 +1,86 @@
1
+ /*
2
+ * The document's typographic presets (`DocumentStyle.tracking`, `leading`,
3
+ * `headingFont`, `headingCase`, `headingWeight`) and the per-line formats
4
+ * (`italic`, `underline`, `step`), applied the same way in every template.
5
+ *
6
+ * Every document-level rule is keyed on a `data-rk-*` attribute that
7
+ * `documentStyleAttributes` writes on the template's root ONLY when the
8
+ * candidate chose that preset, so a document that chose none is drawn by its
9
+ * template's stylesheet alone. The attribute is doubled in each selector to
10
+ * outrank a template's own two-class rules: when the candidate has chosen,
11
+ * their choice is what the page shows.
12
+ *
13
+ * Headings are `h1`–`h2` in the editor and `[data-h]` in a picture (static and
14
+ * PDF), so both are named. The name is level 1; section headings are level 2.
15
+ */
16
+
17
+ /* ── Letter spacing: the text, not the headings ───────────────────────────── */
18
+
19
+ [data-rk-tracking][data-rk-tracking] .tpl-text {
20
+ letter-spacing: var(--rk-tracking);
21
+ }
22
+ [data-rk-tracking][data-rk-tracking] :is(h1, h2, [data-h]) .tpl-text {
23
+ letter-spacing: inherit;
24
+ }
25
+
26
+ /* ── Line height: every block that holds text, and the text in it ─────────── */
27
+
28
+ [data-rk-leading][data-rk-leading]
29
+ :where(:has(> .tpl-text)):not(h1, h2, [data-h]),
30
+ [data-rk-leading][data-rk-leading] .tpl-text {
31
+ line-height: var(--rk-leading);
32
+ }
33
+ [data-rk-leading][data-rk-leading] :is(h1, h2, [data-h]) .tpl-text {
34
+ line-height: inherit;
35
+ }
36
+
37
+ /* ── Headings: typeface for the name and sections; case and weight for sections */
38
+
39
+ [data-rk-heading-font][data-rk-heading-font]
40
+ :is(h1, h2, [data-h='1'], [data-h='2']) {
41
+ font-family: var(--rk-heading-font);
42
+ }
43
+
44
+ [data-rk-heading-weight][data-rk-heading-weight] :is(h2, [data-h='2']) {
45
+ font-weight: var(--rk-heading-weight);
46
+ }
47
+
48
+ [data-rk-heading-case='normal'][data-rk-heading-case] :is(h2, [data-h='2']) {
49
+ text-transform: none;
50
+ font-variant-caps: normal;
51
+ letter-spacing: normal;
52
+ }
53
+ [data-rk-heading-case='upper'][data-rk-heading-case] :is(h2, [data-h='2']) {
54
+ text-transform: uppercase;
55
+ font-variant-caps: normal;
56
+ letter-spacing: 0.06em;
57
+ }
58
+ [data-rk-heading-case='smallcaps'][data-rk-heading-case] :is(h2, [data-h='2']) {
59
+ text-transform: none;
60
+ font-variant-caps: all-small-caps;
61
+ letter-spacing: 0.04em;
62
+ }
63
+
64
+ /* ── One line: emphasis and a size step ─────────────────────────────────────── */
65
+
66
+ /*
67
+ * Bold at zero specificity: most templates draw `.is-bold` themselves, and
68
+ * theirs wins. This is the floor for the ones that never did, where pressing
69
+ * Bold used to do nothing.
70
+ */
71
+ :where(.tpl-text.is-bold) {
72
+ font-weight: bold;
73
+ }
74
+ .tpl-text.is-italic {
75
+ font-style: italic;
76
+ }
77
+ .tpl-text.is-underline {
78
+ text-decoration: underline;
79
+ text-underline-offset: 0.15em;
80
+ }
81
+ .tpl-text.is-step-smaller {
82
+ font-size: 0.9em;
83
+ }
84
+ .tpl-text.is-step-larger {
85
+ font-size: 1.12em;
86
+ }
@@ -1,5 +1,5 @@
1
1
  import type { CSSProperties } from 'react';
2
- import { type FieldAlign, type InkId } from '@resumekit/schema';
2
+ import { type FieldAlign, type FieldStepId, type InkId } from '@resumekit/schema';
3
3
  /**
4
4
  * The formatting a node may carry.
5
5
  *
@@ -10,6 +10,10 @@ import { type FieldAlign, type InkId } from '@resumekit/schema';
10
10
  */
11
11
  export interface FieldFormatting {
12
12
  bold?: boolean;
13
+ italic?: boolean;
14
+ underline?: boolean;
15
+ /** One step smaller or larger than the template sets the line. */
16
+ step?: FieldStepId;
13
17
  align?: FieldAlign;
14
18
  ink?: InkId;
15
19
  href?: LinkTarget;
@@ -1 +1 @@
1
- {"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../src/nodes/formatting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAc,KAAK,UAAU,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE5E;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,GAAG,CAAC,EAAE,KAAK,CAAC;IAQZ,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,4DAA4D;AAC5D,wBAAgB,WAAW,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAQzE;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,aAAa,GAAG,SAAS,CAG5E;AAED,gFAAgF;AAChF,wBAAgB,OAAO,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,GAAG,SAAS,CAEnE"}
1
+ {"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../src/nodes/formatting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,KAAK,EACX,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kEAAkE;IAClE,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,GAAG,CAAC,EAAE,KAAK,CAAC;IAQZ,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,4DAA4D;AAC5D,wBAAgB,WAAW,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAWzE;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,aAAa,GAAG,SAAS,CAG5E;AAED,gFAAgF;AAChF,wBAAgB,OAAO,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,GAAG,SAAS,CAEnE"}
@@ -1,9 +1,12 @@
1
- import { INK_COLORS } from '@resumekit/schema';
1
+ import { INK_COLORS, } from '@resumekit/schema';
2
2
  /** Class names the template stylesheet gives meaning to. */
3
3
  export function formatClass(format, base) {
4
4
  return [
5
5
  base,
6
6
  format.bold ? 'is-bold' : '',
7
+ format.italic ? 'is-italic' : '',
8
+ format.underline ? 'is-underline' : '',
9
+ format.step ? `is-step-${format.step}` : '',
7
10
  format.align ? `is-${format.align}` : '',
8
11
  ]
9
12
  .filter(Boolean)
@@ -1 +1 @@
1
- {"version":3,"file":"locked.d.ts","sourceRoot":"","sources":["../../src/nodes/locked.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAejD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAa/D,CAAC"}
1
+ {"version":3,"file":"locked.d.ts","sourceRoot":"","sources":["../../src/nodes/locked.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAejD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgB/D,CAAC"}
@@ -51,6 +51,9 @@ export const FORBIDDEN_NODE_PROPS = [
51
51
  */
52
52
  export const BOUNDED_NODE_PROPS = {
53
53
  bold: 'boolean',
54
+ italic: 'boolean',
55
+ underline: 'boolean',
56
+ step: 'FieldStepId',
54
57
  align: 'FieldAlign',
55
58
  ink: 'InkId',
56
59
  /*
@@ -15429,7 +15429,7 @@ function spaceAtStep(steps) {
15429
15429
  }
15430
15430
  /** A format carrying no flags says nothing; it is dropped rather than stored. */
15431
15431
  function formatIsEmpty(format) {
15432
- return format.bold === void 0 && format.align === void 0 && format.ink === void 0 && format.href === void 0 && (format.space === void 0 || format.space === "none");
15432
+ return format.bold === void 0 && format.italic === void 0 && format.underline === void 0 && format.step === void 0 && format.align === void 0 && format.ink === void 0 && format.href === void 0 && (format.space === void 0 || format.space === "none");
15433
15433
  }
15434
15434
  /** The format for one path, or undefined when the field carries none. */
15435
15435
  function formatFor(formats, path) {
@@ -15533,7 +15533,7 @@ function additionSlots(base, structural) {
15533
15533
  function additionPaths(base, edits) {
15534
15534
  return additionSlots(base, edits.filter((edit) => !isSetEdit(edit)));
15535
15535
  }
15536
- var TEMPLATES, TemplateIdSchema, FORBIDDEN_SEGMENTS, SEGMENT, ResumeFieldPathSchema, EditValueSchema, SetEditSchema, APPENDABLE_SECTIONS, AppendableSectionSchema, AppendEditSchema, DropEditSchema, SectionEditSchema, APPEND_SCHEMAS, SlotSchema, slotKey, ReorderEditSchema, HideEditSchema, ResumeEditSchema, isSetEdit, isAppendEdit, isDropEdit, isSectionEdit, isReorderEdit, isHideEdit, ResumeEditsSchema, DOCUMENT_FONTS, DocumentFontIdSchema, INK_COLORS, InkIdSchema, DENSITIES, DensityIdSchema, SPACE_QUANTUM, SECTION_SPACES, SectionSpaceIdSchema, SPACE_SCALE, RESUME_SECTIONS, ResumeSectionIdSchema, SCALE_MIN, SCALE_MAX, DocumentStyleSchema, FieldAlignSchema, FieldFormatSchema, ResumeFormatsSchema, SectionSpacingSchema, ResumeSectionSpacingSchema;
15536
+ var TEMPLATES, TemplateIdSchema, FORBIDDEN_SEGMENTS, SEGMENT, ResumeFieldPathSchema, EditValueSchema, SetEditSchema, APPENDABLE_SECTIONS, AppendableSectionSchema, AppendEditSchema, DropEditSchema, SectionEditSchema, APPEND_SCHEMAS, SlotSchema, slotKey, ReorderEditSchema, HideEditSchema, ResumeEditSchema, isSetEdit, isAppendEdit, isDropEdit, isSectionEdit, isReorderEdit, isHideEdit, ResumeEditsSchema, DOCUMENT_FONTS, DocumentFontIdSchema, INK_COLORS, InkIdSchema, DENSITIES, DensityIdSchema, SPACE_QUANTUM, SECTION_SPACES, SectionSpaceIdSchema, SPACE_SCALE, RESUME_SECTIONS, ResumeSectionIdSchema, SCALE_MIN, SCALE_MAX, LETTER_SPACINGS, LetterSpacingIdSchema, LINE_HEIGHTS, LineHeightIdSchema, HEADING_CASES, HeadingCaseIdSchema, HEADING_WEIGHTS, HeadingWeightIdSchema, DocumentStyleSchema, FieldAlignSchema, FIELD_STEPS, FieldStepSchema, FieldFormatSchema, ResumeFormatsSchema, SectionSpacingSchema, ResumeSectionSpacingSchema;
15537
15537
  var init_template = __esmMin((() => {
15538
15538
  init_zod();
15539
15539
  init_collections();
@@ -16079,6 +16079,38 @@ var init_template = __esmMin((() => {
16079
16079
  grey: {
16080
16080
  name: "Grey",
16081
16081
  hex: "#5a5a5a"
16082
+ },
16083
+ charcoal: {
16084
+ name: "Charcoal",
16085
+ hex: "#2e3236"
16086
+ },
16087
+ cobalt: {
16088
+ name: "Cobalt",
16089
+ hex: "#1d4a91"
16090
+ },
16091
+ indigo: {
16092
+ name: "Indigo",
16093
+ hex: "#2f3878"
16094
+ },
16095
+ teal: {
16096
+ name: "Teal",
16097
+ hex: "#0f5257"
16098
+ },
16099
+ olive: {
16100
+ name: "Olive",
16101
+ hex: "#404a1c"
16102
+ },
16103
+ plum: {
16104
+ name: "Plum",
16105
+ hex: "#4e2a5a"
16106
+ },
16107
+ rust: {
16108
+ name: "Rust",
16109
+ hex: "#7c3416"
16110
+ },
16111
+ brown: {
16112
+ name: "Brown",
16113
+ hex: "#57382a"
16082
16114
  }
16083
16115
  };
16084
16116
  InkIdSchema = _enum(Object.keys(INK_COLORS));
@@ -16124,22 +16156,90 @@ var init_template = __esmMin((() => {
16124
16156
  ResumeSectionIdSchema = _enum(RESUME_SECTIONS);
16125
16157
  SCALE_MIN = .85;
16126
16158
  SCALE_MAX = 1.2;
16159
+ LETTER_SPACINGS = {
16160
+ tight: {
16161
+ name: "Tight",
16162
+ em: -.01
16163
+ },
16164
+ wide: {
16165
+ name: "Wide",
16166
+ em: .02
16167
+ }
16168
+ };
16169
+ LetterSpacingIdSchema = _enum(Object.keys(LETTER_SPACINGS));
16170
+ LINE_HEIGHTS = {
16171
+ compact: {
16172
+ name: "Compact",
16173
+ value: 1.15
16174
+ },
16175
+ relaxed: {
16176
+ name: "Relaxed",
16177
+ value: 1.4
16178
+ },
16179
+ airy: {
16180
+ name: "Airy",
16181
+ value: 1.55
16182
+ }
16183
+ };
16184
+ LineHeightIdSchema = _enum(Object.keys(LINE_HEIGHTS));
16185
+ HEADING_CASES = {
16186
+ normal: { name: "As written" },
16187
+ upper: { name: "Uppercase" },
16188
+ smallcaps: { name: "Small caps" }
16189
+ };
16190
+ HeadingCaseIdSchema = _enum(Object.keys(HEADING_CASES));
16191
+ HEADING_WEIGHTS = {
16192
+ regular: {
16193
+ name: "Regular",
16194
+ weight: 400
16195
+ },
16196
+ bold: {
16197
+ name: "Bold",
16198
+ weight: 700
16199
+ }
16200
+ };
16201
+ HeadingWeightIdSchema = _enum(Object.keys(HEADING_WEIGHTS));
16127
16202
  DocumentStyleSchema = object({
16128
16203
  font: DocumentFontIdSchema,
16129
16204
  ink: InkIdSchema,
16130
16205
  scale: number().min(SCALE_MIN).max(SCALE_MAX).describe("Multiplier on the template type scale."),
16131
16206
  accent: InkIdSchema.optional(),
16132
16207
  /** Absent means the template's own rhythm — see {@link DENSITIES}. */
16133
- density: DensityIdSchema.optional()
16208
+ density: DensityIdSchema.optional(),
16209
+ /** Letter spacing of the text — see {@link LETTER_SPACINGS}. */
16210
+ tracking: LetterSpacingIdSchema.optional(),
16211
+ /** Line height of the text — see {@link LINE_HEIGHTS}. */
16212
+ leading: LineHeightIdSchema.optional(),
16213
+ /** The typeface of the name and section headings, from the same vetted set. */
16214
+ headingFont: DocumentFontIdSchema.optional(),
16215
+ /** How section headings are cased — see {@link HEADING_CASES}. */
16216
+ headingCase: HeadingCaseIdSchema.optional(),
16217
+ /** How heavy section headings are — see {@link HEADING_WEIGHTS}. */
16218
+ headingWeight: HeadingWeightIdSchema.optional()
16134
16219
  });
16135
16220
  FieldAlignSchema = _enum([
16136
16221
  "left",
16137
16222
  "center",
16138
16223
  "right"
16139
16224
  ]);
16225
+ FIELD_STEPS = {
16226
+ smaller: {
16227
+ name: "Smaller",
16228
+ factor: .9
16229
+ },
16230
+ larger: {
16231
+ name: "Larger",
16232
+ factor: 1.12
16233
+ }
16234
+ };
16235
+ FieldStepSchema = _enum(Object.keys(FIELD_STEPS));
16140
16236
  FieldFormatSchema = object({
16141
16237
  path: ResumeFieldPathSchema,
16142
16238
  bold: boolean().optional(),
16239
+ italic: boolean().optional(),
16240
+ underline: boolean().optional(),
16241
+ /** One step smaller or larger — see {@link FIELD_STEPS}. */
16242
+ step: FieldStepSchema.optional(),
16143
16243
  align: FieldAlignSchema.optional(),
16144
16244
  ink: InkIdSchema.optional(),
16145
16245
  /** Extra space above this field — the one place a section rule cannot reach. */
@@ -16452,6 +16552,9 @@ function formatClass(format, base) {
16452
16552
  return [
16453
16553
  base,
16454
16554
  format.bold ? "is-bold" : "",
16555
+ format.italic ? "is-italic" : "",
16556
+ format.underline ? "is-underline" : "",
16557
+ format.step ? `is-step-${format.step}` : "",
16455
16558
  format.align ? `is-${format.align}` : ""
16456
16559
  ].filter(Boolean).join(" ");
16457
16560
  }
@@ -22811,7 +22914,28 @@ function documentStyle(prefix, style) {
22811
22914
  [`--${prefix}-ink`]: INK_COLORS[style.ink].hex,
22812
22915
  [`--${prefix}-scale`]: String(style.scale),
22813
22916
  ...style.accent ? { [`--${prefix}-accent`]: INK_COLORS[style.accent].hex } : {},
22814
- ...style.density ? { [`--${prefix}-density`]: String(DENSITIES[style.density].factor) } : {}
22917
+ ...style.density ? { [`--${prefix}-density`]: String(DENSITIES[style.density].factor) } : {},
22918
+ ...style.tracking ? { "--rk-tracking": `${LETTER_SPACINGS[style.tracking].em}em` } : {},
22919
+ ...style.leading ? { "--rk-leading": String(LINE_HEIGHTS[style.leading].value) } : {},
22920
+ ...style.headingFont ? { "--rk-heading-font": DOCUMENT_FONTS[style.headingFont].stack } : {},
22921
+ ...style.headingWeight ? { "--rk-heading-weight": String(HEADING_WEIGHTS[style.headingWeight].weight) } : {}
22922
+ };
22923
+ }
22924
+ /**
22925
+ * Which typographic presets the document chose, as attributes on the template's
22926
+ * root. Only a chosen preset is written: `typography.css` keys every rule on
22927
+ * the attribute's presence, so a document that chose none is drawn by the
22928
+ * template's stylesheet alone — the same guarantee `documentStyle` keeps for
22929
+ * accent and density.
22930
+ */
22931
+ function documentStyleAttributes(style) {
22932
+ if (!style) return {};
22933
+ return {
22934
+ ...style.tracking && { "data-rk-tracking": style.tracking },
22935
+ ...style.leading && { "data-rk-leading": style.leading },
22936
+ ...style.headingFont && { "data-rk-heading-font": style.headingFont },
22937
+ ...style.headingCase && { "data-rk-heading-case": style.headingCase },
22938
+ ...style.headingWeight && { "data-rk-heading-weight": style.headingWeight }
22815
22939
  };
22816
22940
  }
22817
22941
  //#endregion
@@ -23296,6 +23420,7 @@ function HarvardDocument({ resume }) {
23296
23420
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
23297
23421
  className: "tpl-harvard",
23298
23422
  style: documentStyle("h", style),
23423
+ ...documentStyleAttributes(style),
23299
23424
  "aria-label": doc.t.resume,
23300
23425
  lang: doc.locale,
23301
23426
  children: [
@@ -23718,6 +23843,7 @@ function IvyDocument({ resume }) {
23718
23843
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
23719
23844
  className: "tpl-ivy",
23720
23845
  style: documentStyle("i", style),
23846
+ ...documentStyleAttributes(style),
23721
23847
  "aria-label": doc.t.resume,
23722
23848
  lang: doc.locale,
23723
23849
  children: [
@@ -24075,6 +24201,7 @@ function ClassicDocument({ resume }) {
24075
24201
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
24076
24202
  className: "tpl-classic",
24077
24203
  style: documentStyle("cl", style),
24204
+ ...documentStyleAttributes(style),
24078
24205
  "aria-label": doc.t.resume,
24079
24206
  lang: doc.locale,
24080
24207
  children: [
@@ -24461,6 +24588,7 @@ function CompactDocument({ resume }) {
24461
24588
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
24462
24589
  className: "tpl-compact",
24463
24590
  style: documentStyle("cp", style),
24591
+ ...documentStyleAttributes(style),
24464
24592
  "aria-label": doc.t.resume,
24465
24593
  lang: doc.locale,
24466
24594
  children: [/* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("header", {
@@ -24848,6 +24976,7 @@ function TimelineDocument({ resume }) {
24848
24976
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
24849
24977
  className: "tpl-timeline",
24850
24978
  style: documentStyle("tl", style),
24979
+ ...documentStyleAttributes(style),
24851
24980
  "aria-label": doc.t.resume,
24852
24981
  lang: doc.locale,
24853
24982
  children: [
@@ -25246,6 +25375,7 @@ function ModernDocument({ resume }) {
25246
25375
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
25247
25376
  className: "tpl-modern",
25248
25377
  style: documentStyle("md", style),
25378
+ ...documentStyleAttributes(style),
25249
25379
  "aria-label": doc.t.resume,
25250
25380
  lang: doc.locale,
25251
25381
  children: [/* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("header", {
@@ -25645,6 +25775,7 @@ function StylishDocument({ resume }) {
25645
25775
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
25646
25776
  className: "tpl-stylish",
25647
25777
  style: documentStyle("st", style),
25778
+ ...documentStyleAttributes(style),
25648
25779
  "aria-label": doc.t.resume,
25649
25780
  lang: doc.locale,
25650
25781
  children: [/* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("header", {
@@ -26022,6 +26153,7 @@ function CreativeDocument({ resume }) {
26022
26153
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
26023
26154
  className: "tpl-creative",
26024
26155
  style: documentStyle("cr", style),
26156
+ ...documentStyleAttributes(style),
26025
26157
  "aria-label": doc.t.resume,
26026
26158
  lang: doc.locale,
26027
26159
  children: [/* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("header", {
@@ -26404,6 +26536,7 @@ function ContemporaryDocument({ resume }) {
26404
26536
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
26405
26537
  className: "tpl-contemporary",
26406
26538
  style: documentStyle("cn", style),
26539
+ ...documentStyleAttributes(style),
26407
26540
  "aria-label": doc.t.resume,
26408
26541
  lang: doc.locale,
26409
26542
  children: [/* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("header", {
@@ -26802,6 +26935,7 @@ function DoubleColumnDocument({ resume }) {
26802
26935
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
26803
26936
  className: "tpl-dc",
26804
26937
  style: documentStyle("dc", style),
26938
+ ...documentStyleAttributes(style),
26805
26939
  "aria-label": doc.t.resume,
26806
26940
  lang: doc.locale,
26807
26941
  children: [/* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("header", {
@@ -27223,6 +27357,7 @@ function DoubleColumnLogosDocument({ resume }) {
27223
27357
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
27224
27358
  className: "tpl-dcl",
27225
27359
  style: documentStyle("dcl", style),
27360
+ ...documentStyleAttributes(style),
27226
27361
  "aria-label": doc.t.resume,
27227
27362
  lang: doc.locale,
27228
27363
  children: [/* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("header", {
@@ -27596,6 +27731,7 @@ function ElegantDocument({ resume }) {
27596
27731
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsx)("article", {
27597
27732
  className: "tpl-elegant",
27598
27733
  style: documentStyle("el", style),
27734
+ ...documentStyleAttributes(style),
27599
27735
  "aria-label": doc.t.resume,
27600
27736
  lang: doc.locale,
27601
27737
  children: /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("div", {
@@ -28010,6 +28146,7 @@ function ElegantLogosDocument({ resume }) {
28010
28146
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsx)("article", {
28011
28147
  className: "tpl-ell",
28012
28148
  style: documentStyle("ell", style),
28149
+ ...documentStyleAttributes(style),
28013
28150
  "aria-label": doc.t.resume,
28014
28151
  lang: doc.locale,
28015
28152
  children: /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("div", {
@@ -28411,6 +28548,7 @@ function PolishedDocument({ resume }) {
28411
28548
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsx)("article", {
28412
28549
  className: "tpl-polished",
28413
28550
  style: documentStyle("po", style),
28551
+ ...documentStyleAttributes(style),
28414
28552
  "aria-label": doc.t.resume,
28415
28553
  lang: doc.locale,
28416
28554
  children: /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("div", {
@@ -28765,6 +28903,7 @@ function ExecutiveDocument({ resume }) {
28765
28903
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
28766
28904
  className: "tpl-exec",
28767
28905
  style: documentStyle("e", style),
28906
+ ...documentStyleAttributes(style),
28768
28907
  "aria-label": doc.t.resume,
28769
28908
  lang: doc.locale,
28770
28909
  children: [/* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("header", {
@@ -29161,6 +29300,7 @@ function MeridianDocument({ resume }) {
29161
29300
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
29162
29301
  className: "tpl-mer",
29163
29302
  style: documentStyle("m", style),
29303
+ ...documentStyleAttributes(style),
29164
29304
  "aria-label": doc.t.resume,
29165
29305
  lang: doc.locale,
29166
29306
  children: [
@@ -29579,6 +29719,7 @@ function CobaltDocument({ resume }) {
29579
29719
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
29580
29720
  className: "tpl-cob",
29581
29721
  style: documentStyle("c", style),
29722
+ ...documentStyleAttributes(style),
29582
29723
  "aria-label": doc.t.resume,
29583
29724
  lang: doc.locale,
29584
29725
  children: [/* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("header", {
@@ -29993,6 +30134,7 @@ function CrimsonDocument({ resume }) {
29993
30134
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
29994
30135
  className: "tpl-crimson",
29995
30136
  style: documentStyle("crm", style),
30137
+ ...documentStyleAttributes(style),
29996
30138
  "aria-label": doc.t.resume,
29997
30139
  lang: doc.locale,
29998
30140
  children: [
@@ -30382,6 +30524,7 @@ function EngineerDocument({ resume }) {
30382
30524
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
30383
30525
  className: "tpl-engineer",
30384
30526
  style: documentStyle("eng", style),
30527
+ ...documentStyleAttributes(style),
30385
30528
  "aria-label": doc.t.resume,
30386
30529
  lang: doc.locale,
30387
30530
  children: [
@@ -30743,6 +30886,7 @@ function SplitDocument({ resume }) {
30743
30886
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
30744
30887
  className: "tpl-split",
30745
30888
  style: documentStyle("sp", style),
30889
+ ...documentStyleAttributes(style),
30746
30890
  "aria-label": doc.t.resume,
30747
30891
  lang: doc.locale,
30748
30892
  children: [/* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("header", {
@@ -31169,6 +31313,7 @@ function AcademicDocument({ resume }) {
31169
31313
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
31170
31314
  className: "tpl-academic",
31171
31315
  style: documentStyle("ac", style),
31316
+ ...documentStyleAttributes(style),
31172
31317
  "aria-label": doc.t.resume,
31173
31318
  lang: doc.locale,
31174
31319
  children: [
@@ -31535,6 +31680,7 @@ function AltaDocument({ resume }) {
31535
31680
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
31536
31681
  className: "tpl-alta",
31537
31682
  style: documentStyle("al", style),
31683
+ ...documentStyleAttributes(style),
31538
31684
  "aria-label": doc.t.resume,
31539
31685
  lang: doc.locale,
31540
31686
  children: [/* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("header", {
@@ -31931,6 +32077,7 @@ function PrismDocument({ resume }) {
31931
32077
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
31932
32078
  className: "tpl-prism",
31933
32079
  style: documentStyle("pr", style),
32080
+ ...documentStyleAttributes(style),
31934
32081
  "aria-label": doc.t.resume,
31935
32082
  lang: doc.locale,
31936
32083
  children: [/* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("header", {
@@ -32352,6 +32499,7 @@ function HipsterDocument({ resume }) {
32352
32499
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
32353
32500
  className: "tpl-hipster",
32354
32501
  style: documentStyle("hp", style),
32502
+ ...documentStyleAttributes(style),
32355
32503
  "aria-label": doc.t.resume,
32356
32504
  lang: doc.locale,
32357
32505
  children: [/* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("header", {
@@ -32745,6 +32893,7 @@ function ScholarDocument({ resume }) {
32745
32893
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
32746
32894
  className: "tpl-scholar",
32747
32895
  style: documentStyle("sc", style),
32896
+ ...documentStyleAttributes(style),
32748
32897
  "aria-label": doc.t.resume,
32749
32898
  lang: doc.locale,
32750
32899
  children: [
@@ -33126,6 +33275,7 @@ function PortraitDocument({ resume }) {
33126
33275
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsx)("article", {
33127
33276
  className: "tpl-portrait",
33128
33277
  style: documentStyle("pt", style),
33278
+ ...documentStyleAttributes(style),
33129
33279
  "aria-label": doc.t.resume,
33130
33280
  lang: doc.locale,
33131
33281
  children: /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("div", {
@@ -33535,6 +33685,7 @@ function CurveDocument({ resume }) {
33535
33685
  return /* @__PURE__ */ (0, import_jsx_runtime$18.jsxs)("article", {
33536
33686
  className: "tpl-curve",
33537
33687
  style: documentStyle("cv", style),
33688
+ ...documentStyleAttributes(style),
33538
33689
  "aria-label": doc.t.resume,
33539
33690
  lang: doc.locale,
33540
33691
  children: [
@@ -1 +1 @@
1
- {"version":3,"file":"AcademicDocument.d.ts","sourceRoot":"","sources":["../../../src/templates/academic/AcademicDocument.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAqBtD,OAAO,sBAAsB,CAAC;AAC9B,OAAO,6BAA6B,CAAC;AACrC,OAAO,gBAAgB,CAAC;AAGxB,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAAE,qBAAqB,+BA2NjE"}
1
+ {"version":3,"file":"AcademicDocument.d.ts","sourceRoot":"","sources":["../../../src/templates/academic/AcademicDocument.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAwBtD,OAAO,sBAAsB,CAAC;AAC9B,OAAO,6BAA6B,CAAC;AACrC,OAAO,gBAAgB,CAAC;AAGxB,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAAE,qBAAqB,+BA4NjE"}
@@ -11,7 +11,7 @@ import { LanguageList } from '../../kit/LanguageList.js';
11
11
  import { GridSkillGroup } from '../../kit/GridSkillGroup.js';
12
12
  import { InitialsAvatar } from '../../kit/InitialsAvatar.js';
13
13
  import { useContactLines } from '../../kit/contact.js';
14
- import { documentStyle } from '../../kit/documentStyle.js';
14
+ import { documentStyle, documentStyleAttributes, } from '../../kit/documentStyle.js';
15
15
  import { Heading } from '../../kit/Heading.js';
16
16
  import { LinkField } from '../../nodes/LinkField.js';
17
17
  import { AcademicCustomEntry, AcademicEducationEntry, AcademicExperienceEntry, } from './entries.js';
@@ -25,5 +25,5 @@ export function AcademicDocument({ resume }) {
25
25
  const style = useDocumentStyle();
26
26
  const authoring = useAuthoring() !== null;
27
27
  const contact = useContactLines(resume.contact, ['location', 'phone', 'email'], authoring);
28
- return (_jsxs("article", { className: "tpl-academic", style: documentStyle('ac', style), "aria-label": doc.t.resume, lang: doc.locale, children: [_jsxs("header", { className: "tpl-academic__head", "data-layout": "row", "data-block": true, children: [_jsxs("div", { className: "tpl-academic__identity", children: [_jsx(Heading, { level: 1, className: "tpl-academic__name", children: _jsx(EditableText, { path: "name", value: resume.name }) }), (resume.headline || authoring) && (_jsx("p", { className: "tpl-academic__headline", children: _jsx(EditableText, { path: "headline", value: resume.headline ?? '', placeholder: placeholder('headline') }) }))] }), (contact.length > 0 || resume.links.length > 0 || authoring) && (_jsxs("div", { className: "tpl-academic__contact tpl-contact-icons", children: [contact.map(({ field, path, value, placeholder }) => (_jsx("p", { className: `tpl-academic__contact-item tpl-contact--${field}`, children: _jsx(EditableText, { path: path, value: value, placeholder: placeholder }) }, path))), _jsx(Collection, { section: "links", items: resume.links, gap: false, emptyAdd: "inline", children: ({ item, path, chrome, itemProps, justAdded }) => (_jsx("p", { className: "tpl-academic__contact-item tpl-contact--link", children: _jsxs("span", { ...itemProps, children: [chrome, _jsx(LinkField, { item: item, path: path, justAdded: justAdded })] }) })) })] })), _jsx(InitialsAvatar, { name: resume.name, className: "tpl-academic__avatar" })] }), (resume.summary || authoring) && (_jsx(DocumentSection, { id: "summary", heading: resume.section_headings?.summary, title: doc.t.sections.summary, className: "tpl-academic__section", headingClassName: "tpl-academic__heading", children: _jsx("p", { className: "tpl-academic__prose", "data-block": true, children: _jsx(EditableText, { path: "summary", value: resume.summary ?? '', placeholder: placeholder('summary'), multiline: true }) }) })), (resume.education.length > 0 || authoring) && (_jsx(DocumentSection, { id: "education", heading: resume.section_headings?.education, title: doc.t.sections.education, className: "tpl-academic__section", headingClassName: "tpl-academic__heading", children: _jsx(Collection, { section: "education", items: resume.education, children: ({ item, path, chrome, itemProps }) => (_jsx(AcademicEducationEntry, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) })), (resume.experience.length > 0 || authoring) && (_jsx(DocumentSection, { id: "experience", heading: resume.section_headings?.experience, title: doc.t.sections.experience, className: "tpl-academic__section", headingClassName: "tpl-academic__heading", children: _jsx(Collection, { section: "experience", items: resume.experience, children: ({ item, path, chrome, itemProps }) => (_jsx(AcademicExperienceEntry, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) })), _jsx(DescribedEntries, { id: "achievements", heading: resume.section_headings?.achievements, title: doc.t.sections.achievements, className: "tpl-academic__section tpl-academic__section--hung", headingClassName: "tpl-academic__heading", items: resume.achievements, entryClassName: "tpl-academic__described" }), _jsx(CustomSections, { sections: resume.custom_sections, sectionClass: "tpl-academic__section", headingClass: "tpl-academic__heading", Entry: AcademicCustomEntry }), _jsx(DescribedEntries, { id: "courses", heading: resume.section_headings?.courses, title: doc.t.sections.courses, className: "tpl-academic__section tpl-academic__section--hung", headingClassName: "tpl-academic__heading", items: resume.courses, entryClassName: "tpl-academic__described" }), (resume.certifications.length > 0 || authoring) && (_jsx(DocumentSection, { id: "certifications", heading: resume.section_headings?.certifications, title: doc.t.sections.certifications, className: "tpl-academic__section", headingClassName: "tpl-academic__heading", children: _jsx("div", { className: "tpl-academic__hung", "data-block": true, "data-split": true, children: _jsx(EditableBulletList, { path: "certifications", items: resume.certifications, placeholder: placeholder('certification') }) }) })), _jsx(LanguageList, { items: resume.languages, heading: resume.section_headings?.languages, className: "tpl-academic__section", headingClassName: "tpl-academic__heading", rowClassName: "tpl-academic__language" }), (resume.skills.length > 0 || authoring) && (_jsx(DocumentSection, { id: "skills", heading: resume.section_headings?.skills, title: doc.t.sections.skills, className: "tpl-academic__section", headingClassName: "tpl-academic__heading", children: _jsx("div", { className: "tpl-skill-grid", children: _jsx(Collection, { section: "skills", items: resume.skills, children: ({ item, path, chrome, itemProps }) => (_jsx(GridSkillGroup, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) }) })), _jsx(DescribedEntries, { id: "passions", heading: resume.section_headings?.passions, title: doc.t.sections.passions, className: "tpl-academic__section tpl-academic__section--items", headingClassName: "tpl-academic__heading", items: resume.passions, entryClassName: "tpl-academic__described" })] }));
28
+ return (_jsxs("article", { className: "tpl-academic", style: documentStyle('ac', style), ...documentStyleAttributes(style), "aria-label": doc.t.resume, lang: doc.locale, children: [_jsxs("header", { className: "tpl-academic__head", "data-layout": "row", "data-block": true, children: [_jsxs("div", { className: "tpl-academic__identity", children: [_jsx(Heading, { level: 1, className: "tpl-academic__name", children: _jsx(EditableText, { path: "name", value: resume.name }) }), (resume.headline || authoring) && (_jsx("p", { className: "tpl-academic__headline", children: _jsx(EditableText, { path: "headline", value: resume.headline ?? '', placeholder: placeholder('headline') }) }))] }), (contact.length > 0 || resume.links.length > 0 || authoring) && (_jsxs("div", { className: "tpl-academic__contact tpl-contact-icons", children: [contact.map(({ field, path, value, placeholder }) => (_jsx("p", { className: `tpl-academic__contact-item tpl-contact--${field}`, children: _jsx(EditableText, { path: path, value: value, placeholder: placeholder }) }, path))), _jsx(Collection, { section: "links", items: resume.links, gap: false, emptyAdd: "inline", children: ({ item, path, chrome, itemProps, justAdded }) => (_jsx("p", { className: "tpl-academic__contact-item tpl-contact--link", children: _jsxs("span", { ...itemProps, children: [chrome, _jsx(LinkField, { item: item, path: path, justAdded: justAdded })] }) })) })] })), _jsx(InitialsAvatar, { name: resume.name, className: "tpl-academic__avatar" })] }), (resume.summary || authoring) && (_jsx(DocumentSection, { id: "summary", heading: resume.section_headings?.summary, title: doc.t.sections.summary, className: "tpl-academic__section", headingClassName: "tpl-academic__heading", children: _jsx("p", { className: "tpl-academic__prose", "data-block": true, children: _jsx(EditableText, { path: "summary", value: resume.summary ?? '', placeholder: placeholder('summary'), multiline: true }) }) })), (resume.education.length > 0 || authoring) && (_jsx(DocumentSection, { id: "education", heading: resume.section_headings?.education, title: doc.t.sections.education, className: "tpl-academic__section", headingClassName: "tpl-academic__heading", children: _jsx(Collection, { section: "education", items: resume.education, children: ({ item, path, chrome, itemProps }) => (_jsx(AcademicEducationEntry, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) })), (resume.experience.length > 0 || authoring) && (_jsx(DocumentSection, { id: "experience", heading: resume.section_headings?.experience, title: doc.t.sections.experience, className: "tpl-academic__section", headingClassName: "tpl-academic__heading", children: _jsx(Collection, { section: "experience", items: resume.experience, children: ({ item, path, chrome, itemProps }) => (_jsx(AcademicExperienceEntry, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) })), _jsx(DescribedEntries, { id: "achievements", heading: resume.section_headings?.achievements, title: doc.t.sections.achievements, className: "tpl-academic__section tpl-academic__section--hung", headingClassName: "tpl-academic__heading", items: resume.achievements, entryClassName: "tpl-academic__described" }), _jsx(CustomSections, { sections: resume.custom_sections, sectionClass: "tpl-academic__section", headingClass: "tpl-academic__heading", Entry: AcademicCustomEntry }), _jsx(DescribedEntries, { id: "courses", heading: resume.section_headings?.courses, title: doc.t.sections.courses, className: "tpl-academic__section tpl-academic__section--hung", headingClassName: "tpl-academic__heading", items: resume.courses, entryClassName: "tpl-academic__described" }), (resume.certifications.length > 0 || authoring) && (_jsx(DocumentSection, { id: "certifications", heading: resume.section_headings?.certifications, title: doc.t.sections.certifications, className: "tpl-academic__section", headingClassName: "tpl-academic__heading", children: _jsx("div", { className: "tpl-academic__hung", "data-block": true, "data-split": true, children: _jsx(EditableBulletList, { path: "certifications", items: resume.certifications, placeholder: placeholder('certification') }) }) })), _jsx(LanguageList, { items: resume.languages, heading: resume.section_headings?.languages, className: "tpl-academic__section", headingClassName: "tpl-academic__heading", rowClassName: "tpl-academic__language" }), (resume.skills.length > 0 || authoring) && (_jsx(DocumentSection, { id: "skills", heading: resume.section_headings?.skills, title: doc.t.sections.skills, className: "tpl-academic__section", headingClassName: "tpl-academic__heading", children: _jsx("div", { className: "tpl-skill-grid", children: _jsx(Collection, { section: "skills", items: resume.skills, children: ({ item, path, chrome, itemProps }) => (_jsx(GridSkillGroup, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) }) })), _jsx(DescribedEntries, { id: "passions", heading: resume.section_headings?.passions, title: doc.t.sections.passions, className: "tpl-academic__section tpl-academic__section--items", headingClassName: "tpl-academic__heading", items: resume.passions, entryClassName: "tpl-academic__described" })] }));
29
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AltaDocument.d.ts","sourceRoot":"","sources":["../../../src/templates/alta/AltaDocument.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAqBtD,OAAO,sBAAsB,CAAC;AAC9B,OAAO,6BAA6B,CAAC;AACrC,OAAO,YAAY,CAAC;AAGpB,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE,iBAAiB,+BAqOzD"}
1
+ {"version":3,"file":"AltaDocument.d.ts","sourceRoot":"","sources":["../../../src/templates/alta/AltaDocument.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAwBtD,OAAO,sBAAsB,CAAC;AAC9B,OAAO,6BAA6B,CAAC;AACrC,OAAO,YAAY,CAAC;AAGpB,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE,iBAAiB,+BAsOzD"}