jsonresume-theme-sales-hunter 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # jsonresume-theme-sales-hunter
2
2
 
3
+ ## 0.2.4
4
+
5
+ ### Patch Changes
6
+
7
+ - @jsonresume/core@0.3.2
8
+
9
+ ## 0.2.3
10
+
11
+ ### Patch Changes
12
+
13
+ - 8973d5a: use @jsonresume/core/ssr renderResumeDocument
14
+ - Updated dependencies [ff09f75]
15
+ - @jsonresume/core@0.3.1
16
+
3
17
  ## 0.2.2
4
18
 
5
19
  ### Patch Changes
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ :root{--resume-font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;--resume-font-serif: Cambria, Georgia, "Times New Roman", serif;--resume-font-mono: "Courier New", Courier, monospace;--resume-size-name: 36px;--resume-size-heading: 16px;--resume-size-subheading: 14px;--resume-size-body: 11px;--resume-size-small: 10px;--resume-weight-normal: 400;--resume-weight-medium: 500;--resume-weight-semibold: 600;--resume-weight-bold: 700;--resume-line-height-tight: 1.2;--resume-line-height-normal: 1.5;--resume-line-height-relaxed: 1.75;--resume-color-primary: #1a1a1a;--resume-color-secondary: #4a4a4a;--resume-color-accent: #2563eb;--resume-color-background: #ffffff;--resume-color-border: #e5e7eb;--resume-space-section: 24px;--resume-space-item: 16px;--resume-space-tight: 8px;--resume-space-margin: 48px;--resume-max-width: 660px;--resume-column-gap: 24px;--resume-radius-sm: 4px;--resume-radius-md: 8px;--resume-radius-lg: 12px;--resume-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, .05);--resume-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1)}[data-theme=modern]{--resume-color-primary: #0f172a;--resume-color-secondary: #475569;--resume-color-accent: #8b5cf6;--resume-font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif}[data-theme=classic]{--resume-color-primary: #000000;--resume-color-secondary: #333333;--resume-color-accent: #0066cc;--resume-font-sans: Georgia, "Times New Roman", serif}[data-theme=minimal]{--resume-color-primary: #18181b;--resume-color-secondary: #71717a;--resume-color-accent: #000000;--resume-space-section: 32px;--resume-space-item: 20px}[data-theme=high-contrast]{--resume-color-primary: #000000;--resume-color-secondary: #000000;--resume-color-accent: #0000ff;--resume-color-background: #ffffff;--resume-color-border: #000000}@media print{:root{--resume-space-section: 18px;--resume-space-item: 12px}@page{size:A4;margin:.5in}.resume-section{page-break-inside:avoid}.resume-item{break-inside:avoid}p,li{widows:3;orphans:3}.resume-description{hyphens:auto}.no-print{display:none!important}}[dir=rtl]{text-align:right}[dir=rtl] .resume-item{padding-left:0;padding-right:var(--resume-space-tight)}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { renderToStaticMarkup } from "react-dom/server";
2
3
  import o, { useRef, useContext, useState, useMemo, useEffect, useDebugValue, createElement, createContext } from "react";
3
- import { renderToString } from "react-dom/server";
4
4
  var __assign = function() {
5
5
  __assign = Object.assign || function __assign2(t) {
6
6
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -41,38 +41,46 @@ var isPropValid = /* @__PURE__ */ memoize(
41
41
  function getDefaultExportFromCjs(x2) {
42
42
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
43
43
  }
44
- var shallowequal = function shallowEqual(objA, objB, compare, compareContext) {
45
- var ret = compare ? compare.call(compareContext, objA, objB) : void 0;
46
- if (ret !== void 0) {
47
- return !!ret;
48
- }
49
- if (objA === objB) {
50
- return true;
51
- }
52
- if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) {
53
- return false;
54
- }
55
- var keysA = Object.keys(objA);
56
- var keysB = Object.keys(objB);
57
- if (keysA.length !== keysB.length) {
58
- return false;
59
- }
60
- var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
61
- for (var idx = 0; idx < keysA.length; idx++) {
62
- var key = keysA[idx];
63
- if (!bHasOwnProperty(key)) {
44
+ var shallowequal;
45
+ var hasRequiredShallowequal;
46
+ function requireShallowequal() {
47
+ if (hasRequiredShallowequal) return shallowequal;
48
+ hasRequiredShallowequal = 1;
49
+ shallowequal = function shallowEqual(objA, objB, compare, compareContext) {
50
+ var ret = compare ? compare.call(compareContext, objA, objB) : void 0;
51
+ if (ret !== void 0) {
52
+ return !!ret;
53
+ }
54
+ if (objA === objB) {
55
+ return true;
56
+ }
57
+ if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) {
64
58
  return false;
65
59
  }
66
- var valueA = objA[key];
67
- var valueB = objB[key];
68
- ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;
69
- if (ret === false || ret === void 0 && valueA !== valueB) {
60
+ var keysA = Object.keys(objA);
61
+ var keysB = Object.keys(objB);
62
+ if (keysA.length !== keysB.length) {
70
63
  return false;
71
64
  }
72
- }
73
- return true;
74
- };
75
- const p = /* @__PURE__ */ getDefaultExportFromCjs(shallowequal);
65
+ var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
66
+ for (var idx = 0; idx < keysA.length; idx++) {
67
+ var key = keysA[idx];
68
+ if (!bHasOwnProperty(key)) {
69
+ return false;
70
+ }
71
+ var valueA = objA[key];
72
+ var valueB = objB[key];
73
+ ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;
74
+ if (ret === false || ret === void 0 && valueA !== valueB) {
75
+ return false;
76
+ }
77
+ }
78
+ return true;
79
+ };
80
+ return shallowequal;
81
+ }
82
+ var shallowequalExports = requireShallowequal();
83
+ const p = /* @__PURE__ */ getDefaultExportFromCjs(shallowequalExports);
76
84
  var MS = "-ms-";
77
85
  var MOZ = "-moz-";
78
86
  var WEBKIT = "-webkit-";
@@ -100,8 +108,8 @@ function replace(value, pattern, replacement) {
100
108
  function indexof(value, search, position2) {
101
109
  return value.indexOf(search, position2);
102
110
  }
103
- function charat(value, index) {
104
- return value.charCodeAt(index) | 0;
111
+ function charat(value, index2) {
112
+ return value.charCodeAt(index2) | 0;
105
113
  }
106
114
  function substr(value, begin, end) {
107
115
  return value.slice(begin, end);
@@ -219,11 +227,11 @@ function whitespace(type) {
219
227
  break;
220
228
  return token(type) > 2 || token(character) > 3 ? "" : " ";
221
229
  }
222
- function escaping(index, count) {
230
+ function escaping(index2, count) {
223
231
  while (--count && next())
224
232
  if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
225
233
  break;
226
- return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
234
+ return slice(index2, caret() + (count < 6 && peek() == 32 && next() == 32));
227
235
  }
228
236
  function delimiter(type) {
229
237
  while (next())
@@ -249,24 +257,24 @@ function delimiter(type) {
249
257
  }
250
258
  return position;
251
259
  }
252
- function commenter(type, index) {
260
+ function commenter(type, index2) {
253
261
  while (next())
254
262
  if (type + character === 47 + 10)
255
263
  break;
256
264
  else if (type + character === 42 + 42 && peek() === 47)
257
265
  break;
258
- return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next());
266
+ return "/*" + slice(index2, position - 1) + "*" + from(type === 47 ? type : next());
259
267
  }
260
- function identifier(index) {
268
+ function identifier(index2) {
261
269
  while (!token(peek()))
262
270
  next();
263
- return slice(index, position);
271
+ return slice(index2, position);
264
272
  }
265
273
  function compile(value) {
266
274
  return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
267
275
  }
268
276
  function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
269
- var index = 0;
277
+ var index2 = 0;
270
278
  var offset = 0;
271
279
  var length2 = pseudo;
272
280
  var atrule = 0;
@@ -286,7 +294,7 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
286
294
  // (
287
295
  case 40:
288
296
  if (previous != 108 && charat(characters2, length2 - 1) == 58) {
289
- if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f", abs(index ? points[index - 1] : 0)) != -1)
297
+ if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f", abs(index2 ? points[index2 - 1] : 0)) != -1)
290
298
  ampersand = -1;
291
299
  break;
292
300
  }
@@ -320,7 +328,7 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
320
328
  break;
321
329
  // {
322
330
  case 123 * variable:
323
- points[index++] = strlen(characters2) * ampersand;
331
+ points[index2++] = strlen(characters2) * ampersand;
324
332
  // } ; \0
325
333
  case 125 * variable:
326
334
  case 59:
@@ -341,7 +349,7 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
341
349
  characters2 += ";";
342
350
  // { rule/at-rule
343
351
  default:
344
- append(reference = ruleset(characters2, root, parent, index, offset, rules, points, type, props = [], children = [], length2, rulesets), rulesets);
352
+ append(reference = ruleset(characters2, root, parent, index2, offset, rules, points, type, props = [], children = [], length2, rulesets), rulesets);
345
353
  if (character2 === 123)
346
354
  if (offset === 0)
347
355
  parse(characters2, root, reference, reference, props, rulesets, length2, points, children);
@@ -358,7 +366,7 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
358
366
  parse(characters2, reference, reference, reference, [""], children, 0, points, children);
359
367
  }
360
368
  }
361
- index = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
369
+ index2 = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
362
370
  break;
363
371
  // :
364
372
  case 58:
@@ -377,7 +385,7 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
377
385
  break;
378
386
  // ,
379
387
  case 44:
380
- points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
388
+ points[index2++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
381
389
  break;
382
390
  // @
383
391
  case 64:
@@ -393,11 +401,11 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
393
401
  }
394
402
  return rulesets;
395
403
  }
396
- function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length2, siblings) {
404
+ function ruleset(value, root, parent, index2, offset, rules, points, type, props, children, length2, siblings) {
397
405
  var post = offset - 1;
398
406
  var rule = offset === 0 ? rules : [""];
399
407
  var size = sizeof(rule);
400
- for (var i = 0, j2 = 0, k2 = 0; i < index; ++i)
408
+ for (var i = 0, j2 = 0, k2 = 0; i < index2; ++i)
401
409
  for (var x2 = 0, y2 = substr(value, post + 1, post = abs(j2 = points[i])), z2 = value; x2 < size; ++x2)
402
410
  if (z2 = trim(j2 > 0 ? rule[x2] + " " + y2 : replace(y2, /&\f/g, rule[x2])))
403
411
  props[k2++] = z2;
@@ -517,8 +525,8 @@ function prefix(value, length2, children) {
517
525
  // grid-(row|column)-start
518
526
  case 4384:
519
527
  case 3616:
520
- if (children && children.some(function(element, index) {
521
- return length2 = index, match(element.props, /grid-\w+-end/);
528
+ if (children && children.some(function(element, index2) {
529
+ return length2 = index2, match(element.props, /grid-\w+-end/);
522
530
  })) {
523
531
  return ~indexof(value + (children = children[length2].value), "span", 0) ? value : MS + replace(value, "-start", "") + value + MS + "grid-row-span:" + (~indexof(children, "span", 0) ? match(children, /\d+/) : +match(children, /\d+/) - +match(value, /\d+/)) + ";";
524
532
  }
@@ -600,7 +608,7 @@ function serialize(children, callback) {
600
608
  output += callback(children[i], i, children, callback) || "";
601
609
  return output;
602
610
  }
603
- function stringify(element, index, children, callback) {
611
+ function stringify(element, index2, children, callback) {
604
612
  switch (element.type) {
605
613
  case LAYER:
606
614
  if (element.children.length) break;
@@ -618,10 +626,10 @@ function stringify(element, index, children, callback) {
618
626
  }
619
627
  function middleware(collection) {
620
628
  var length2 = sizeof(collection);
621
- return function(element, index, children, callback) {
629
+ return function(element, index2, children, callback) {
622
630
  var output = "";
623
631
  for (var i = 0; i < length2; i++)
624
- output += collection[i](element, index, children, callback) || "";
632
+ output += collection[i](element, index2, children, callback) || "";
625
633
  return output;
626
634
  };
627
635
  }
@@ -633,7 +641,7 @@ function rulesheet(callback) {
633
641
  }
634
642
  };
635
643
  }
636
- function prefixer(element, index, children, callback) {
644
+ function prefixer(element, index2, children, callback) {
637
645
  if (element.length > -1) {
638
646
  if (!element.return)
639
647
  switch (element.type) {
@@ -1300,6 +1308,66 @@ var vt = /^\s*<\/[a-z]/i, gt = (function() {
1300
1308
  "production" !== process.env.NODE_ENV && "undefined" != typeof navigator && "ReactNative" === navigator.product && console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");
1301
1309
  var wt = "__sc-".concat(f, "__");
1302
1310
  "production" !== process.env.NODE_ENV && "test" !== process.env.NODE_ENV && "undefined" != typeof window && (window[wt] || (window[wt] = 0), 1 === window[wt] && console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."), window[wt] += 1);
1311
+ const CSS_RESET = "<style>*,*::before,*::after{box-sizing:border-box}html,body{margin:0;padding:0}body{-webkit-font-smoothing:antialiased}</style>";
1312
+ const TOKENS_CSS_HREF = "https://unpkg.com/@jsonresume/core/dist/tokens.css";
1313
+ const FONTS_PRECONNECT = '<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>';
1314
+ function isHref(value) {
1315
+ return /^(https?:)?\/\//.test(value) || value.trim().startsWith("<link");
1316
+ }
1317
+ function familyParam(family) {
1318
+ const [name, ...rest] = String(family).split(":");
1319
+ const encodedName = name.trim().replace(/\s+/g, "+");
1320
+ return rest.length ? `${encodedName}:${rest.join(":")}` : encodedName;
1321
+ }
1322
+ function googleFontsLinks(families) {
1323
+ if (!Array.isArray(families) || families.length === 0) return "";
1324
+ const passthrough = [];
1325
+ const names = [];
1326
+ for (const entry of families) {
1327
+ if (entry == null || entry === "") continue;
1328
+ if (isHref(entry)) passthrough.push(entry);
1329
+ else names.push(entry);
1330
+ }
1331
+ const links = passthrough.map(
1332
+ (href) => href.trim().startsWith("<link") ? href : `<link href="${href}" rel="stylesheet">`
1333
+ );
1334
+ if (names.length > 0) {
1335
+ const query = names.map(familyParam).join("&family=");
1336
+ links.unshift(
1337
+ `<link href="https://fonts.googleapis.com/css2?family=${query}&display=swap" rel="stylesheet">`
1338
+ );
1339
+ }
1340
+ if (links.length === 0) return "";
1341
+ return FONTS_PRECONNECT + links.join("");
1342
+ }
1343
+ function renderResumeDocument(element, options = {}) {
1344
+ const {
1345
+ fonts,
1346
+ title,
1347
+ lang = "en",
1348
+ dir = "ltr",
1349
+ reset = false,
1350
+ head = "",
1351
+ headAfterStyles = "",
1352
+ includeTokensCss = true,
1353
+ bodyClass
1354
+ } = options;
1355
+ const sheet = new gt();
1356
+ let html;
1357
+ let styleTags;
1358
+ try {
1359
+ html = renderToStaticMarkup(sheet.collectStyles(element));
1360
+ styleTags = sheet.getStyleTags();
1361
+ } finally {
1362
+ sheet.seal();
1363
+ }
1364
+ const fontLinks = googleFontsLinks(fonts);
1365
+ const tokensLink = includeTokensCss ? `<link rel="stylesheet" href="${TOKENS_CSS_HREF}">` : "";
1366
+ const resetTag = reset ? CSS_RESET : "";
1367
+ const titleTag = title ? `<title>${title}</title>` : "";
1368
+ const bodyAttr = bodyClass ? ` class="${bodyClass}"` : "";
1369
+ return `<!DOCTYPE html><html lang="${lang}" dir="${dir}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">` + fontLinks + tokensLink + resetTag + head + styleTags + headAfterStyles + titleTag + `</head><body${bodyAttr}>${html}</body></html>`;
1370
+ }
1303
1371
  createContext({
1304
1372
  theme: "professional",
1305
1373
  setTheme: () => {
@@ -1459,6 +1527,7 @@ function formatDateRange({
1459
1527
  };
1460
1528
  const formatDate = (dateStr) => {
1461
1529
  if (!dateStr) return getPresentLabel();
1530
+ const isDateOnlyIso = typeof dateStr === "string" && /^\d{4}(-\d{2}){0,2}$/.test(dateStr);
1462
1531
  const date = typeof dateStr === "string" ? new Date(dateStr) : dateStr;
1463
1532
  if (isNaN(date.getTime())) return dateStr;
1464
1533
  const monthFormats = {
@@ -1470,6 +1539,9 @@ function formatDateRange({
1470
1539
  ...monthFormats[format],
1471
1540
  year: "numeric"
1472
1541
  };
1542
+ if (isDateOnlyIso) {
1543
+ options.timeZone = "UTC";
1544
+ }
1473
1545
  if (numberingSystem) {
1474
1546
  options.numberingSystem = numberingSystem;
1475
1547
  }
@@ -1477,7 +1549,9 @@ function formatDateRange({
1477
1549
  return formatter.format(date);
1478
1550
  };
1479
1551
  const start = formatDate(startDate);
1480
- if (endDate === void 0) return start;
1552
+ if (endDate === void 0) {
1553
+ return start;
1554
+ }
1481
1555
  const end = formatDate(endDate);
1482
1556
  return `${start} - ${end}`;
1483
1557
  }
@@ -1562,7 +1636,6 @@ function safeUrl(url) {
1562
1636
  const trimmed = url.trim();
1563
1637
  const dangerousProtocols = /^(javascript|data|vbscript|file|about):/i;
1564
1638
  if (dangerousProtocols.test(trimmed)) {
1565
- console.warn(`[Security] Blocked dangerous URL: ${trimmed.slice(0, 50)}`);
1566
1639
  return null;
1567
1640
  }
1568
1641
  const safeProtocols = /^(https?|mailto|tel|sms|ftp):/i;
@@ -1578,7 +1651,6 @@ function safeUrl(url) {
1578
1651
  if (/^[a-z0-9][a-z0-9.-]+\.[a-z]{2,}$/i.test(trimmed)) {
1579
1652
  return `https://${trimmed}`;
1580
1653
  }
1581
- console.warn(`[Security] Uncertain URL safety: ${trimmed.slice(0, 50)}`);
1582
1654
  return trimmed;
1583
1655
  }
1584
1656
  const ContactContainer = dt.div`
@@ -1642,7 +1714,7 @@ function ContactInfo({ basics = {}, separator = "•", className }) {
1642
1714
  ) }, "url")
1643
1715
  );
1644
1716
  }
1645
- profiles.forEach((profile, index) => {
1717
+ profiles.forEach((profile, index2) => {
1646
1718
  if (profile.url) {
1647
1719
  items.push(
1648
1720
  /* @__PURE__ */ jsx(ContactItem, { children: /* @__PURE__ */ jsx(
@@ -1654,15 +1726,15 @@ function ContactInfo({ basics = {}, separator = "•", className }) {
1654
1726
  "aria-label": profile.network,
1655
1727
  children: profile.network || profile.username
1656
1728
  }
1657
- ) }, `profile-${index}`)
1729
+ ) }, `profile-${index2}`)
1658
1730
  );
1659
1731
  }
1660
1732
  });
1661
1733
  if (items.length === 0) return null;
1662
- return /* @__PURE__ */ jsx(ContactContainer, { className: `resume-contact ${className || ""}`.trim(), children: items.map((item, index) => /* @__PURE__ */ jsxs(o.Fragment, { children: [
1663
- index > 0 && /* @__PURE__ */ jsx(Separator, { "aria-hidden": "true", children: separator }),
1734
+ return /* @__PURE__ */ jsx(ContactContainer, { className: `resume-contact ${className || ""}`.trim(), children: items.map((item, index2) => /* @__PURE__ */ jsxs(o.Fragment, { children: [
1735
+ index2 > 0 && /* @__PURE__ */ jsx(Separator, { "aria-hidden": "true", children: separator }),
1664
1736
  item
1665
- ] }, index)) });
1737
+ ] }, index2)) });
1666
1738
  }
1667
1739
  dt.a`
1668
1740
  color: ${(props) => props.theme?.colors?.link || "var(--resume-color-link, #0066cc)"};
@@ -6232,7 +6304,7 @@ function Resume({ resume }) {
6232
6304
  ] }),
6233
6305
  work?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
6234
6306
  /* @__PURE__ */ jsx(StyledSectionTitle, { children: "Experience" }),
6235
- work.map((job, index) => /* @__PURE__ */ jsxs(WorkItem, { children: [
6307
+ work.map((job, index2) => /* @__PURE__ */ jsxs(WorkItem, { children: [
6236
6308
  /* @__PURE__ */ jsxs(WorkHeader, { children: [
6237
6309
  /* @__PURE__ */ jsxs("div", { children: [
6238
6310
  /* @__PURE__ */ jsx(Position, { children: job.position }),
@@ -6250,18 +6322,18 @@ function Resume({ resume }) {
6250
6322
  },
6251
6323
  i
6252
6324
  )) })
6253
- ] }, index))
6325
+ ] }, index2))
6254
6326
  ] }),
6255
6327
  skills?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
6256
6328
  /* @__PURE__ */ jsx(StyledSectionTitle, { children: "Skills" }),
6257
- /* @__PURE__ */ jsx(SkillsGrid, { children: skills.map((skill, index) => /* @__PURE__ */ jsxs(SkillCategory, { children: [
6329
+ /* @__PURE__ */ jsx(SkillsGrid, { children: skills.map((skill, index2) => /* @__PURE__ */ jsxs(SkillCategory, { children: [
6258
6330
  /* @__PURE__ */ jsx(SkillName, { children: skill.name }),
6259
6331
  skill.keywords?.length > 0 && /* @__PURE__ */ jsx(SkillTags, { children: skill.keywords.join(", ") })
6260
- ] }, index)) })
6332
+ ] }, index2)) })
6261
6333
  ] }),
6262
6334
  education?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
6263
6335
  /* @__PURE__ */ jsx(StyledSectionTitle, { children: "Education" }),
6264
- education.map((edu, index) => /* @__PURE__ */ jsxs(EducationItem, { children: [
6336
+ education.map((edu, index2) => /* @__PURE__ */ jsxs(EducationItem, { children: [
6265
6337
  /* @__PURE__ */ jsx(Institution, { children: edu.institution }),
6266
6338
  /* @__PURE__ */ jsxs(Degree, { children: [
6267
6339
  edu.studyType,
@@ -6270,11 +6342,11 @@ function Resume({ resume }) {
6270
6342
  edu.score && ` • ${edu.score}`
6271
6343
  ] }),
6272
6344
  /* @__PURE__ */ jsx(EducationDate, { children: /* @__PURE__ */ jsx(DateRange, { startDate: edu.startDate, endDate: edu.endDate }) })
6273
- ] }, index))
6345
+ ] }, index2))
6274
6346
  ] }),
6275
6347
  projects?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
6276
6348
  /* @__PURE__ */ jsx(StyledSectionTitle, { children: "Projects" }),
6277
- projects.map((project, index) => /* @__PURE__ */ jsxs(WorkItem, { children: [
6349
+ projects.map((project, index2) => /* @__PURE__ */ jsxs(WorkItem, { children: [
6278
6350
  /* @__PURE__ */ jsx(Position, { children: project.name }),
6279
6351
  project.description && /* @__PURE__ */ jsx(WorkSummary, { children: project.description }),
6280
6352
  project.highlights?.length > 0 && /* @__PURE__ */ jsx(Highlights, { children: project.highlights.map((highlight, i) => /* @__PURE__ */ jsx(
@@ -6286,11 +6358,11 @@ function Resume({ resume }) {
6286
6358
  },
6287
6359
  i
6288
6360
  )) })
6289
- ] }, index))
6361
+ ] }, index2))
6290
6362
  ] }),
6291
6363
  volunteer?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
6292
6364
  /* @__PURE__ */ jsx(StyledSectionTitle, { children: "Volunteer" }),
6293
- volunteer.map((vol, index) => /* @__PURE__ */ jsxs(WorkItem, { children: [
6365
+ volunteer.map((vol, index2) => /* @__PURE__ */ jsxs(WorkItem, { children: [
6294
6366
  /* @__PURE__ */ jsxs(WorkHeader, { children: [
6295
6367
  /* @__PURE__ */ jsxs("div", { children: [
6296
6368
  /* @__PURE__ */ jsx(Position, { children: vol.position }),
@@ -6314,11 +6386,11 @@ function Resume({ resume }) {
6314
6386
  },
6315
6387
  i
6316
6388
  )) })
6317
- ] }, index))
6389
+ ] }, index2))
6318
6390
  ] }),
6319
6391
  awards?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
6320
6392
  /* @__PURE__ */ jsx(StyledSectionTitle, { children: "Awards" }),
6321
- awards.map((award, index) => /* @__PURE__ */ jsxs(EducationItem, { children: [
6393
+ awards.map((award, index2) => /* @__PURE__ */ jsxs(EducationItem, { children: [
6322
6394
  /* @__PURE__ */ jsx(Institution, { children: award.title }),
6323
6395
  award.awarder && /* @__PURE__ */ jsxs(Degree, { children: [
6324
6396
  "Awarded by ",
@@ -6326,22 +6398,22 @@ function Resume({ resume }) {
6326
6398
  ] }),
6327
6399
  award.date && /* @__PURE__ */ jsx(EducationDate, { children: award.date }),
6328
6400
  award.summary && /* @__PURE__ */ jsx(WorkSummary, { children: award.summary })
6329
- ] }, index))
6401
+ ] }, index2))
6330
6402
  ] }),
6331
6403
  certificates?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
6332
6404
  /* @__PURE__ */ jsx(StyledSectionTitle, { children: "Certificates" }),
6333
- certificates.map((cert, index) => /* @__PURE__ */ jsxs(EducationItem, { children: [
6405
+ certificates.map((cert, index2) => /* @__PURE__ */ jsxs(EducationItem, { children: [
6334
6406
  /* @__PURE__ */ jsx(Institution, { children: cert.name }),
6335
6407
  cert.issuer && /* @__PURE__ */ jsxs(Degree, { children: [
6336
6408
  "Issued by ",
6337
6409
  cert.issuer
6338
6410
  ] }),
6339
6411
  cert.date && /* @__PURE__ */ jsx(EducationDate, { children: cert.date })
6340
- ] }, index))
6412
+ ] }, index2))
6341
6413
  ] }),
6342
6414
  publications?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
6343
6415
  /* @__PURE__ */ jsx(StyledSectionTitle, { children: "Publications" }),
6344
- publications.map((pub, index) => /* @__PURE__ */ jsxs(EducationItem, { children: [
6416
+ publications.map((pub, index2) => /* @__PURE__ */ jsxs(EducationItem, { children: [
6345
6417
  /* @__PURE__ */ jsx(Institution, { children: pub.name }),
6346
6418
  pub.publisher && /* @__PURE__ */ jsxs(Degree, { children: [
6347
6419
  "Published by ",
@@ -6349,49 +6421,39 @@ function Resume({ resume }) {
6349
6421
  ] }),
6350
6422
  pub.releaseDate && /* @__PURE__ */ jsx(EducationDate, { children: pub.releaseDate }),
6351
6423
  pub.summary && /* @__PURE__ */ jsx(WorkSummary, { children: pub.summary })
6352
- ] }, index))
6424
+ ] }, index2))
6353
6425
  ] }),
6354
6426
  languages?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
6355
6427
  /* @__PURE__ */ jsx(StyledSectionTitle, { children: "Languages" }),
6356
- /* @__PURE__ */ jsx(SkillsGrid, { children: languages.map((lang, index) => /* @__PURE__ */ jsxs(SkillCategory, { children: [
6428
+ /* @__PURE__ */ jsx(SkillsGrid, { children: languages.map((lang, index2) => /* @__PURE__ */ jsxs(SkillCategory, { children: [
6357
6429
  /* @__PURE__ */ jsx(SkillName, { children: lang.language }),
6358
6430
  lang.fluency && /* @__PURE__ */ jsx(SkillTags, { children: lang.fluency })
6359
- ] }, index)) })
6431
+ ] }, index2)) })
6360
6432
  ] }),
6361
6433
  interests?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
6362
6434
  /* @__PURE__ */ jsx(StyledSectionTitle, { children: "Interests" }),
6363
- /* @__PURE__ */ jsx(SkillsGrid, { children: interests.map((interest, index) => /* @__PURE__ */ jsxs(SkillCategory, { children: [
6435
+ /* @__PURE__ */ jsx(SkillsGrid, { children: interests.map((interest, index2) => /* @__PURE__ */ jsxs(SkillCategory, { children: [
6364
6436
  /* @__PURE__ */ jsx(SkillName, { children: interest.name }),
6365
6437
  interest.keywords?.length > 0 && /* @__PURE__ */ jsx(SkillTags, { children: interest.keywords.join(", ") })
6366
- ] }, index)) })
6438
+ ] }, index2)) })
6367
6439
  ] }),
6368
6440
  references?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
6369
6441
  /* @__PURE__ */ jsx(StyledSectionTitle, { children: "References" }),
6370
- references.map((ref, index) => /* @__PURE__ */ jsxs(EducationItem, { children: [
6442
+ references.map((ref, index2) => /* @__PURE__ */ jsxs(EducationItem, { children: [
6371
6443
  /* @__PURE__ */ jsx(Institution, { children: ref.name }),
6372
6444
  ref.reference && /* @__PURE__ */ jsx(WorkSummary, { children: ref.reference })
6373
- ] }, index))
6445
+ ] }, index2))
6374
6446
  ] })
