@resumekit/react 0.2.0 → 0.4.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 (141) hide show
  1. package/dist/export-bundle/bundle.css +1 -1
  2. package/dist/export-bundle/bundle.js +10 -10
  3. package/dist/fonts/README.md +29 -0
  4. package/dist/fonts/dmsans-400.woff2 +0 -0
  5. package/dist/fonts/dmsans-400i.woff2 +0 -0
  6. package/dist/fonts/dmsans-700.woff2 +0 -0
  7. package/dist/fonts/dmsans-700i.woff2 +0 -0
  8. package/dist/fonts/firasans-400.woff2 +0 -0
  9. package/dist/fonts/firasans-400i.woff2 +0 -0
  10. package/dist/fonts/firasans-700.woff2 +0 -0
  11. package/dist/fonts/firasans-700i.woff2 +0 -0
  12. package/dist/fonts/fonts.css +481 -0
  13. package/dist/fonts/inter-400.woff2 +0 -0
  14. package/dist/fonts/inter-400i.woff2 +0 -0
  15. package/dist/fonts/inter-700.woff2 +0 -0
  16. package/dist/fonts/inter-700i.woff2 +0 -0
  17. package/dist/fonts/librefranklin-400.woff2 +0 -0
  18. package/dist/fonts/librefranklin-400i.woff2 +0 -0
  19. package/dist/fonts/librefranklin-700.woff2 +0 -0
  20. package/dist/fonts/librefranklin-700i.woff2 +0 -0
  21. package/dist/fonts/licenses/dmsans-OFL.txt +93 -0
  22. package/dist/fonts/licenses/firasans-OFL.txt +93 -0
  23. package/dist/fonts/licenses/inter-OFL.txt +93 -0
  24. package/dist/fonts/licenses/librefranklin-OFL.txt +93 -0
  25. package/dist/fonts/licenses/lora-OFL.txt +93 -0
  26. package/dist/fonts/licenses/montserrat-OFL.txt +93 -0
  27. package/dist/fonts/licenses/notosans-OFL.txt +93 -0
  28. package/dist/fonts/licenses/nunitosans-OFL.txt +93 -0
  29. package/dist/fonts/licenses/opensans-OFL.txt +93 -0
  30. package/dist/fonts/licenses/playfair-OFL.txt +93 -0
  31. package/dist/fonts/licenses/plexsans-OFL.txt +93 -0
  32. package/dist/fonts/licenses/plexserif-OFL.txt +93 -0
  33. package/dist/fonts/licenses/sourceserif4-OFL.txt +93 -0
  34. package/dist/fonts/licenses/spectral-OFL.txt +93 -0
  35. package/dist/fonts/licenses/worksans-OFL.txt +93 -0
  36. package/dist/fonts/lora-400.woff2 +0 -0
  37. package/dist/fonts/lora-400i.woff2 +0 -0
  38. package/dist/fonts/lora-700.woff2 +0 -0
  39. package/dist/fonts/lora-700i.woff2 +0 -0
  40. package/dist/fonts/montserrat-400.woff2 +0 -0
  41. package/dist/fonts/montserrat-400i.woff2 +0 -0
  42. package/dist/fonts/montserrat-700.woff2 +0 -0
  43. package/dist/fonts/montserrat-700i.woff2 +0 -0
  44. package/dist/fonts/notosans-400.woff2 +0 -0
  45. package/dist/fonts/notosans-400i.woff2 +0 -0
  46. package/dist/fonts/notosans-700.woff2 +0 -0
  47. package/dist/fonts/notosans-700i.woff2 +0 -0
  48. package/dist/fonts/nunitosans-400.woff2 +0 -0
  49. package/dist/fonts/nunitosans-400i.woff2 +0 -0
  50. package/dist/fonts/nunitosans-700.woff2 +0 -0
  51. package/dist/fonts/nunitosans-700i.woff2 +0 -0
  52. package/dist/fonts/opensans-400.woff2 +0 -0
  53. package/dist/fonts/opensans-400i.woff2 +0 -0
  54. package/dist/fonts/opensans-700.woff2 +0 -0
  55. package/dist/fonts/opensans-700i.woff2 +0 -0
  56. package/dist/fonts/playfair-400.woff2 +0 -0
  57. package/dist/fonts/playfair-400i.woff2 +0 -0
  58. package/dist/fonts/playfair-700.woff2 +0 -0
  59. package/dist/fonts/playfair-700i.woff2 +0 -0
  60. package/dist/fonts/plexsans-400.woff2 +0 -0
  61. package/dist/fonts/plexsans-400i.woff2 +0 -0
  62. package/dist/fonts/plexsans-700.woff2 +0 -0
  63. package/dist/fonts/plexsans-700i.woff2 +0 -0
  64. package/dist/fonts/plexserif-400.woff2 +0 -0
  65. package/dist/fonts/plexserif-400i.woff2 +0 -0
  66. package/dist/fonts/plexserif-700.woff2 +0 -0
  67. package/dist/fonts/plexserif-700i.woff2 +0 -0
  68. package/dist/fonts/raleway-700i.woff2 +0 -0
  69. package/dist/fonts/roboto-700i.woff2 +0 -0
  70. package/dist/fonts/sourcesans3-700i.woff2 +0 -0
  71. package/dist/fonts/sourceserif4-400.woff2 +0 -0
  72. package/dist/fonts/sourceserif4-400i.woff2 +0 -0
  73. package/dist/fonts/sourceserif4-700.woff2 +0 -0
  74. package/dist/fonts/sourceserif4-700i.woff2 +0 -0
  75. package/dist/fonts/spectral-400.woff2 +0 -0
  76. package/dist/fonts/spectral-400i.woff2 +0 -0
  77. package/dist/fonts/spectral-700.woff2 +0 -0
  78. package/dist/fonts/spectral-700i.woff2 +0 -0
  79. package/dist/fonts/worksans-400.woff2 +0 -0
  80. package/dist/fonts/worksans-400i.woff2 +0 -0
  81. package/dist/fonts/worksans-700.woff2 +0 -0
  82. package/dist/fonts/worksans-700i.woff2 +0 -0
  83. package/dist/kit/LanguageList.d.ts.map +1 -1
  84. package/dist/kit/LanguageList.js +1 -1
  85. package/dist/kit/documentStyle.d.ts.map +1 -1
  86. package/dist/kit/documentStyle.js +8 -0
  87. package/dist/kit/language.css +14 -3
  88. package/dist/kit/typography.css +32 -0
  89. package/dist/static/static.mjs +316 -131
  90. package/dist/static/templates/academic.css +1 -1
  91. package/dist/static/templates/compact.css +1 -1
  92. package/dist/static/templates/crimson.css +1 -1
  93. package/dist/static/templates/curve.css +1 -1
  94. package/dist/static/templates/elegant-logos.css +1 -1
  95. package/dist/static/templates/elegant.css +1 -1
  96. package/dist/static/templates/engineer.css +1 -1
  97. package/dist/static/templates/executive.css +1 -1
  98. package/dist/static/templates/modern.css +1 -1
  99. package/dist/static/templates/scholar.css +1 -1
  100. package/dist/static/templates/stylish.css +1 -1
  101. package/dist/static/templates.css +1 -1
  102. package/dist/templates/academic/academic.css +6 -0
  103. package/dist/templates/compact/CompactDocument.d.ts.map +1 -1
  104. package/dist/templates/compact/CompactDocument.js +1 -1
  105. package/dist/templates/compact/compact.css +7 -4
  106. package/dist/templates/creative/CreativeDocument.d.ts.map +1 -1
  107. package/dist/templates/creative/CreativeDocument.js +5 -1
  108. package/dist/templates/crimson/crimson.css +1 -1
  109. package/dist/templates/curve/curve.css +1 -1
  110. package/dist/templates/double-column/DoubleColumnDocument.d.ts.map +1 -1
  111. package/dist/templates/double-column/DoubleColumnDocument.js +5 -1
  112. package/dist/templates/double-column-logos/DoubleColumnLogosDocument.d.ts.map +1 -1
  113. package/dist/templates/double-column-logos/DoubleColumnLogosDocument.js +5 -1
  114. package/dist/templates/elegant/elegant.css +6 -6
  115. package/dist/templates/elegant-logos/elegant-logos.css +6 -6
  116. package/dist/templates/engineer/engineer.css +1 -1
  117. package/dist/templates/executive/executive.css +19 -0
  118. package/dist/templates/harvard/harvard.css +1 -6
  119. package/dist/templates/modern/ModernDocument.d.ts.map +1 -1
  120. package/dist/templates/modern/ModernDocument.js +1 -1
  121. package/dist/templates/modern/modern.css +7 -4
  122. package/dist/templates/portrait/portrait.css +1 -2
  123. package/dist/templates/prism/prism.css +1 -2
  124. package/dist/templates/scholar/scholar.css +1 -1
  125. package/dist/templates/stylish/StylishDocument.d.ts.map +1 -1
  126. package/dist/templates/stylish/StylishDocument.js +2 -2
  127. package/dist/templates/stylish/stylish.css +7 -16
  128. package/dist/templates/timeline/TimelineDocument.d.ts.map +1 -1
  129. package/dist/templates/timeline/TimelineDocument.js +5 -1
  130. package/package.json +2 -2
  131. package/src/compiler/emit.ts +13 -2
  132. package/src/compiler/schema.ts +15 -0
  133. package/src/kit/LanguageList.tsx +23 -17
  134. package/src/kit/documentStyle.ts +8 -0
  135. package/src/templates/compact/CompactDocument.tsx +5 -1
  136. package/src/templates/creative/CreativeDocument.tsx +28 -12
  137. package/src/templates/double-column/DoubleColumnDocument.tsx +28 -12
  138. package/src/templates/double-column-logos/DoubleColumnLogosDocument.tsx +28 -12
  139. package/src/templates/modern/ModernDocument.tsx +5 -1
  140. package/src/templates/stylish/StylishDocument.tsx +14 -10
  141. package/src/templates/timeline/TimelineDocument.tsx +28 -12
