jsonresume-theme-two-column-modernist 1.1.13 → 1.1.14
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 +7 -0
- package/dist/index.js +44 -44
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1424,6 +1424,50 @@ dt.span`
|
|
|
1424
1424
|
margin-right: 8px;
|
|
1425
1425
|
font-size: 1.2em;
|
|
1426
1426
|
`;
|
|
1427
|
+
const ESCAPES = {
|
|
1428
|
+
"&": "&",
|
|
1429
|
+
"<": "<",
|
|
1430
|
+
">": ">",
|
|
1431
|
+
'"': """,
|
|
1432
|
+
"'": "'"
|
|
1433
|
+
};
|
|
1434
|
+
const escapeHtml = (text) => text.replace(/[&<>"']/g, (c) => ESCAPES[c]);
|
|
1435
|
+
const ESCAPABLE = /\\([\\`*_[\]()!#])/g;
|
|
1436
|
+
const CODE = /`([^`]+)`/g;
|
|
1437
|
+
const LINK = /\[([^\]]+)\]\(([^)\s]+)\)/g;
|
|
1438
|
+
const STRONG = /\*\*(?=\S)([^*]*?\S)\*\*|__(?=\S)([^_]*?\S)__/g;
|
|
1439
|
+
const EMPHASIS = /\*(?=\S)([^*]*?\S)\*|(^|[^\p{L}\p{N}_])_(?=\S)([^_]*?\S)_(?![\p{L}\p{N}_])/gu;
|
|
1440
|
+
const safeHref = (url) => /^(https?:\/\/|mailto:)/i.test(url) ? url : void 0;
|
|
1441
|
+
const emphasis = (text, strong, em) => text.replace(STRONG, (_2, a, b2) => strong(a ?? b2)).replace(
|
|
1442
|
+
EMPHASIS,
|
|
1443
|
+
(_2, a, before, b2) => a !== void 0 ? em(a) : `${before}${em(b2)}`
|
|
1444
|
+
);
|
|
1445
|
+
const inline = (text, out) => {
|
|
1446
|
+
const kept = [];
|
|
1447
|
+
const keep = (value) => `${kept.push(value) - 1}`;
|
|
1448
|
+
const marks = (t) => emphasis(t, out.strong, out.em);
|
|
1449
|
+
const rest = text.replace(/\uE000/g, "").replace(ESCAPABLE, (_2, c) => keep(out.text(c))).replace(CODE, (_2, body) => keep(out.code(body))).replace(
|
|
1450
|
+
LINK,
|
|
1451
|
+
(_2, label, url) => keep(out.link(marks(out.text(label)), url))
|
|
1452
|
+
);
|
|
1453
|
+
return marks(out.text(rest)).replace(
|
|
1454
|
+
/\uE000(\d+)\uE000/g,
|
|
1455
|
+
(_2, i) => kept[Number(i)]
|
|
1456
|
+
);
|
|
1457
|
+
};
|
|
1458
|
+
function renderInlineMarkdown(text) {
|
|
1459
|
+
if (typeof text !== "string") return "";
|
|
1460
|
+
return inline(text, {
|
|
1461
|
+
text: escapeHtml,
|
|
1462
|
+
code: (body) => `<code>${escapeHtml(body)}</code>`,
|
|
1463
|
+
link: (label, url) => {
|
|
1464
|
+
const href = safeHref(url);
|
|
1465
|
+
return href ? `<a href="${escapeHtml(href)}">${label}</a>` : label;
|
|
1466
|
+
},
|
|
1467
|
+
strong: (t) => `<strong>${t}</strong>`,
|
|
1468
|
+
em: (t) => `<em>${t}</em>`
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1427
1471
|
dt.div`
|
|
1428
1472
|
margin-bottom: ${(props) => props.theme?.spacing?.item || "var(--resume-space-item, 1rem)"};
|
|
1429
1473
|
|
|
@@ -1694,50 +1738,6 @@ dt.span`
|
|
|
1694
1738
|
}
|
|
1695
1739
|
}
|
|
1696
1740
|
`;
|
|
1697
|
-
const ESCAPES = {
|
|
1698
|
-
"&": "&",
|
|
1699
|
-
"<": "<",
|
|
1700
|
-
">": ">",
|
|
1701
|
-
'"': """,
|
|
1702
|
-
"'": "'"
|
|
1703
|
-
};
|
|
1704
|
-
const escapeHtml = (text) => text.replace(/[&<>"']/g, (c) => ESCAPES[c]);
|
|
1705
|
-
const ESCAPABLE = /\\([\\`*_[\]()!#])/g;
|
|
1706
|
-
const CODE = /`([^`]+)`/g;
|
|
1707
|
-
const LINK = /\[([^\]]+)\]\(([^)\s]+)\)/g;
|
|
1708
|
-
const STRONG = /\*\*(?=\S)([^*]*?\S)\*\*|__(?=\S)([^_]*?\S)__/g;
|
|
1709
|
-
const EMPHASIS = /\*(?=\S)([^*]*?\S)\*|(^|[^\p{L}\p{N}_])_(?=\S)([^_]*?\S)_(?![\p{L}\p{N}_])/gu;
|
|
1710
|
-
const safeHref = (url) => /^(https?:\/\/|mailto:)/i.test(url) ? url : void 0;
|
|
1711
|
-
const emphasis = (text, strong, em) => text.replace(STRONG, (_2, a, b2) => strong(a ?? b2)).replace(
|
|
1712
|
-
EMPHASIS,
|
|
1713
|
-
(_2, a, before, b2) => a !== void 0 ? em(a) : `${before}${em(b2)}`
|
|
1714
|
-
);
|
|
1715
|
-
const inline = (text, out) => {
|
|
1716
|
-
const kept = [];
|
|
1717
|
-
const keep = (value) => `${kept.push(value) - 1}`;
|
|
1718
|
-
const marks = (t) => emphasis(t, out.strong, out.em);
|
|
1719
|
-
const rest = text.replace(/\uE000/g, "").replace(ESCAPABLE, (_2, c) => keep(out.text(c))).replace(CODE, (_2, body) => keep(out.code(body))).replace(
|
|
1720
|
-
LINK,
|
|
1721
|
-
(_2, label, url) => keep(out.link(marks(out.text(label)), url))
|
|
1722
|
-
);
|
|
1723
|
-
return marks(out.text(rest)).replace(
|
|
1724
|
-
/\uE000(\d+)\uE000/g,
|
|
1725
|
-
(_2, i) => kept[Number(i)]
|
|
1726
|
-
);
|
|
1727
|
-
};
|
|
1728
|
-
function renderInlineMarkdown(text) {
|
|
1729
|
-
if (typeof text !== "string") return "";
|
|
1730
|
-
return inline(text, {
|
|
1731
|
-
text: escapeHtml,
|
|
1732
|
-
code: (body) => `<code>${escapeHtml(body)}</code>`,
|
|
1733
|
-
link: (label, url) => {
|
|
1734
|
-
const href = safeHref(url);
|
|
1735
|
-
return href ? `<a href="${escapeHtml(href)}">${label}</a>` : label;
|
|
1736
|
-
},
|
|
1737
|
-
strong: (t) => `<strong>${t}</strong>`,
|
|
1738
|
-
em: (t) => `<em>${t}</em>`
|
|
1739
|
-
});
|
|
1740
|
-
}
|
|
1741
1741
|
function InlineMarkdown({ text, as: Tag = "span", ...rest }) {
|
|
1742
1742
|
return /* @__PURE__ */ jsx(
|
|
1743
1743
|
Tag,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsonresume-theme-two-column-modernist",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Structured European minimalism with asymmetric two-column layout and neutral grotesk typography",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"swiss-design"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@jsonresume/core": "0.4.
|
|
18
|
+
"@jsonresume/core": "0.4.1",
|
|
19
19
|
"styled-components": "6.1.19"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|