jsonresume-theme-operations-precision 0.3.1 → 0.3.3
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 +15 -0
- package/dist/index.js +124 -79
- package/package.json +2 -2
- package/src/index.jsx +12 -31
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# jsonresume-theme-operations-precision
|
|
2
2
|
|
|
3
|
+
## 0.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8973d5a: use @jsonresume/core/ssr renderResumeDocument
|
|
8
|
+
- Updated dependencies [ff09f75]
|
|
9
|
+
- @jsonresume/core@0.3.1
|
|
10
|
+
|
|
11
|
+
## 0.3.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [ff0f85b]
|
|
16
|
+
- @jsonresume/core@0.3.0
|
|
17
|
+
|
|
3
18
|
## 0.3.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } 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
|
import { marked } from "marked";
|
|
5
5
|
var __assign = function() {
|
|
6
6
|
__assign = Object.assign || function __assign2(t) {
|
|
@@ -101,8 +101,8 @@ function replace(value, pattern, replacement) {
|
|
|
101
101
|
function indexof(value, search, position2) {
|
|
102
102
|
return value.indexOf(search, position2);
|
|
103
103
|
}
|
|
104
|
-
function charat(value,
|
|
105
|
-
return value.charCodeAt(
|
|
104
|
+
function charat(value, index2) {
|
|
105
|
+
return value.charCodeAt(index2) | 0;
|
|
106
106
|
}
|
|
107
107
|
function substr(value, begin, end) {
|
|
108
108
|
return value.slice(begin, end);
|
|
@@ -220,11 +220,11 @@ function whitespace(type) {
|
|
|
220
220
|
break;
|
|
221
221
|
return token(type) > 2 || token(character) > 3 ? "" : " ";
|
|
222
222
|
}
|
|
223
|
-
function escaping(
|
|
223
|
+
function escaping(index2, count) {
|
|
224
224
|
while (--count && next())
|
|
225
225
|
if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
|
|
226
226
|
break;
|
|
227
|
-
return slice(
|
|
227
|
+
return slice(index2, caret() + (count < 6 && peek() == 32 && next() == 32));
|
|
228
228
|
}
|
|
229
229
|
function delimiter(type) {
|
|
230
230
|
while (next())
|
|
@@ -250,24 +250,24 @@ function delimiter(type) {
|
|
|
250
250
|
}
|
|
251
251
|
return position;
|
|
252
252
|
}
|
|
253
|
-
function commenter(type,
|
|
253
|
+
function commenter(type, index2) {
|
|
254
254
|
while (next())
|
|
255
255
|
if (type + character === 47 + 10)
|
|
256
256
|
break;
|
|
257
257
|
else if (type + character === 42 + 42 && peek() === 47)
|
|
258
258
|
break;
|
|
259
|
-
return "/*" + slice(
|
|
259
|
+
return "/*" + slice(index2, position - 1) + "*" + from(type === 47 ? type : next());
|
|
260
260
|
}
|
|
261
|
-
function identifier(
|
|
261
|
+
function identifier(index2) {
|
|
262
262
|
while (!token(peek()))
|
|
263
263
|
next();
|
|
264
|
-
return slice(
|
|
264
|
+
return slice(index2, position);
|
|
265
265
|
}
|
|
266
266
|
function compile(value) {
|
|
267
267
|
return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
|
|
268
268
|
}
|
|
269
269
|
function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
|
|
270
|
-
var
|
|
270
|
+
var index2 = 0;
|
|
271
271
|
var offset = 0;
|
|
272
272
|
var length2 = pseudo;
|
|
273
273
|
var atrule = 0;
|
|
@@ -287,7 +287,7 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
|
|
|
287
287
|
// (
|
|
288
288
|
case 40:
|
|
289
289
|
if (previous != 108 && charat(characters2, length2 - 1) == 58) {
|
|
290
|
-
if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f", abs(
|
|
290
|
+
if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f", abs(index2 ? points[index2 - 1] : 0)) != -1)
|
|
291
291
|
ampersand = -1;
|
|
292
292
|
break;
|
|
293
293
|
}
|
|
@@ -321,7 +321,7 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
|
|
|
321
321
|
break;
|
|
322
322
|
// {
|
|
323
323
|
case 123 * variable:
|
|
324
|
-
points[
|
|
324
|
+
points[index2++] = strlen(characters2) * ampersand;
|
|
325
325
|
// } ; \0
|
|
326
326
|
case 125 * variable:
|
|
327
327
|
case 59:
|
|
@@ -342,7 +342,7 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
|
|
|
342
342
|
characters2 += ";";
|
|
343
343
|
// { rule/at-rule
|
|
344
344
|
default:
|
|
345
|
-
append(reference = ruleset(characters2, root, parent,
|
|
345
|
+
append(reference = ruleset(characters2, root, parent, index2, offset, rules, points, type, props = [], children = [], length2, rulesets), rulesets);
|
|
346
346
|
if (character2 === 123)
|
|
347
347
|
if (offset === 0)
|
|
348
348
|
parse(characters2, root, reference, reference, props, rulesets, length2, points, children);
|
|
@@ -359,7 +359,7 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
|
|
|
359
359
|
parse(characters2, reference, reference, reference, [""], children, 0, points, children);
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
|
|
362
|
+
index2 = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
|
|
363
363
|
break;
|
|
364
364
|
// :
|
|
365
365
|
case 58:
|
|
@@ -378,7 +378,7 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
|
|
|
378
378
|
break;
|
|
379
379
|
// ,
|
|
380
380
|
case 44:
|
|
381
|
-
points[
|
|
381
|
+
points[index2++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
|
|
382
382
|
break;
|
|
383
383
|
// @
|
|
384
384
|
case 64:
|
|
@@ -394,11 +394,11 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
|
|
|
394
394
|
}
|
|
395
395
|
return rulesets;
|
|
396
396
|
}
|
|
397
|
-
function ruleset(value, root, parent,
|
|
397
|
+
function ruleset(value, root, parent, index2, offset, rules, points, type, props, children, length2, siblings) {
|
|
398
398
|
var post = offset - 1;
|
|
399
399
|
var rule = offset === 0 ? rules : [""];
|
|
400
400
|
var size = sizeof(rule);
|
|
401
|
-
for (var i = 0, j2 = 0, k2 = 0; i <
|
|
401
|
+
for (var i = 0, j2 = 0, k2 = 0; i < index2; ++i)
|
|
402
402
|
for (var x2 = 0, y2 = substr(value, post + 1, post = abs(j2 = points[i])), z2 = value; x2 < size; ++x2)
|
|
403
403
|
if (z2 = trim(j2 > 0 ? rule[x2] + " " + y2 : replace(y2, /&\f/g, rule[x2])))
|
|
404
404
|
props[k2++] = z2;
|
|
@@ -518,8 +518,8 @@ function prefix(value, length2, children) {
|
|
|
518
518
|
// grid-(row|column)-start
|
|
519
519
|
case 4384:
|
|
520
520
|
case 3616:
|
|
521
|
-
if (children && children.some(function(element,
|
|
522
|
-
return length2 =
|
|
521
|
+
if (children && children.some(function(element, index2) {
|
|
522
|
+
return length2 = index2, match(element.props, /grid-\w+-end/);
|
|
523
523
|
})) {
|
|
524
524
|
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+/)) + ";";
|
|
525
525
|
}
|
|
@@ -601,7 +601,7 @@ function serialize(children, callback) {
|
|
|
601
601
|
output += callback(children[i], i, children, callback) || "";
|
|
602
602
|
return output;
|
|
603
603
|
}
|
|
604
|
-
function stringify(element,
|
|
604
|
+
function stringify(element, index2, children, callback) {
|
|
605
605
|
switch (element.type) {
|
|
606
606
|
case LAYER:
|
|
607
607
|
if (element.children.length) break;
|
|
@@ -619,10 +619,10 @@ function stringify(element, index, children, callback) {
|
|
|
619
619
|
}
|
|
620
620
|
function middleware(collection) {
|
|
621
621
|
var length2 = sizeof(collection);
|
|
622
|
-
return function(element,
|
|
622
|
+
return function(element, index2, children, callback) {
|
|
623
623
|
var output = "";
|
|
624
624
|
for (var i = 0; i < length2; i++)
|
|
625
|
-
output += collection[i](element,
|
|
625
|
+
output += collection[i](element, index2, children, callback) || "";
|
|
626
626
|
return output;
|
|
627
627
|
};
|
|
628
628
|
}
|
|
@@ -634,7 +634,7 @@ function rulesheet(callback) {
|
|
|
634
634
|
}
|
|
635
635
|
};
|
|
636
636
|
}
|
|
637
|
-
function prefixer(element,
|
|
637
|
+
function prefixer(element, index2, children, callback) {
|
|
638
638
|
if (element.length > -1) {
|
|
639
639
|
if (!element.return)
|
|
640
640
|
switch (element.type) {
|
|
@@ -1301,6 +1301,66 @@ var vt = /^\s*<\/[a-z]/i, gt = (function() {
|
|
|
1301
1301
|
"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");
|
|
1302
1302
|
var wt = "__sc-".concat(f, "__");
|
|
1303
1303
|
"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);
|
|
1304
|
+
const CSS_RESET = "<style>*,*::before,*::after{box-sizing:border-box}html,body{margin:0;padding:0}body{-webkit-font-smoothing:antialiased}</style>";
|
|
1305
|
+
const TOKENS_CSS_HREF = "https://unpkg.com/@jsonresume/core/dist/tokens.css";
|
|
1306
|
+
const FONTS_PRECONNECT = '<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>';
|
|
1307
|
+
function isHref(value) {
|
|
1308
|
+
return /^(https?:)?\/\//.test(value) || value.trim().startsWith("<link");
|
|
1309
|
+
}
|
|
1310
|
+
function familyParam(family) {
|
|
1311
|
+
const [name, ...rest] = String(family).split(":");
|
|
1312
|
+
const encodedName = name.trim().replace(/\s+/g, "+");
|
|
1313
|
+
return rest.length ? `${encodedName}:${rest.join(":")}` : encodedName;
|
|
1314
|
+
}
|
|
1315
|
+
function googleFontsLinks(families) {
|
|
1316
|
+
if (!Array.isArray(families) || families.length === 0) return "";
|
|
1317
|
+
const passthrough = [];
|
|
1318
|
+
const names = [];
|
|
1319
|
+
for (const entry of families) {
|
|
1320
|
+
if (entry == null || entry === "") continue;
|
|
1321
|
+
if (isHref(entry)) passthrough.push(entry);
|
|
1322
|
+
else names.push(entry);
|
|
1323
|
+
}
|
|
1324
|
+
const links = passthrough.map(
|
|
1325
|
+
(href) => href.trim().startsWith("<link") ? href : `<link href="${href}" rel="stylesheet">`
|
|
1326
|
+
);
|
|
1327
|
+
if (names.length > 0) {
|
|
1328
|
+
const query = names.map(familyParam).join("&family=");
|
|
1329
|
+
links.unshift(
|
|
1330
|
+
`<link href="https://fonts.googleapis.com/css2?family=${query}&display=swap" rel="stylesheet">`
|
|
1331
|
+
);
|
|
1332
|
+
}
|
|
1333
|
+
if (links.length === 0) return "";
|
|
1334
|
+
return FONTS_PRECONNECT + links.join("");
|
|
1335
|
+
}
|
|
1336
|
+
function renderResumeDocument(element, options = {}) {
|
|
1337
|
+
const {
|
|
1338
|
+
fonts,
|
|
1339
|
+
title,
|
|
1340
|
+
lang = "en",
|
|
1341
|
+
dir = "ltr",
|
|
1342
|
+
reset = false,
|
|
1343
|
+
head = "",
|
|
1344
|
+
headAfterStyles = "",
|
|
1345
|
+
includeTokensCss = true,
|
|
1346
|
+
bodyClass
|
|
1347
|
+
} = options;
|
|
1348
|
+
const sheet = new gt();
|
|
1349
|
+
let html;
|
|
1350
|
+
let styleTags;
|
|
1351
|
+
try {
|
|
1352
|
+
html = renderToStaticMarkup(sheet.collectStyles(element));
|
|
1353
|
+
styleTags = sheet.getStyleTags();
|
|
1354
|
+
} finally {
|
|
1355
|
+
sheet.seal();
|
|
1356
|
+
}
|
|
1357
|
+
const fontLinks = googleFontsLinks(fonts);
|
|
1358
|
+
const tokensLink = includeTokensCss ? `<link rel="stylesheet" href="${TOKENS_CSS_HREF}">` : "";
|
|
1359
|
+
const resetTag = reset ? CSS_RESET : "";
|
|
1360
|
+
const titleTag = title ? `<title>${title}</title>` : "";
|
|
1361
|
+
const bodyAttr = bodyClass ? ` class="${bodyClass}"` : "";
|
|
1362
|
+
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>`;
|
|
1363
|
+
}
|
|
1304
1364
|
createContext({
|
|
1305
1365
|
theme: "professional",
|
|
1306
1366
|
setTheme: () => {
|
|
@@ -1478,7 +1538,9 @@ function formatDateRange({
|
|
|
1478
1538
|
return formatter.format(date);
|
|
1479
1539
|
};
|
|
1480
1540
|
const start = formatDate(startDate);
|
|
1481
|
-
if (endDate === void 0)
|
|
1541
|
+
if (endDate === void 0) {
|
|
1542
|
+
return start;
|
|
1543
|
+
}
|
|
1482
1544
|
const end = formatDate(endDate);
|
|
1483
1545
|
return `${start} - ${end}`;
|
|
1484
1546
|
}
|
|
@@ -1563,7 +1625,6 @@ function safeUrl(url) {
|
|
|
1563
1625
|
const trimmed = url.trim();
|
|
1564
1626
|
const dangerousProtocols = /^(javascript|data|vbscript|file|about):/i;
|
|
1565
1627
|
if (dangerousProtocols.test(trimmed)) {
|
|
1566
|
-
console.warn(`[Security] Blocked dangerous URL: ${trimmed.slice(0, 50)}`);
|
|
1567
1628
|
return null;
|
|
1568
1629
|
}
|
|
1569
1630
|
const safeProtocols = /^(https?|mailto|tel|sms|ftp):/i;
|
|
@@ -1579,7 +1640,6 @@ function safeUrl(url) {
|
|
|
1579
1640
|
if (/^[a-z0-9][a-z0-9.-]+\.[a-z]{2,}$/i.test(trimmed)) {
|
|
1580
1641
|
return `https://${trimmed}`;
|
|
1581
1642
|
}
|
|
1582
|
-
console.warn(`[Security] Uncertain URL safety: ${trimmed.slice(0, 50)}`);
|
|
1583
1643
|
return trimmed;
|
|
1584
1644
|
}
|
|
1585
1645
|
const ContactContainer = dt.div`
|
|
@@ -1643,7 +1703,7 @@ function ContactInfo({ basics = {}, separator = "•", className }) {
|
|
|
1643
1703
|
) }, "url")
|
|
1644
1704
|
);
|
|
1645
1705
|
}
|
|
1646
|
-
profiles.forEach((profile,
|
|
1706
|
+
profiles.forEach((profile, index2) => {
|
|
1647
1707
|
if (profile.url) {
|
|
1648
1708
|
items.push(
|
|
1649
1709
|
/* @__PURE__ */ jsx(ContactItem, { children: /* @__PURE__ */ jsx(
|
|
@@ -1655,15 +1715,15 @@ function ContactInfo({ basics = {}, separator = "•", className }) {
|
|
|
1655
1715
|
"aria-label": profile.network,
|
|
1656
1716
|
children: profile.network || profile.username
|
|
1657
1717
|
}
|
|
1658
|
-
) }, `profile-${
|
|
1718
|
+
) }, `profile-${index2}`)
|
|
1659
1719
|
);
|
|
1660
1720
|
}
|
|
1661
1721
|
});
|
|
1662
1722
|
if (items.length === 0) return null;
|
|
1663
|
-
return /* @__PURE__ */ jsx(ContactContainer, { className: `resume-contact ${className || ""}`.trim(), children: items.map((item,
|
|
1664
|
-
|
|
1723
|
+
return /* @__PURE__ */ jsx(ContactContainer, { className: `resume-contact ${className || ""}`.trim(), children: items.map((item, index2) => /* @__PURE__ */ jsxs(o.Fragment, { children: [
|
|
1724
|
+
index2 > 0 && /* @__PURE__ */ jsx(Separator, { "aria-hidden": "true", children: separator }),
|
|
1665
1725
|
item
|
|
1666
|
-
] },
|
|
1726
|
+
] }, index2)) });
|
|
1667
1727
|
}
|
|
1668
1728
|
dt.a`
|
|
1669
1729
|
color: ${(props) => props.theme?.colors?.link || "var(--resume-color-link, #0066cc)"};
|
|
@@ -6264,7 +6324,7 @@ function Resume({ resume }) {
|
|
|
6264
6324
|
] }),
|
|
6265
6325
|
work?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
|
|
6266
6326
|
/* @__PURE__ */ jsx(StyledSectionTitle, { children: "Experience" }),
|
|
6267
|
-
work.map((job,
|
|
6327
|
+
work.map((job, index2) => /* @__PURE__ */ jsxs(WorkItem, { children: [
|
|
6268
6328
|
/* @__PURE__ */ jsxs(WorkHeader, { children: [
|
|
6269
6329
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
6270
6330
|
/* @__PURE__ */ jsx(Position, { children: job.position }),
|
|
@@ -6291,18 +6351,18 @@ function Resume({ resume }) {
|
|
|
6291
6351
|
},
|
|
6292
6352
|
i
|
|
6293
6353
|
)) })
|
|
6294
|
-
] },
|
|
6354
|
+
] }, index2))
|
|
6295
6355
|
] }),
|
|
6296
6356
|
skills?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
|
|
6297
6357
|
/* @__PURE__ */ jsx(StyledSectionTitle, { children: "Skills & Tools" }),
|
|
6298
|
-
/* @__PURE__ */ jsx(SkillsTable, { children: skills.map((skill,
|
|
6358
|
+
/* @__PURE__ */ jsx(SkillsTable, { children: skills.map((skill, index2) => /* @__PURE__ */ jsxs(o.Fragment, { children: [
|
|
6299
6359
|
/* @__PURE__ */ jsx(SkillName, { children: skill.name }),
|
|
6300
6360
|
/* @__PURE__ */ jsx(SkillTags, { children: skill.keywords?.length > 0 ? skill.keywords.join(" • ") : "—" })
|
|
6301
|
-
] },
|
|
6361
|
+
] }, index2)) })
|
|
6302
6362
|
] }),
|
|
6303
6363
|
education?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
|
|
6304
6364
|
/* @__PURE__ */ jsx(StyledSectionTitle, { children: "Education" }),
|
|
6305
|
-
education.map((edu,
|
|
6365
|
+
education.map((edu, index2) => /* @__PURE__ */ jsxs(EducationItem, { children: [
|
|
6306
6366
|
/* @__PURE__ */ jsx(Institution, { children: edu.institution }),
|
|
6307
6367
|
/* @__PURE__ */ jsxs(Degree, { children: [
|
|
6308
6368
|
edu.studyType,
|
|
@@ -6311,11 +6371,11 @@ function Resume({ resume }) {
|
|
|
6311
6371
|
edu.score && ` • ${edu.score}`
|
|
6312
6372
|
] }),
|
|
6313
6373
|
/* @__PURE__ */ jsx(EducationDate, { children: /* @__PURE__ */ jsx(DateRange, { startDate: edu.startDate, endDate: edu.endDate }) })
|
|
6314
|
-
] },
|
|
6374
|
+
] }, index2))
|
|
6315
6375
|
] }),
|
|
6316
6376
|
projects?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
|
|
6317
6377
|
/* @__PURE__ */ jsx(StyledSectionTitle, { children: "Projects" }),
|
|
6318
|
-
projects.map((project,
|
|
6378
|
+
projects.map((project, index2) => /* @__PURE__ */ jsxs(ProjectItem, { children: [
|
|
6319
6379
|
/* @__PURE__ */ jsxs(ProjectHeader, { children: [
|
|
6320
6380
|
/* @__PURE__ */ jsx(ProjectName, { children: project.name }),
|
|
6321
6381
|
(project.startDate || project.endDate) && /* @__PURE__ */ jsx(DateText, { children: /* @__PURE__ */ jsx(
|
|
@@ -6345,11 +6405,11 @@ function Resume({ resume }) {
|
|
|
6345
6405
|
},
|
|
6346
6406
|
i
|
|
6347
6407
|
)) })
|
|
6348
|
-
] },
|
|
6408
|
+
] }, index2))
|
|
6349
6409
|
] }),
|
|
6350
6410
|
volunteer?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
|
|
6351
6411
|
/* @__PURE__ */ jsx(StyledSectionTitle, { children: "Volunteer" }),
|
|
6352
|
-
volunteer.map((vol,
|
|
6412
|
+
volunteer.map((vol, index2) => /* @__PURE__ */ jsxs(WorkItem, { children: [
|
|
6353
6413
|
/* @__PURE__ */ jsxs(WorkHeader, { children: [
|
|
6354
6414
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
6355
6415
|
/* @__PURE__ */ jsx(Position, { children: vol.position }),
|
|
@@ -6382,11 +6442,11 @@ function Resume({ resume }) {
|
|
|
6382
6442
|
},
|
|
6383
6443
|
i
|
|
6384
6444
|
)) })
|
|
6385
|
-
] },
|
|
6445
|
+
] }, index2))
|
|
6386
6446
|
] }),
|
|
6387
6447
|
awards?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
|
|
6388
6448
|
/* @__PURE__ */ jsx(StyledSectionTitle, { children: "Awards" }),
|
|
6389
|
-
awards.map((award,
|
|
6449
|
+
awards.map((award, index2) => /* @__PURE__ */ jsxs(EducationItem, { children: [
|
|
6390
6450
|
/* @__PURE__ */ jsx(Institution, { children: award.title }),
|
|
6391
6451
|
award.awarder && /* @__PURE__ */ jsxs(Degree, { children: [
|
|
6392
6452
|
"Awarded by ",
|
|
@@ -6401,11 +6461,11 @@ function Resume({ resume }) {
|
|
|
6401
6461
|
}
|
|
6402
6462
|
}
|
|
6403
6463
|
)
|
|
6404
|
-
] },
|
|
6464
|
+
] }, index2))
|
|
6405
6465
|
] }),
|
|
6406
6466
|
publications?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
|
|
6407
6467
|
/* @__PURE__ */ jsx(StyledSectionTitle, { children: "Publications" }),
|
|
6408
|
-
publications.map((pub,
|
|
6468
|
+
publications.map((pub, index2) => /* @__PURE__ */ jsxs(EducationItem, { children: [
|
|
6409
6469
|
/* @__PURE__ */ jsx(Institution, { children: pub.name }),
|
|
6410
6470
|
pub.publisher && /* @__PURE__ */ jsxs(Degree, { children: [
|
|
6411
6471
|
"Published by ",
|
|
@@ -6420,67 +6480,57 @@ function Resume({ resume }) {
|
|
|
6420
6480
|
}
|
|
6421
6481
|
}
|
|
6422
6482
|
)
|
|
6423
|
-
] },
|
|
6483
|
+
] }, index2))
|
|
6424
6484
|
] }),
|
|
6425
6485
|
certificates?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
|
|
6426
6486
|
/* @__PURE__ */ jsx(StyledSectionTitle, { children: "Certifications" }),
|
|
6427
|
-
certificates.map((cert,
|
|
6487
|
+
certificates.map((cert, index2) => /* @__PURE__ */ jsxs(EducationItem, { children: [
|
|
6428
6488
|
/* @__PURE__ */ jsx(Institution, { children: cert.name }),
|
|
6429
6489
|
cert.issuer && /* @__PURE__ */ jsxs(Degree, { children: [
|
|
6430
6490
|
"Issued by ",
|
|
6431
6491
|
cert.issuer
|
|
6432
6492
|
] }),
|
|
6433
6493
|
cert.date && /* @__PURE__ */ jsx(EducationDate, { children: cert.date })
|
|
6434
|
-
] },
|
|
6494
|
+
] }, index2))
|
|
6435
6495
|
] }),
|
|
6436
6496
|
languages?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
|
|
6437
6497
|
/* @__PURE__ */ jsx(StyledSectionTitle, { children: "Languages" }),
|
|
6438
|
-
/* @__PURE__ */ jsx(TwoColumnGrid, { children: languages.map((lang,
|
|
6498
|
+
/* @__PURE__ */ jsx(TwoColumnGrid, { children: languages.map((lang, index2) => /* @__PURE__ */ jsxs(CompactItem, { children: [
|
|
6439
6499
|
/* @__PURE__ */ jsxs(CompactTitle, { children: [
|
|
6440
6500
|
lang.language,
|
|
6441
6501
|
":"
|
|
6442
6502
|
] }),
|
|
6443
6503
|
" ",
|
|
6444
6504
|
lang.fluency || "—"
|
|
6445
|
-
] },
|
|
6505
|
+
] }, index2)) })
|
|
6446
6506
|
] }),
|
|
6447
6507
|
interests?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
|
|
6448
6508
|
/* @__PURE__ */ jsx(StyledSectionTitle, { children: "Interests" }),
|
|
6449
|
-
/* @__PURE__ */ jsx(TwoColumnGrid, { children: interests.map((interest,
|
|
6509
|
+
/* @__PURE__ */ jsx(TwoColumnGrid, { children: interests.map((interest, index2) => /* @__PURE__ */ jsxs(CompactItem, { children: [
|
|
6450
6510
|
/* @__PURE__ */ jsx(CompactTitle, { children: interest.name }),
|
|
6451
6511
|
interest.keywords?.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6452
6512
|
": ",
|
|
6453
6513
|
interest.keywords.join(", ")
|
|
6454
6514
|
] })
|
|
6455
|
-
] },
|
|
6515
|
+
] }, index2)) })
|
|
6456
6516
|
] }),
|
|
6457
6517
|
references?.length > 0 && /* @__PURE__ */ jsxs(Section, { children: [
|
|
6458
6518
|
/* @__PURE__ */ jsx(StyledSectionTitle, { children: "References" }),
|
|
6459
|
-
references.map((ref,
|
|
6519
|
+
references.map((ref, index2) => /* @__PURE__ */ jsxs(EducationItem, { children: [
|
|
6460
6520
|
/* @__PURE__ */ jsx(Institution, { children: ref.name }),
|
|
6461
6521
|
ref.reference && /* @__PURE__ */ jsx(WorkSummary, { children: ref.reference })
|
|
6462
|
-
] },
|
|
6522
|
+
] }, index2))
|
|
6463
6523
|
] })
|
|
6464
6524
|
] });
|
|
6465
6525
|
}
|
|
6466
6526
|
function render(resume) {
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
<html lang="en">
|
|
6475
|
-
<head>
|
|
6476
|
-
<meta charset="UTF-8">
|
|
6477
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6478
|
-
<title>${resume.basics?.name || "Resume"} - Resume</title>
|
|
6479
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
6480
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
6481
|
-
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
6482
|
-
${styles}
|
|
6483
|
-
<style>
|
|
6527
|
+
return renderResumeDocument(/* @__PURE__ */ jsx(Resume, { resume }), {
|
|
6528
|
+
fonts: ["Inter:wght@400;500;600;700"],
|
|
6529
|
+
title: `${resume.basics?.name || "Resume"} - Resume`,
|
|
6530
|
+
lang: "en",
|
|
6531
|
+
dir: "ltr",
|
|
6532
|
+
includeTokensCss: false,
|
|
6533
|
+
headAfterStyles: `<style>
|
|
6484
6534
|
* {
|
|
6485
6535
|
box-sizing: border-box;
|
|
6486
6536
|
margin: 0;
|
|
@@ -6499,16 +6549,11 @@ function render(resume) {
|
|
|
6499
6549
|
margin: 0.5in;
|
|
6500
6550
|
}
|
|
6501
6551
|
}
|
|
6502
|
-
</style
|
|
6503
|
-
|
|
6504
|
-
<body>
|
|
6505
|
-
${html}
|
|
6506
|
-
</body>
|
|
6507
|
-
</html>`;
|
|
6508
|
-
} finally {
|
|
6509
|
-
sheet.seal();
|
|
6510
|
-
}
|
|
6552
|
+
</style>`
|
|
6553
|
+
});
|
|
6511
6554
|
}
|
|
6555
|
+
const index = { render };
|
|
6512
6556
|
export {
|
|
6557
|
+
index as default,
|
|
6513
6558
|
render
|
|
6514
6559
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsonresume-theme-operations-precision",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Operations professionals - show your systematic approach, process improvements",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"marked": "^16.3.0",
|
|
22
22
|
"styled-components": "^6.1.19",
|
|
23
|
-
"@jsonresume/core": "0.
|
|
23
|
+
"@jsonresume/core": "0.3.1"
|
|
24
24
|
},
|
|
25
25
|
"exports": {
|
|
26
26
|
".": {
|
package/src/index.jsx
CHANGED
|
@@ -1,28 +1,14 @@
|
|
|
1
|
-
import
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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;500;600;700&display=swap" rel="stylesheet">
|
|
24
|
-
${styles}
|
|
25
|
-
<style>
|
|
5
|
+
return renderResumeDocument(<Resume resume={resume} />, {
|
|
6
|
+
fonts: ['Inter:wght@400;500;600;700'],
|
|
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
|
-
|
|
46
|
-
<body>
|
|
47
|
-
${html}
|
|
48
|
-
</body>
|
|
49
|
-
</html>`;
|
|
50
|
-
} finally {
|
|
51
|
-
sheet.seal();
|
|
52
|
-
}
|
|
30
|
+
</style>`,
|
|
31
|
+
});
|
|
53
32
|
}
|
|
33
|
+
|
|
34
|
+
export default { render };
|