@@ -53,7 +53,7 @@
53
53
 
54
54
  .tpl-elegant__name {
55
55
  margin: 0;
56
- font-size: calc(20pt * var(--el-scale));
56
+ font-size: calc(18pt * var(--el-scale));
57
57
  font-weight: 700;
58
58
  line-height: 1.1;
59
59
  color: var(--el-ink);
@@ -62,7 +62,7 @@
62
62
 
63
63
  .tpl-elegant__headline {
64
64
  margin: calc(3pt * var(--el-scale)) 0 0;
65
- font-size: calc(12.5pt * var(--el-scale));
65
+ font-size: calc(10.5pt * var(--el-scale));
66
66
  font-weight: 400;
67
67
  line-height: 1.25;
68
68
  color: var(--el-accent);
@@ -194,7 +194,7 @@
194
194
  margin: 0 0 calc(6pt * var(--el-scale));
195
195
  padding-bottom: calc(3pt * var(--el-scale));
196
196
  border-bottom: 1pt solid var(--el-line);
197
- font-size: calc(13pt * var(--el-scale));
197
+ font-size: calc(10pt * var(--el-scale));
198
198
  font-weight: 400;
199
199
  line-height: 1.2;
200
200
  text-transform: uppercase;
@@ -237,7 +237,7 @@
237
237
  }
238
238
 
239
239
  .tpl-elegant__role {
240
- font-size: calc(11pt * var(--el-scale));
240
+ font-size: calc(9.5pt * var(--el-scale));
241
241
  line-height: 1.25;
242
242
  color: var(--el-ink);
243
243
  }
@@ -253,7 +253,7 @@
253
253
 
254
254
  .tpl-elegant__org {
255
255
  margin-top: calc(1pt * var(--el-scale));
256
- font-size: calc(10pt * var(--el-scale));
256
+ font-size: calc(8.5pt * var(--el-scale));
257
257
  line-height: 1.25;
258
258
  color: var(--el-accent);
259
259
  }
@@ -325,7 +325,7 @@
325
325
  --tpl-described-gap: calc(9pt * var(--el-scale));
326
326
  --tpl-described-lead: calc(2pt * var(--el-scale));
327
327
  --tpl-described-title-ink: var(--el-ink);
328
- --tpl-described-title-size: calc(10.5pt * var(--el-scale));
328
+ --tpl-described-title-size: calc(9pt * var(--el-scale));
329
329
  --tpl-described-title-weight: 400;
330
330
  --tpl-described-title-leading: 1.25;
331
331
  --tpl-described-body-size: calc(7.8pt * var(--el-scale));
@@ -50,7 +50,7 @@
50
50
 
51
51
  .tpl-ell__name {
52
52
  margin: 0;
53
- font-size: calc(20pt * var(--ell-scale));
53
+ font-size: calc(18pt * var(--ell-scale));
54
54
  font-weight: 700;
55
55
  line-height: 1.1;
56
56
  color: var(--ell-ink);
@@ -59,7 +59,7 @@
59
59
 
60
60
  .tpl-ell__headline {
61
61
  margin: calc(3pt * var(--ell-scale)) 0 0;
62
- font-size: calc(12.5pt * var(--ell-scale));
62
+ font-size: calc(10.5pt * var(--ell-scale));
63
63
  font-weight: 400;
64
64
  line-height: 1.25;
65
65
  color: var(--ell-accent);
@@ -184,7 +184,7 @@
184
184
  margin: 0 0 calc(6pt * var(--ell-scale));
185
185
  padding-bottom: calc(3pt * var(--ell-scale));
186
186
  border-bottom: 1pt solid var(--ell-line);
187
- font-size: calc(13pt * var(--ell-scale));
187
+ font-size: calc(10pt * var(--ell-scale));
188
188
  font-weight: 400;
189
189
  line-height: 1.2;
190
190
  text-transform: uppercase;
@@ -245,7 +245,7 @@
245
245
  }
246
246
 
247
247
  .tpl-ell__role {
248
- font-size: calc(11pt * var(--ell-scale));
248
+ font-size: calc(9.5pt * var(--ell-scale));
249
249
  line-height: 1.25;
250
250
  color: var(--ell-ink);
251
251
  }
@@ -261,7 +261,7 @@
261
261
 
262
262
  .tpl-ell__org {
263
263
  margin-top: calc(1pt * var(--ell-scale));
264
- font-size: calc(10pt * var(--ell-scale));
264
+ font-size: calc(8.5pt * var(--ell-scale));
265
265
  line-height: 1.25;
266
266
  color: var(--ell-accent);
267
267
  }
@@ -337,7 +337,7 @@
337
337
  --tpl-described-gap: calc(9pt * var(--ell-scale));
338
338
  --tpl-described-lead: calc(2pt * var(--ell-scale));
339
339
  --tpl-described-title-ink: var(--ell-ink);
340
- --tpl-described-title-size: calc(10.5pt * var(--ell-scale));
340
+ --tpl-described-title-size: calc(9pt * var(--ell-scale));
341
341
  --tpl-described-title-weight: 400;
342
342
  --tpl-described-title-leading: 1.25;
343
343
  --tpl-described-body-size: calc(7.8pt * var(--ell-scale));
@@ -232,7 +232,7 @@
232
232
 
233
233
  .tpl-engineer {
234
234
  --tpl-skill-grid-label: calc(90pt * var(--eng-scale));
235
- --tpl-skill-grid-column: calc(96pt * var(--eng-scale));
235
+ --tpl-skill-grid-column: calc(130pt * var(--eng-scale));
236
236
  --tpl-skill-grid-gutter: calc(6pt * var(--eng-scale));
237
237
  --tpl-skill-grid-gap: calc(8pt * var(--eng-scale));
238
238
  --tpl-skill-grid-lead: 0px;
@@ -74,6 +74,9 @@
74
74
  box-sizing: border-box;
75
75
  width: 8.5in;
76
76
  margin: 0 auto;
77
+ /* Its own paper, like every other template: the builder shows the
78
+ document on whatever the host draws behind it. */
79
+ background: #ffffff;
77
80
  color: var(--e-ink);
78
81
  font-family: var(--e-font);
79
82
  font-size: var(--e-body);
@@ -251,6 +254,22 @@
251
254
  list-style: none;
252
255
  }
253
256
 
257
+ /*
258
+ * The editor's bullet controls are absolutely positioned, and Chrome counts
259
+ * an absolutely positioned box when it balances columns — so the builder drew
260
+ * this list one row taller than the page it prints. Clipping each row makes it
261
+ * a box of its own that the balancer measures by its height alone, and the
262
+ * slimmer pill fits the 20pt row it is clipped to. The printed page has no
263
+ * controls and is unchanged.
264
+ */
265
+ .tpl-exec .tpl-exec__columns .tpl-bullet {
266
+ overflow: hidden;
267
+ }
268
+
269
+ .tpl-exec .tpl-exec__columns .tpl-bullet__tools {
270
+ padding: 1px;
271
+ }
272
+
254
273
  /* ── Entries ────────────────────────────────────────────────────────────── */
255
274
 
256
275
  .tpl-exec__entry {
@@ -372,8 +372,7 @@
372
372
  font-weight: 700;
373
373
  }
374
374
 
375
- .tpl-harvard__languages .tpl-language__level,
376
- .tpl-harvard__languages .tpl-language__choice {
375
+ .tpl-harvard__languages .tpl-language__level {
377
376
  font-size: inherit;
378
377
  }
379
378
 
@@ -385,10 +384,6 @@
385
384
  content: ')';
386
385
  }
387
386
 
388
- .tpl-harvard__languages .tpl-language__choice {
389
- margin-left: 0.5em;
390
- }
391
-
392
387
  .tpl-harvard__languages .tpl-language__meter {
393
388
  display: none;
394
389
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ModernDocument.d.ts","sourceRoot":"","sources":["../../../src/templates/modern/ModernDocument.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAwBtD,OAAO,sBAAsB,CAAC;AAC9B,OAAO,6BAA6B,CAAC;AACrC,OAAO,cAAc,CAAC;AAGtB,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB,+BAsO7D"}
1
+ {"version":3,"file":"ModernDocument.d.ts","sourceRoot":"","sources":["../../../src/templates/modern/ModernDocument.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAwBtD,OAAO,sBAAsB,CAAC;AAC9B,OAAO,6BAA6B,CAAC;AACrC,OAAO,cAAc,CAAC;AAGtB,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB,+BA0O7D"}
@@ -25,5 +25,5 @@ export function ModernDocument({ resume }) {
25
25
  const style = useDocumentStyle();
26
26
  const authoring = useAuthoring() !== null;
27
27
  const contact = useContactLines(resume.contact, ['phone', 'email', 'location'], authoring);
28
- return (_jsxs("article", { className: "tpl-modern", style: documentStyle('md', style), ...documentStyleAttributes(style), "aria-label": doc.t.resume, lang: doc.locale, children: [_jsxs("header", { className: "tpl-modern__head-block", "data-layout": "row", "data-block": true, children: [_jsxs("div", { className: "tpl-modern__identity", children: [_jsx(Heading, { level: 1, className: "tpl-modern__name", children: _jsx(EditableText, { path: "name", value: resume.name }) }), (resume.headline || authoring) && (_jsx("p", { className: "tpl-modern__headline", children: _jsx(EditableText, { path: "headline", value: resume.headline ?? '', placeholder: placeholder('headline') }) })), (contact.length > 0 || resume.links.length > 0 || authoring) && (_jsxs("p", { className: "tpl-modern__contact tpl-contact-icons", children: [contact.map(({ field, path, value, placeholder }) => (_jsx("span", { className: `tpl-modern__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("span", { className: "tpl-modern__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-modern__avatar" })] }), _jsxs("div", { className: "tpl-modern__body", "data-layout": "row", children: [_jsxs("div", { className: "tpl-modern__main", "data-flow": true, children: [(resume.experience.length > 0 || authoring) && (_jsx(DocumentSection, { id: "experience", heading: resume.section_headings?.experience, title: doc.t.sections.experience, className: "tpl-modern__section", headingClassName: "tpl-modern__heading", children: _jsx(Collection, { section: "experience", items: resume.experience, children: ({ item, path, chrome, itemProps }) => (_jsx(ModernExperienceEntry, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) })), (resume.education.length > 0 || authoring) && (_jsx(DocumentSection, { id: "education", heading: resume.section_headings?.education, title: doc.t.sections.education, className: "tpl-modern__section", headingClassName: "tpl-modern__heading", children: _jsx(Collection, { section: "education", items: resume.education, children: ({ item, path, chrome, itemProps }) => (_jsx(ModernEducationEntry, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) })), _jsx(LanguageList, { items: resume.languages, heading: resume.section_headings?.languages, className: "tpl-modern__section", headingClassName: "tpl-modern__heading", rowClassName: "tpl-modern__language" })] }), _jsxs("aside", { className: "tpl-modern__aside", "data-flow": true, children: [(resume.summary || authoring) && (_jsx(DocumentSection, { id: "summary", heading: resume.section_headings?.summary, title: doc.t.sections.summary, className: "tpl-modern__section", headingClassName: "tpl-modern__heading", children: _jsx("p", { className: "tpl-modern__prose", "data-block": true, children: _jsx(EditableText, { path: "summary", value: resume.summary ?? '', placeholder: placeholder('summary'), multiline: true }) }) })), _jsx(DescribedEntries, { id: "achievements", heading: resume.section_headings?.achievements, title: doc.t.sections.achievements, className: "tpl-modern__section tpl-described--marked", headingClassName: "tpl-modern__heading", items: resume.achievements, entryClassName: "tpl-modern__described" }), _jsx(CustomSections, { sections: resume.custom_sections, sectionClass: "tpl-modern__section", headingClass: "tpl-modern__heading", Entry: ModernCustomEntry }), (resume.skills.length > 0 || authoring) && (_jsx(DocumentSection, { id: "skills", heading: resume.section_headings?.skills, title: doc.t.sections.skills, className: "tpl-modern__section", headingClassName: "tpl-modern__heading", children: _jsx("div", { className: "tpl-keywords", "data-block": true, "data-split": true, children: _jsx(Collection, { section: "skills", items: resume.skills, noun: "skill", gap: false, children: ({ item, path }) => (_jsx(BulletSkillGroup, { item: item, path: path })) }) }) })), _jsx(DescribedEntries, { id: "courses", heading: resume.section_headings?.courses, title: doc.t.sections.courses, className: "tpl-modern__section", headingClassName: "tpl-modern__heading", items: resume.courses, entryClassName: "tpl-modern__described" }), resume.certifications.length > 0 && (_jsx(DocumentSection, { id: "certifications", heading: resume.section_headings?.certifications, title: doc.t.sections.certifications, className: "tpl-modern__section", headingClassName: "tpl-modern__heading", children: _jsx("div", { "data-block": true, "data-split": true, children: _jsx(EditableBulletList, { path: "certifications", items: resume.certifications, placeholder: placeholder('certification') }) }) })), _jsx(DescribedEntries, { id: "passions", heading: resume.section_headings?.passions, title: doc.t.sections.passions, className: "tpl-modern__section tpl-described--marked", headingClassName: "tpl-modern__heading", items: resume.passions, entryClassName: "tpl-modern__described" })] })] })] }));
28
+ return (_jsxs("article", { className: "tpl-modern", style: documentStyle('md', style), ...documentStyleAttributes(style), "aria-label": doc.t.resume, lang: doc.locale, children: [_jsxs("header", { className: "tpl-modern__head-block", "data-layout": "row", "data-block": true, children: [_jsxs("div", { className: "tpl-modern__identity", children: [_jsx(Heading, { level: 1, className: "tpl-modern__name", children: _jsx(EditableText, { path: "name", value: resume.name }) }), (resume.headline || authoring) && (_jsx("p", { className: "tpl-modern__headline", children: _jsx(EditableText, { path: "headline", value: resume.headline ?? '', placeholder: placeholder('headline') }) })), (contact.length > 0 || resume.links.length > 0 || authoring) && (_jsxs("p", { className: "tpl-modern__contact tpl-contact-icons", children: [contact.map(({ field, path, value, placeholder }) => (_jsx("span", { className: `tpl-modern__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("span", { className: "tpl-modern__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-modern__avatar" })] }), _jsxs("div", { className: "tpl-modern__body", "data-layout": "row", children: [_jsxs("div", { className: "tpl-modern__main", "data-flow": true, children: [(resume.experience.length > 0 || authoring) && (_jsx(DocumentSection, { id: "experience", heading: resume.section_headings?.experience, title: doc.t.sections.experience, className: "tpl-modern__section", headingClassName: "tpl-modern__heading", children: _jsx(Collection, { section: "experience", items: resume.experience, children: ({ item, path, chrome, itemProps }) => (_jsx(ModernExperienceEntry, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) })), (resume.education.length > 0 || authoring) && (_jsx(DocumentSection, { id: "education", heading: resume.section_headings?.education, title: doc.t.sections.education, className: "tpl-modern__section", headingClassName: "tpl-modern__heading", children: _jsx(Collection, { section: "education", items: resume.education, children: ({ item, path, chrome, itemProps }) => (_jsx(ModernEducationEntry, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) })), _jsx(LanguageList, { items: resume.languages, heading: resume.section_headings?.languages, className: "tpl-modern__section", headingClassName: "tpl-modern__heading", rowClassName: "tpl-modern__language" })] }), _jsxs("aside", { className: "tpl-modern__aside", "data-flow": true, children: [(resume.summary || authoring) && (_jsx(DocumentSection, { id: "summary", heading: resume.section_headings?.summary, title: doc.t.sections.summary, className: "tpl-modern__section", headingClassName: "tpl-modern__heading", children: _jsx("p", { className: "tpl-modern__prose", "data-block": true, children: _jsx(EditableText, { path: "summary", value: resume.summary ?? '', placeholder: placeholder('summary'), multiline: true }) }) })), _jsx(DescribedEntries, { id: "achievements", heading: resume.section_headings?.achievements, title: doc.t.sections.achievements, className: "tpl-modern__section tpl-described--marked", headingClassName: "tpl-modern__heading", items: resume.achievements, entryClassName: "tpl-modern__described" }), _jsx(CustomSections, { sections: resume.custom_sections, sectionClass: "tpl-modern__section", headingClass: "tpl-modern__heading", Entry: ModernCustomEntry }), (resume.skills.length > 0 || authoring) && (_jsx(DocumentSection, { id: "skills", heading: resume.section_headings?.skills, title: doc.t.sections.skills, className: "tpl-modern__section", headingClassName: "tpl-modern__heading", children: _jsx("div", { className: "tpl-keywords tpl-keywords--tags", "data-block": true, "data-split": true, children: _jsx(Collection, { section: "skills", items: resume.skills, noun: "skill", gap: false, children: ({ item, path }) => (_jsx(BulletSkillGroup, { item: item, path: path })) }) }) })), _jsx(DescribedEntries, { id: "courses", heading: resume.section_headings?.courses, title: doc.t.sections.courses, className: "tpl-modern__section", headingClassName: "tpl-modern__heading", items: resume.courses, entryClassName: "tpl-modern__described" }), resume.certifications.length > 0 && (_jsx(DocumentSection, { id: "certifications", heading: resume.section_headings?.certifications, title: doc.t.sections.certifications, className: "tpl-modern__section", headingClassName: "tpl-modern__heading", children: _jsx("div", { "data-block": true, "data-split": true, children: _jsx(EditableBulletList, { path: "certifications", items: resume.certifications, placeholder: placeholder('certification') }) }) })), _jsx(DescribedEntries, { id: "passions", heading: resume.section_headings?.passions, title: doc.t.sections.passions, className: "tpl-modern__section tpl-described--marked", headingClassName: "tpl-modern__heading", items: resume.passions, entryClassName: "tpl-modern__described" })] })] })] }));
29
29
  }
@@ -247,12 +247,15 @@
247
247
  color: var(--md-body);
248
248
  }
249
249
 
250
- /* Skills as keywords over a rule — the shape is `kit/keywords.css`; this
251
- template states only its colour and its rhythm. */
250
+ /* Skills as underlined tags, several to a row, as the reference sets them —
251
+ the shape is `kit/keywords.css`; this template states only its colour and
252
+ its rhythm. */
252
253
  .tpl-modern .tpl-keywords {
253
254
  --tpl-keyword-line: var(--md-line);
254
- --tpl-keyword-gap: calc(5pt * var(--md-scale));
255
- --tpl-keyword-lead: calc(1.5pt * var(--md-scale));
255
+ --tpl-keyword-gap: calc(7pt * var(--md-scale));
256
+ --tpl-keyword-span: calc(6pt * var(--md-scale));
257
+ --tpl-keyword-pad: calc(4pt * var(--md-scale));
258
+ --tpl-keyword-lead: calc(2.5pt * var(--md-scale));
256
259
  }
257
260
 
258
261
  /*
@@ -392,8 +392,7 @@
392
392
  padding-left: calc(3pt * var(--pt-scale));
393
393
  }
394
394
 
395
- .tpl-portrait__aside .tpl-portrait__language .tpl-language__level,
396
- .tpl-portrait__aside .tpl-portrait__language .tpl-language__choice {
395
+ .tpl-portrait__aside .tpl-portrait__language .tpl-language__level {
397
396
  grid-column: 2;
398
397
  justify-self: end;
399
398
  color: var(--pt-grey);
@@ -302,8 +302,7 @@
302
302
  font-weight: 300;
303
303
  }
304
304
 
305
- .tpl-prism__language .tpl-language__level,
306
- .tpl-prism__language .tpl-language__choice {
305
+ .tpl-prism__language .tpl-language__level {
307
306
  margin-left: 0.35em;
308
307
  color: var(--pr-light);
309
308
  font-size: calc(8pt * var(--pr-scale));
@@ -221,7 +221,7 @@
221
221
  .tpl-scholar {
222
222
  --tpl-skill-grid-label: var(--sc-label);
223
223
  --tpl-skill-grid-gutter: var(--sc-gutter);
224
- --tpl-skill-grid-column: calc(112pt * var(--sc-scale));
224
+ --tpl-skill-grid-column: calc(130pt * var(--sc-scale));
225
225
  --tpl-skill-grid-gap: calc(10pt * var(--sc-scale));
226
226
  --tpl-skill-grid-lead: 0px;
227
227
  --tpl-skill-grid-rhythm: calc(2pt * var(--sc-scale));
@@ -1 +1 @@
1
- {"version":3,"file":"StylishDocument.d.ts","sourceRoot":"","sources":["../../../src/templates/stylish/StylishDocument.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAwBtD,OAAO,sBAAsB,CAAC;AAC9B,OAAO,6BAA6B,CAAC;AACrC,OAAO,eAAe,CAAC;AAGvB,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,EAAE,oBAAoB,+BAsO/D"}
1
+ {"version":3,"file":"StylishDocument.d.ts","sourceRoot":"","sources":["../../../src/templates/stylish/StylishDocument.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAwBtD,OAAO,sBAAsB,CAAC;AAC9B,OAAO,6BAA6B,CAAC;AACrC,OAAO,eAAe,CAAC;AAGvB,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,EAAE,oBAAoB,+BA0O/D"}
@@ -8,7 +8,7 @@ import { Collection } from '../../collections/Collection.js';
8
8
  import { DocumentSection } from '../../kit/DocumentSection.js';
9
9
  import { DescribedEntries } from '../../kit/DescribedEntries.js';
10
10
  import { LanguageList } from '../../kit/LanguageList.js';
11
- import { TagSkillGroup } from '../../kit/TagSkillGroup.js';
11
+ import { BulletSkillGroup } from '../../kit/BulletSkillGroup.js';
12
12
  import { InitialsAvatar } from '../../kit/InitialsAvatar.js';
13
13
  import { useContactLines } from '../../kit/contact.js';
14
14
  import { documentStyle, documentStyleAttributes, } from '../../kit/documentStyle.js';
@@ -25,5 +25,5 @@ export function StylishDocument({ resume }) {
25
25
  const style = useDocumentStyle();
26
26
  const authoring = useAuthoring() !== null;
27
27
  const contact = useContactLines(resume.contact, ['phone', 'email', 'location'], authoring);
28
- return (_jsxs("article", { className: "tpl-stylish", style: documentStyle('st', style), ...documentStyleAttributes(style), "aria-label": doc.t.resume, lang: doc.locale, children: [_jsxs("header", { className: "tpl-stylish__head-block", "data-layout": "row", "data-block": true, children: [_jsxs("div", { className: "tpl-stylish__identity", children: [_jsx(Heading, { level: 1, className: "tpl-stylish__name", children: _jsx(EditableText, { path: "name", value: resume.name }) }), (resume.headline || authoring) && (_jsx("p", { className: "tpl-stylish__headline", children: _jsx(EditableText, { path: "headline", value: resume.headline ?? '', placeholder: placeholder('headline') }) })), (contact.length > 0 || resume.links.length > 0 || authoring) && (_jsxs("p", { className: "tpl-stylish__contact tpl-contact-icons", children: [contact.map(({ field, path, value, placeholder }) => (_jsx("span", { className: `tpl-stylish__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("span", { className: "tpl-stylish__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-stylish__avatar" })] }), _jsxs("div", { className: "tpl-stylish__body", "data-layout": "row", children: [_jsxs("aside", { className: "tpl-stylish__aside", "data-flow": true, children: [_jsx(DescribedEntries, { id: "achievements", heading: resume.section_headings?.achievements, title: doc.t.sections.achievements, className: "tpl-stylish__section tpl-described--marked", headingClassName: "tpl-stylish__heading", items: resume.achievements, entryClassName: "tpl-stylish__described" }), _jsx(CustomSections, { sections: resume.custom_sections, sectionClass: "tpl-stylish__section", headingClass: "tpl-stylish__heading", Entry: StylishCustomEntry }), (resume.skills.length > 0 || authoring) && (_jsx(DocumentSection, { id: "skills", heading: resume.section_headings?.skills, title: doc.t.sections.skills, className: "tpl-stylish__section", headingClassName: "tpl-stylish__heading", children: _jsx("div", { className: "tpl-skill-tags", children: _jsx(Collection, { section: "skills", items: resume.skills, children: ({ item, path, chrome, itemProps }) => (_jsx(TagSkillGroup, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) }) })), _jsx(DescribedEntries, { id: "courses", heading: resume.section_headings?.courses, title: doc.t.sections.courses, className: "tpl-stylish__section", headingClassName: "tpl-stylish__heading", items: resume.courses, entryClassName: "tpl-stylish__described" }), resume.certifications.length > 0 && (_jsx(DocumentSection, { id: "certifications", heading: resume.section_headings?.certifications, title: doc.t.sections.certifications, className: "tpl-stylish__section", headingClassName: "tpl-stylish__heading", children: _jsx("div", { "data-block": true, "data-split": true, children: _jsx(EditableBulletList, { path: "certifications", items: resume.certifications, placeholder: placeholder('certification') }) }) })), _jsx(DescribedEntries, { id: "passions", heading: resume.section_headings?.passions, title: doc.t.sections.passions, className: "tpl-stylish__section tpl-described--marked", headingClassName: "tpl-stylish__heading", items: resume.passions, entryClassName: "tpl-stylish__described" })] }), _jsxs("div", { className: "tpl-stylish__main", "data-flow": true, children: [(resume.summary || authoring) && (_jsx(DocumentSection, { id: "summary", heading: resume.section_headings?.summary, title: doc.t.sections.summary, className: "tpl-stylish__section", headingClassName: "tpl-stylish__heading", children: _jsx("p", { className: "tpl-stylish__prose", "data-block": true, children: _jsx(EditableText, { path: "summary", value: resume.summary ?? '', placeholder: placeholder('summary'), multiline: true }) }) })), (resume.experience.length > 0 || authoring) && (_jsx(DocumentSection, { id: "experience", heading: resume.section_headings?.experience, title: doc.t.sections.experience, className: "tpl-stylish__section", headingClassName: "tpl-stylish__heading", children: _jsx(Collection, { section: "experience", items: resume.experience, children: ({ item, path, chrome, itemProps }) => (_jsx(StylishExperienceEntry, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) })), (resume.education.length > 0 || authoring) && (_jsx(DocumentSection, { id: "education", heading: resume.section_headings?.education, title: doc.t.sections.education, className: "tpl-stylish__section", headingClassName: "tpl-stylish__heading", children: _jsx(Collection, { section: "education", items: resume.education, children: ({ item, path, chrome, itemProps }) => (_jsx(StylishEducationEntry, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) })), _jsx(LanguageList, { items: resume.languages, heading: resume.section_headings?.languages, className: "tpl-stylish__section", headingClassName: "tpl-stylish__heading", rowClassName: "tpl-stylish__language" })] })] })] }));
28
+ return (_jsxs("article", { className: "tpl-stylish", style: documentStyle('st', style), ...documentStyleAttributes(style), "aria-label": doc.t.resume, lang: doc.locale, children: [_jsxs("header", { className: "tpl-stylish__head-block", "data-layout": "row", "data-block": true, children: [_jsxs("div", { className: "tpl-stylish__identity", children: [_jsx(Heading, { level: 1, className: "tpl-stylish__name", children: _jsx(EditableText, { path: "name", value: resume.name }) }), (resume.headline || authoring) && (_jsx("p", { className: "tpl-stylish__headline", children: _jsx(EditableText, { path: "headline", value: resume.headline ?? '', placeholder: placeholder('headline') }) })), (contact.length > 0 || resume.links.length > 0 || authoring) && (_jsxs("p", { className: "tpl-stylish__contact tpl-contact-icons", children: [contact.map(({ field, path, value, placeholder }) => (_jsx("span", { className: `tpl-stylish__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("span", { className: "tpl-stylish__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-stylish__avatar" })] }), _jsxs("div", { className: "tpl-stylish__body", "data-layout": "row", children: [_jsxs("aside", { className: "tpl-stylish__aside", "data-flow": true, children: [_jsx(DescribedEntries, { id: "achievements", heading: resume.section_headings?.achievements, title: doc.t.sections.achievements, className: "tpl-stylish__section tpl-described--marked", headingClassName: "tpl-stylish__heading", items: resume.achievements, entryClassName: "tpl-stylish__described" }), _jsx(CustomSections, { sections: resume.custom_sections, sectionClass: "tpl-stylish__section", headingClass: "tpl-stylish__heading", Entry: StylishCustomEntry }), (resume.skills.length > 0 || authoring) && (_jsx(DocumentSection, { id: "skills", heading: resume.section_headings?.skills, title: doc.t.sections.skills, className: "tpl-stylish__section", headingClassName: "tpl-stylish__heading", children: _jsx("div", { className: "tpl-keywords tpl-keywords--boxed", "data-block": true, "data-split": true, children: _jsx(Collection, { section: "skills", items: resume.skills, noun: "skill", gap: false, children: ({ item, path }) => (_jsx(BulletSkillGroup, { item: item, path: path })) }) }) })), _jsx(DescribedEntries, { id: "courses", heading: resume.section_headings?.courses, title: doc.t.sections.courses, className: "tpl-stylish__section", headingClassName: "tpl-stylish__heading", items: resume.courses, entryClassName: "tpl-stylish__described" }), resume.certifications.length > 0 && (_jsx(DocumentSection, { id: "certifications", heading: resume.section_headings?.certifications, title: doc.t.sections.certifications, className: "tpl-stylish__section", headingClassName: "tpl-stylish__heading", children: _jsx("div", { "data-block": true, "data-split": true, children: _jsx(EditableBulletList, { path: "certifications", items: resume.certifications, placeholder: placeholder('certification') }) }) })), _jsx(DescribedEntries, { id: "passions", heading: resume.section_headings?.passions, title: doc.t.sections.passions, className: "tpl-stylish__section tpl-described--marked", headingClassName: "tpl-stylish__heading", items: resume.passions, entryClassName: "tpl-stylish__described" })] }), _jsxs("div", { className: "tpl-stylish__main", "data-flow": true, children: [(resume.summary || authoring) && (_jsx(DocumentSection, { id: "summary", heading: resume.section_headings?.summary, title: doc.t.sections.summary, className: "tpl-stylish__section", headingClassName: "tpl-stylish__heading", children: _jsx("p", { className: "tpl-stylish__prose", "data-block": true, children: _jsx(EditableText, { path: "summary", value: resume.summary ?? '', placeholder: placeholder('summary'), multiline: true }) }) })), (resume.experience.length > 0 || authoring) && (_jsx(DocumentSection, { id: "experience", heading: resume.section_headings?.experience, title: doc.t.sections.experience, className: "tpl-stylish__section", headingClassName: "tpl-stylish__heading", children: _jsx(Collection, { section: "experience", items: resume.experience, children: ({ item, path, chrome, itemProps }) => (_jsx(StylishExperienceEntry, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) })), (resume.education.length > 0 || authoring) && (_jsx(DocumentSection, { id: "education", heading: resume.section_headings?.education, title: doc.t.sections.education, className: "tpl-stylish__section", headingClassName: "tpl-stylish__heading", children: _jsx(Collection, { section: "education", items: resume.education, children: ({ item, path, chrome, itemProps }) => (_jsx(StylishEducationEntry, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) })), _jsx(LanguageList, { items: resume.languages, heading: resume.section_headings?.languages, className: "tpl-stylish__section", headingClassName: "tpl-stylish__heading", rowClassName: "tpl-stylish__language" })] })] })] }));
29
29
  }
@@ -266,23 +266,14 @@
266
266
  color: var(--st-body);
267
267
  }
268
268
 
269
- /* Skills as each group's category over its underlined tags — the shape is
270
- `kit/skill-tags.css` and `kit/keywords.css`; this template states the
271
- measures of its reference. */
272
- .tpl-stylish .tpl-skill-tags {
273
- --tpl-skill-tags-label-ink: var(--st-accent);
274
- --tpl-skill-tags-label-size: 1.12em;
275
- --tpl-skill-tags-label-gap: 0.94em;
276
- --tpl-skill-tags-rhythm: 1.6em;
277
- }
278
-
269
+ /* Skills as boxed keywords, as the reference draws them: a thin box around
270
+ each skill, packed to the column — the shape is `kit/keywords.css`
271
+ (`tpl-keywords--boxed`); this template states its colour and measures. */
279
272
  .tpl-stylish .tpl-keywords {
280
- --tpl-keyword-ink: var(--st-ink);
281
- --tpl-keyword-weight: 400;
282
- --tpl-keyword-pad: 0.59em;
283
- --tpl-keyword-span: 0.78em;
284
- --tpl-keyword-gap: 1.12em;
285
- --tpl-keyword-lead: 0.11em;
273
+ --tpl-keyword-line: #b9bdc3;
274
+ --tpl-keyword-gap: calc(5pt * var(--st-scale));
275
+ --tpl-keyword-lead: calc(2.5pt * var(--st-scale));
276
+ color: var(--st-ink);
286
277
  }
287
278
 
288
279
  /*
@@ -1 +1 @@
1
- {"version":3,"file":"TimelineDocument.d.ts","sourceRoot":"","sources":["../../../src/templates/timeline/TimelineDocument.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAuBtD,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,+BA0NjE"}
1
+ {"version":3,"file":"TimelineDocument.d.ts","sourceRoot":"","sources":["../../../src/templates/timeline/TimelineDocument.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAuBtD,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,+BA0OjE"}
@@ -23,5 +23,9 @@ export function TimelineDocument({ resume }) {
23
23
  const style = useDocumentStyle();
24
24
  const authoring = useAuthoring() !== null;
25
25
  const contact = useContactLines(resume.contact, ['phone', 'email', 'location'], authoring);
26
- return (_jsxs("article", { className: "tpl-timeline", style: documentStyle('tl', style), ...documentStyleAttributes(style), "aria-label": doc.t.resume, lang: doc.locale, children: [_jsxs("header", { className: "tpl-timeline__head-block", "data-block": true, children: [_jsx(Heading, { level: 1, className: "tpl-timeline__name", children: _jsx(EditableText, { path: "name", value: resume.name }) }), (resume.headline || authoring) && (_jsx("p", { className: "tpl-timeline__headline", children: _jsx(EditableText, { path: "headline", value: resume.headline ?? '', placeholder: placeholder('headline') }) })), (contact.length > 0 || resume.links.length > 0 || authoring) && (_jsxs("p", { className: "tpl-timeline__contact tpl-contact-icons", children: [contact.map(({ field, path, value, placeholder }) => (_jsx("span", { className: `tpl-timeline__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("span", { className: "tpl-timeline__contact-item tpl-contact--link", children: _jsxs("span", { ...itemProps, children: [chrome, _jsx(LinkField, { item: item, path: path, justAdded: justAdded })] }) })) })] }))] }), (resume.summary || authoring) && (_jsx(DocumentSection, { id: "summary", heading: resume.section_headings?.summary, title: doc.t.sections.summary, className: "tpl-timeline__section", headingClassName: "tpl-timeline__heading", children: _jsx("p", { className: "tpl-timeline__prose", "data-block": true, children: _jsx(EditableText, { path: "summary", value: resume.summary ?? '', placeholder: placeholder('summary'), multiline: true }) }) })), (resume.experience.length > 0 || authoring) && (_jsx(DocumentSection, { id: "experience", heading: resume.section_headings?.experience, title: doc.t.sections.experience, className: "tpl-timeline__section", headingClassName: "tpl-timeline__heading", children: _jsx(Collection, { section: "experience", items: resume.experience, children: ({ item, path, chrome, itemProps }) => (_jsx(TimelineExperienceEntry, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) })), (resume.education.length > 0 || authoring) && (_jsx(DocumentSection, { id: "education", heading: resume.section_headings?.education, title: doc.t.sections.education, className: "tpl-timeline__section", headingClassName: "tpl-timeline__heading", children: _jsx(Collection, { section: "education", items: resume.education, children: ({ item, path, chrome, itemProps }) => (_jsx(TimelineEducationEntry, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) })), _jsx(DescribedEntries, { id: "achievements", heading: resume.section_headings?.achievements, title: doc.t.sections.achievements, className: "tpl-timeline__section tpl-described--marked tpl-described--grid", headingClassName: "tpl-timeline__heading", items: resume.achievements, entryClassName: "tpl-timeline__described" }), _jsx(CustomSections, { sections: resume.custom_sections, sectionClass: "tpl-timeline__section", headingClass: "tpl-timeline__heading", Entry: TimelineCustomEntry }), (resume.skills.length > 0 || authoring) && (_jsx(DocumentSection, { id: "skills", heading: resume.section_headings?.skills, title: doc.t.sections.skills, className: "tpl-timeline__section", headingClassName: "tpl-timeline__heading", children: _jsx("div", { className: "tpl-keywords tpl-keywords--tags", "data-block": true, "data-split": true, children: _jsx(Collection, { section: "skills", items: resume.skills, noun: "skill", gap: false, children: ({ item, path }) => _jsx(BulletSkillGroup, { item: item, path: path }) }) }) })), _jsx(DescribedEntries, { id: "courses", heading: resume.section_headings?.courses, title: doc.t.sections.courses, className: "tpl-timeline__section", headingClassName: "tpl-timeline__heading", items: resume.courses, entryClassName: "tpl-timeline__described" }), _jsx(LanguageList, { items: resume.languages, heading: resume.section_headings?.languages, className: "tpl-timeline__section", headingClassName: "tpl-timeline__heading", rowClassName: "tpl-timeline__language" }), resume.certifications.length > 0 && (_jsx(DocumentSection, { id: "certifications", heading: resume.section_headings?.certifications, title: doc.t.sections.certifications, className: "tpl-timeline__section", headingClassName: "tpl-timeline__heading", children: _jsx("div", { "data-block": true, "data-split": true, children: _jsx(EditableBulletList, { path: "certifications", items: resume.certifications, placeholder: placeholder('certification') }) }) })), _jsx(DescribedEntries, { id: "passions", heading: resume.section_headings?.passions, title: doc.t.sections.passions, className: "tpl-timeline__section tpl-described--marked", headingClassName: "tpl-timeline__heading", items: resume.passions, entryClassName: "tpl-timeline__described" })] }));
26
+ return (_jsxs("article", { className: "tpl-timeline", style: documentStyle('tl', style), ...documentStyleAttributes(style), "aria-label": doc.t.resume, lang: doc.locale, children: [_jsxs("header", { className: "tpl-timeline__head-block", "data-block": true, children: [_jsx(Heading, { level: 1, className: "tpl-timeline__name", children: _jsx(EditableText, { path: "name", value: resume.name }) }), (resume.headline || authoring) && (_jsx("p", { className: "tpl-timeline__headline", children: _jsx(EditableText, { path: "headline", value: resume.headline ?? '', placeholder: placeholder('headline') }) })), (contact.length > 0 || resume.links.length > 0 || authoring) && (_jsxs("p", { className: "tpl-timeline__contact tpl-contact-icons", children: [contact
27
+ .filter(({ field }) => ['phone', 'email'].includes(field))
28
+ .map(({ field, path, value, placeholder }) => (_jsx("span", { className: `tpl-timeline__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("span", { className: "tpl-timeline__contact-item tpl-contact--link", children: _jsxs("span", { ...itemProps, children: [chrome, _jsx(LinkField, { item: item, path: path, justAdded: justAdded })] }) })) }), contact
29
+ .filter(({ field }) => ['location'].includes(field))
30
+ .map(({ field, path, value, placeholder }) => (_jsx("span", { className: `tpl-timeline__contact-item tpl-contact--${field}`, children: _jsx(EditableText, { path: path, value: value, placeholder: placeholder }) }, path)))] }))] }), (resume.summary || authoring) && (_jsx(DocumentSection, { id: "summary", heading: resume.section_headings?.summary, title: doc.t.sections.summary, className: "tpl-timeline__section", headingClassName: "tpl-timeline__heading", children: _jsx("p", { className: "tpl-timeline__prose", "data-block": true, children: _jsx(EditableText, { path: "summary", value: resume.summary ?? '', placeholder: placeholder('summary'), multiline: true }) }) })), (resume.experience.length > 0 || authoring) && (_jsx(DocumentSection, { id: "experience", heading: resume.section_headings?.experience, title: doc.t.sections.experience, className: "tpl-timeline__section", headingClassName: "tpl-timeline__heading", children: _jsx(Collection, { section: "experience", items: resume.experience, children: ({ item, path, chrome, itemProps }) => (_jsx(TimelineExperienceEntry, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) })), (resume.education.length > 0 || authoring) && (_jsx(DocumentSection, { id: "education", heading: resume.section_headings?.education, title: doc.t.sections.education, className: "tpl-timeline__section", headingClassName: "tpl-timeline__heading", children: _jsx(Collection, { section: "education", items: resume.education, children: ({ item, path, chrome, itemProps }) => (_jsx(TimelineEducationEntry, { item: item, path: path, chrome: chrome, itemProps: itemProps })) }) })), _jsx(DescribedEntries, { id: "achievements", heading: resume.section_headings?.achievements, title: doc.t.sections.achievements, className: "tpl-timeline__section tpl-described--marked tpl-described--grid", headingClassName: "tpl-timeline__heading", items: resume.achievements, entryClassName: "tpl-timeline__described" }), _jsx(CustomSections, { sections: resume.custom_sections, sectionClass: "tpl-timeline__section", headingClass: "tpl-timeline__heading", Entry: TimelineCustomEntry }), (resume.skills.length > 0 || authoring) && (_jsx(DocumentSection, { id: "skills", heading: resume.section_headings?.skills, title: doc.t.sections.skills, className: "tpl-timeline__section", headingClassName: "tpl-timeline__heading", children: _jsx("div", { className: "tpl-keywords tpl-keywords--tags", "data-block": true, "data-split": true, children: _jsx(Collection, { section: "skills", items: resume.skills, noun: "skill", gap: false, children: ({ item, path }) => _jsx(BulletSkillGroup, { item: item, path: path }) }) }) })), _jsx(DescribedEntries, { id: "courses", heading: resume.section_headings?.courses, title: doc.t.sections.courses, className: "tpl-timeline__section", headingClassName: "tpl-timeline__heading", items: resume.courses, entryClassName: "tpl-timeline__described" }), _jsx(LanguageList, { items: resume.languages, heading: resume.section_headings?.languages, className: "tpl-timeline__section", headingClassName: "tpl-timeline__heading", rowClassName: "tpl-timeline__language" }), resume.certifications.length > 0 && (_jsx(DocumentSection, { id: "certifications", heading: resume.section_headings?.certifications, title: doc.t.sections.certifications, className: "tpl-timeline__section", headingClassName: "tpl-timeline__heading", children: _jsx("div", { "data-block": true, "data-split": true, children: _jsx(EditableBulletList, { path: "certifications", items: resume.certifications, placeholder: placeholder('certification') }) }) })), _jsx(DescribedEntries, { id: "passions", heading: resume.section_headings?.passions, title: doc.t.sections.passions, className: "tpl-timeline__section tpl-described--marked", headingClassName: "tpl-timeline__heading", items: resume.passions, entryClassName: "tpl-timeline__described" })] }));
27
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resumekit/react",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Editable, paginated resume templates for React: about thirty print-accurate designs, an in-place editing kit, a static renderer and a self-contained export bundle.",
5
5
  "keywords": [
6
6
  "resume",
@@ -57,7 +57,7 @@
57
57
  "@dnd-kit/core": "^6.3.1",
58
58
  "@dnd-kit/modifiers": "^9.0.0",
59
59
  "@dnd-kit/sortable": "^10.0.0",
60
- "@resumekit/schema": "^0.2.0"
60
+ "@resumekit/schema": "^0.4.0"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "react": "^19.0.0",
@@ -566,11 +566,22 @@ function emitLayout(c: Ctx, n: LayoutNode, flow = false): string {
566
566
  : []),
567
567
  ...(n.icons ? ['tpl-contact-icons'] : []),
568
568
  ].join(' ');
569
+ /* The details in their order; with `linksAt`, the links stand between
570
+ the fields before it and the fields after it. */
571
+ const details = (only?: string[]) =>
572
+ `{${v}${only ? `.filter(({ field }) => ${JSON.stringify(only).replace(/"/g, "'")}.includes(field))` : ''}.map(({ ${n.item ? 'field, ' : ''}path, value, placeholder }) => (\n${each}\n))}\n`;
573
+ const at = n.linksAt;
574
+ const body =
575
+ at !== undefined && at < n.fields.length
576
+ ? details(n.fields.slice(0, at)) +
577
+ `${links}\n` +
578
+ details(n.fields.slice(at))
579
+ : details() + `${links}\n`;
569
580
  return (
570
581
  `{${contactCondition(c, n)} && (\n` +
571
582
  `<${n.tag} className=${q(own)}${n.block ? ' data-block' : ''}>\n` +
572
- `{${v}.map(({ ${n.item ? 'field, ' : ''}path, value, placeholder }) => (\n${each}\n))}\n` +
573
- `${links}\n</${n.tag}>\n)}`
583
+ body +
584
+ `</${n.tag}>\n)}`
574
585
  );
575
586
  }
576
587
  case 'links':
@@ -389,6 +389,9 @@ export type LayoutNode =
389
389
  kind: 'contact';
390
390
  fields: z.infer<typeof ContactField>[];
391
391
  links: boolean;
392
+ /** Where the links print among the fields: the index of the field they
393
+ * come before. After every field when absent. */
394
+ linksAt?: number;
392
395
  tag: 'p' | 'div';
393
396
  class: string;
394
397
  /** The class of the element around each detail; `false` for none. */
@@ -440,6 +443,17 @@ function withKind(node: unknown): unknown {
440
443
  }
441
444
  if ('contact' in o) {
442
445
  const { contact, ...rest } = o;
446
+ /* `links` standing among the fields places the links there, and is the
447
+ same as `links: true` otherwise. */
448
+ if (Array.isArray(contact) && contact.includes('links')) {
449
+ return {
450
+ kind: 'contact',
451
+ fields: contact.filter((f) => f !== 'links'),
452
+ links: true,
453
+ linksAt: contact.indexOf('links'),
454
+ ...rest,
455
+ };
456
+ }
443
457
  return { kind: 'contact', fields: contact, ...rest };
444
458
  }
445
459
  if ('links' in o && !('contact' in o)) {
@@ -515,6 +529,7 @@ export const LayoutNodeSchema: z.ZodType<LayoutNode, unknown> = z.lazy(() =>
515
529
  kind: z.literal('contact'),
516
530
  fields: z.array(ContactField).min(1),
517
531
  links: z.boolean().default(false),
532
+ linksAt: z.number().int().min(0).optional(),
518
533
  tag: z.enum(['p', 'div']).default('p'),
519
534
  class: ClassName.default('contact'),
520
535
  item: z.union([ClassName, z.literal(false)]).default('contact-item'),
@@ -39,23 +39,29 @@ function LevelChoice({ path, value }: { path: string; value: string }) {
39
39
 
40
40
  return (
41
41
  <>
42
- {editing ? (
43
- <select
44
- className="tpl-language__choice"
45
- value={live}
46
- aria-label={t.language.level}
47
- onChange={(e) => set(e.target.value)}
48
- >
49
- <option value="">{t.language.choose}</option>
50
- {LANGUAGE_LEVELS.map((level) => (
51
- <option key={level} value={level}>
52
- {levels[level]}
53
- </option>
54
- ))}
55
- </select>
56
- ) : (
57
- <span className="tpl-language__level">{word}</span>
58
- )}
42
+ {/* The control sits INSIDE the word's box rather than replacing it, so
43
+ whatever a template draws around the level — Harvard's parentheses,
44
+ a colour, a column — is drawn around the control too, and editing
45
+ the document shows the line it prints. */}
46
+ <span className="tpl-language__level">
47
+ {editing ? (
48
+ <select
49
+ className="tpl-language__choice"
50
+ value={live}
51
+ aria-label={t.language.level}
52
+ onChange={(e) => set(e.target.value)}
53
+ >
54
+ <option value="">{t.language.choose}</option>
55
+ {LANGUAGE_LEVELS.map((level) => (
56
+ <option key={level} value={level}>
57
+ {levels[level]}
58
+ </option>
59
+ ))}
60
+ </select>
61
+ ) : (
62
+ word
63
+ )}
64
+ </span>
59
65
 
60
66
  {word && (
61
67
  <span className="tpl-language__meter" aria-hidden="true">
@@ -54,6 +54,11 @@ export function documentStyle(
54
54
  ),
55
55
  }
56
56
  : {}),
57
+ ...(style.nameSize ? { '--rk-name-size': String(style.nameSize) } : {}),
58
+ ...(style.headingSize
59
+ ? { '--rk-heading-size': String(style.headingSize) }
60
+ : {}),
61
+ ...(style.bodySize ? { '--rk-body-size': String(style.bodySize) } : {}),
57
62
  } as CSSProperties;
58
63
  }
59
64
 
@@ -76,5 +81,8 @@ export function documentStyleAttributes(
76
81
  ...(style.headingWeight && {
77
82
  'data-rk-heading-weight': style.headingWeight,
78
83
  }),
84
+ ...(style.nameSize && { 'data-rk-name-size': '' }),
85
+ ...(style.headingSize && { 'data-rk-heading-size': '' }),
86
+ ...(style.bodySize && { 'data-rk-body-size': '' }),
79
87
  };
80
88
  }
@@ -201,7 +201,11 @@ export function CompactDocument({ resume }: CompactDocumentProps) {
201
201
  className="tpl-compact__section"
202
202
  headingClassName="tpl-compact__heading"
203
203
  >
204
- <div className="tpl-keywords" data-block data-split>
204
+ <div
205
+ className="tpl-keywords tpl-keywords--tags"
206
+ data-block
207
+ data-split
208
+ >
205
209
  <Collection
206
210
  section="skills"
207
211
  items={resume.skills}
@@ -74,18 +74,20 @@ export function CreativeDocument({ resume }: CreativeDocumentProps) {
74
74
 
75
75
  {(contact.length > 0 || resume.links.length > 0 || authoring) && (
76
76
  <p className="tpl-creative__contact tpl-contact-icons">
77
- {contact.map(({ field, path, value, placeholder }) => (
78
- <span
79
- key={path}
80
- className={`tpl-creative__contact-item tpl-contact--${field}`}
81
- >
82
- <EditableText
83
- path={path}
84
- value={value}
85
- placeholder={placeholder}
86
- />
87
- </span>
88
- ))}
77
+ {contact
78
+ .filter(({ field }) => ['phone', 'email'].includes(field))
79
+ .map(({ field, path, value, placeholder }) => (
80
+ <span
81
+ key={path}
82
+ className={`tpl-creative__contact-item tpl-contact--${field}`}
83
+ >
84
+ <EditableText
85
+ path={path}
86
+ value={value}
87
+ placeholder={placeholder}
88
+ />
89
+ </span>
90
+ ))}
89
91
  <Collection
90
92
  section="links"
91
93
  items={resume.links}
@@ -105,6 +107,20 @@ export function CreativeDocument({ resume }: CreativeDocumentProps) {
105
107
  </span>
106
108
  )}
107
109
  </Collection>
110
+ {contact
111
+ .filter(({ field }) => ['location'].includes(field))
112
+ .map(({ field, path, value, placeholder }) => (
113
+ <span
114
+ key={path}
115
+ className={`tpl-creative__contact-item tpl-contact--${field}`}
116
+ >
117
+ <EditableText
118
+ path={path}
119
+ value={value}
120
+ placeholder={placeholder}
121
+ />
122
+ </span>
123
+ ))}
108
124
  </p>
109
125
  )}
110
126
  </div>