6375
6447
  ] });
6376
6448
  }
6377
6449
  function render(resume) {
6378
- const sheet = new gt();
6379
- try {
6380
- const html = renderToString(
6381
- sheet.collectStyles(/* @__PURE__ */ jsx(Resume, { resume }))
6382
- );
6383
- const styles = sheet.getStyleTags();
6384
- return `<!DOCTYPE html>
6385
- <html lang="en">
6386
- <head>
6387
- <meta charset="UTF-8">
6388
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6389
- <title>${resume.basics?.name || "Resume"} - Resume</title>
6390
- <link rel="preconnect" href="https://fonts.googleapis.com">
6391
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
6392
- <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap" rel="stylesheet">
6393
- ${styles}
6394
- <style>
6450
+ return renderResumeDocument(/* @__PURE__ */ jsx(Resume, { resume }), {
6451
+ fonts: ["Inter:wght@400;600;700;800"],
6452
+ title: `${resume.basics?.name || "Resume"} - Resume`,
6453
+ lang: "en",
6454
+ dir: "ltr",
6455
+ includeTokensCss: false,
6456
+ headAfterStyles: `<style>
6395
6457
  * {
6396
6458
  box-sizing: border-box;
6397
6459
  margin: 0;
@@ -6410,16 +6472,11 @@ function render(resume) {
6410
6472
  margin: 0.5in;
6411
6473
  }
6412
6474
  }
6413
- </style>
6414
- </head>
6415
- <body>
6416
- ${html}
6417
- </body>
6418
- </html>`;
6419
- } finally {
6420
- sheet.seal();
6421
- }
6475
+ </style>`
6476
+ });
6422
6477
  }
6478
+ const index = { render };
6423
6479
  export {
6480
+ index as default,
6424
6481
  render
6425
6482
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsonresume-theme-sales-hunter",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Sales professionals - numbers, quotas, performance metrics highly visible",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "styled-components": "^6.1.19",
22
- "@jsonresume/core": "0.3.0"
22
+ "@jsonresume/core": "0.3.2"
23
23
  },
24
24
  "exports": {
25
25
  ".": {
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "@vitejs/plugin-react": "^4.3.4",
36
- "vite": "^5.4.21"
36
+ "vite": "^6.4.3"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "vite build"
package/src/index.jsx CHANGED
@@ -1,28 +1,14 @@
1
- import React from 'react';
2
- import { renderToString } from 'react-dom/server';
3
- import { ServerStyleSheet } from 'styled-components';
1
+ import { renderResumeDocument } from '@jsonresume/core/ssr';
4
2
  import Resume from './Resume.jsx';
5
3
 
6
4
  export function render(resume) {
7
- const sheet = new ServerStyleSheet();
8
-
9
- try {
10
- const html = renderToString(
11
- sheet.collectStyles(<Resume resume={resume} />)
12
- );
13
- const styles = sheet.getStyleTags();
14
-
15
- return `<!DOCTYPE html>
16
- <html lang="en">
17
- <head>
18
- <meta charset="UTF-8">
19
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
20
- <title>${resume.basics?.name || 'Resume'} - Resume</title>
21
- <link rel="preconnect" href="https://fonts.googleapis.com">
22
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
23
- <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap" rel="stylesheet">
24
- ${styles}
25
- <style>
5
+ return renderResumeDocument(<Resume resume={resume} />, {
6
+ fonts: ['Inter:wght@400;600;700;800'],
7
+ title: `${resume.basics?.name || 'Resume'} - Resume`,
8
+ lang: 'en',
9
+ dir: 'ltr',
10
+ includeTokensCss: false,
11
+ headAfterStyles: `<style>
26
12
  * {
27
13
  box-sizing: border-box;
28
14
  margin: 0;
@@ -41,13 +27,8 @@ export function render(resume) {
41
27
  margin: 0.5in;
42
28
  }
43
29
  }
44
- </style>
45
- </head>
46
- <body>
47
- ${html}
48
- </body>
49
- </html>`;
50
- } finally {
51
- sheet.seal();
52
- }
30
+ </style>`,
31
+ });
53
32
  }
33
+
34
+ export default { render };
package/dist/style.css DELETED
@@ -1,139 +0,0 @@
1
- /**
2
- * Resume Core Design Tokens
3
- * Framework-agnostic CSS variables for theming
4
- * Based on 2025 resume best practices and ATS compatibility research
5
- */
6
-
7
- :root {
8
- /* Typography - ATS-friendly fonts */
9
- --resume-font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
10
- --resume-font-serif: Cambria, Georgia, "Times New Roman", serif;
11
- --resume-font-mono: "Courier New", Courier, monospace;
12
-
13
- /* Font Sizes - Optimal readability */
14
- --resume-size-name: 36px; /* Large, prominent name */
15
- --resume-size-heading: 16px; /* Section titles */
16
- --resume-size-subheading: 14px; /* Job titles, degrees */
17
- --resume-size-body: 11px; /* Body text, descriptions */
18
- --resume-size-small: 10px; /* Dates, locations, metadata */
19
-
20
- /* Font Weights */
21
- --resume-weight-normal: 400;
22
- --resume-weight-medium: 500;
23
- --resume-weight-semibold: 600;
24
- --resume-weight-bold: 700;
25
-
26
- /* Line Heights */
27
- --resume-line-height-tight: 1.2;
28
- --resume-line-height-normal: 1.5;
29
- --resume-line-height-relaxed: 1.75;
30
-
31
- /* Colors - Professional Theme (default) */
32
- --resume-color-primary: #1a1a1a;
33
- --resume-color-secondary: #4a4a4a;
34
- --resume-color-accent: #2563eb;
35
- --resume-color-background: #ffffff;
36
- --resume-color-border: #e5e7eb;
37
-
38
- /* Spacing - Consistent rhythm */
39
- --resume-space-section: 24px; /* Between major sections */
40
- --resume-space-item: 16px; /* Between list items */
41
- --resume-space-tight: 8px; /* Within items */
42
- --resume-space-margin: 48px; /* Page margins */
43
-
44
- /* Layout - Optimal line length */
45
- --resume-max-width: 660px; /* ~80 chars at body size */
46
- --resume-column-gap: 24px;
47
-
48
- /* Border Radius */
49
- --resume-radius-sm: 4px;
50
- --resume-radius-md: 8px;
51
- --resume-radius-lg: 12px;
52
-
53
- /* Shadows - Subtle depth */
54
- --resume-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
55
- --resume-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
56
- }
57
-
58
- /* Modern Theme Variant */
59
- [data-theme="modern"] {
60
- --resume-color-primary: #0f172a;
61
- --resume-color-secondary: #475569;
62
- --resume-color-accent: #8b5cf6;
63
- --resume-font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
64
- }
65
-
66
- /* Classic Theme Variant */
67
- [data-theme="classic"] {
68
- --resume-color-primary: #000000;
69
- --resume-color-secondary: #333333;
70
- --resume-color-accent: #0066cc;
71
- --resume-font-sans: Georgia, "Times New Roman", serif;
72
- }
73
-
74
- /* Minimal Theme Variant */
75
- [data-theme="minimal"] {
76
- --resume-color-primary: #18181b;
77
- --resume-color-secondary: #71717a;
78
- --resume-color-accent: #000000;
79
- --resume-space-section: 32px;
80
- --resume-space-item: 20px;
81
- }
82
-
83
- /* High Contrast Variant (Accessibility) */
84
- [data-theme="high-contrast"] {
85
- --resume-color-primary: #000000;
86
- --resume-color-secondary: #000000;
87
- --resume-color-accent: #0000ff;
88
- --resume-color-background: #ffffff;
89
- --resume-color-border: #000000;
90
- }
91
-
92
- /* Print Styles - ATS-Friendly PDF Export */
93
- @media print {
94
- :root {
95
- /* Optimize for print */
96
- --resume-space-section: 18px;
97
- --resume-space-item: 12px;
98
- }
99
-
100
- @page {
101
- size: A4;
102
- margin: 0.5in;
103
- }
104
-
105
- /* Prevent awkward breaks */
106
- .resume-section {
107
- page-break-inside: avoid;
108
- }
109
-
110
- .resume-item {
111
- break-inside: avoid;
112
- }
113
-
114
- /* Widows and orphans control */
115
- p, li {
116
- widows: 3;
117
- orphans: 3;
118
- }
119
-
120
- /* Hyphenation for long words */
121
- .resume-description {
122
- hyphens: auto;
123
- }
124
-
125
- /* Hide interactive elements */
126
- .no-print {
127
- display: none !important;
128
- }
129
- }
130
-
131
- /* RTL Support */
132
- [dir="rtl"] {
133
- text-align: right;
134
- }
135
-
136
- [dir="rtl"] .resume-item {
137
- padding-left: 0;
138
- padding-right: var(--resume-space-tight);
139
- }