jsonresume-theme-marketing-narrative 0.2.13 → 0.2.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
|
@@ -1455,6 +1455,50 @@ function SectionTitle({
|
|
|
1455
1455
|
}
|
|
1456
1456
|
);
|
|
1457
1457
|
}
|
|
1458
|
+
const ESCAPES = {
|
|
1459
|
+
"&": "&",
|
|
1460
|
+
"<": "<",
|
|
1461
|
+
">": ">",
|
|
1462
|
+
'"': """,
|
|
1463
|
+
"'": "'"
|
|
1464
|
+
};
|
|
1465
|
+
const escapeHtml = (text) => text.replace(/[&<>"']/g, (c) => ESCAPES[c]);
|
|
1466
|
+
const ESCAPABLE = /\\([\\`*_[\]()!#])/g;
|
|
1467
|
+
const CODE = /`([^`]+)`/g;
|
|
1468
|
+
const LINK = /\[([^\]]+)\]\(([^)\s]+)\)/g;
|
|
1469
|
+
const STRONG = /\*\*(?=\S)([^*]*?\S)\*\*|__(?=\S)([^_]*?\S)__/g;
|
|
1470
|
+
const EMPHASIS = /\*(?=\S)([^*]*?\S)\*|(^|[^\p{L}\p{N}_])_(?=\S)([^_]*?\S)_(?![\p{L}\p{N}_])/gu;
|
|
1471
|
+
const safeHref = (url) => /^(https?:\/\/|mailto:)/i.test(url) ? url : void 0;
|
|
1472
|
+
const emphasis = (text, strong, em) => text.replace(STRONG, (_2, a, b2) => strong(a ?? b2)).replace(
|
|
1473
|
+
EMPHASIS,
|
|
1474
|
+
(_2, a, before, b2) => a !== void 0 ? em(a) : `${before}${em(b2)}`
|
|
1475
|
+
);
|
|
1476
|
+
const inline = (text, out) => {
|
|
1477
|
+
const kept = [];
|
|
1478
|
+
const keep = (value) => `${kept.push(value) - 1}`;
|
|
1479
|
+
const marks = (t) => emphasis(t, out.strong, out.em);
|
|
1480
|
+
const rest = text.replace(/\uE000/g, "").replace(ESCAPABLE, (_2, c) => keep(out.text(c))).replace(CODE, (_2, body) => keep(out.code(body))).replace(
|
|
1481
|
+
LINK,
|
|
1482
|
+
(_2, label, url) => keep(out.link(marks(out.text(label)), url))
|
|
1483
|
+
);
|
|
1484
|
+
return marks(out.text(rest)).replace(
|
|
1485
|
+
/\uE000(\d+)\uE000/g,
|
|
1486
|
+
(_2, i) => kept[Number(i)]
|
|
1487
|
+
);
|
|
1488
|
+
};
|
|
1489
|
+
function renderInlineMarkdown(text) {
|
|
1490
|
+
if (typeof text !== "string") return "";
|
|
1491
|
+
return inline(text, {
|
|
1492
|
+
text: escapeHtml,
|
|
1493
|
+
code: (body) => `<code>${escapeHtml(body)}</code>`,
|
|
1494
|
+
link: (label, url) => {
|
|
1495
|
+
const href = safeHref(url);
|
|
1496
|
+
return href ? `<a href="${escapeHtml(href)}">${label}</a>` : label;
|
|
1497
|
+
},
|
|
1498
|
+
strong: (t) => `<strong>${t}</strong>`,
|
|
1499
|
+
em: (t) => `<em>${t}</em>`
|
|
1500
|
+
});
|
|
1501
|
+
}
|
|
1458
1502
|
dt.div`
|
|
1459
1503
|
margin-bottom: ${(props) => props.theme?.spacing?.item || "var(--resume-space-item, 1rem)"};
|
|
1460
1504
|
|
|
@@ -1783,50 +1827,6 @@ dt.span`
|
|
|
1783
1827
|
}
|
|
1784
1828
|
}
|
|
1785
1829
|
`;
|
|
1786
|
-
const ESCAPES = {
|
|
1787
|
-
"&": "&",
|
|
1788
|
-
"<": "<",
|
|
1789
|
-
">": ">",
|
|
1790
|
-
'"': """,
|
|
1791
|
-
"'": "'"
|
|
1792
|
-
};
|
|
1793
|
-
const escapeHtml = (text) => text.replace(/[&<>"']/g, (c) => ESCAPES[c]);
|
|
1794
|
-
const ESCAPABLE = /\\([\\`*_[\]()!#])/g;
|
|
1795
|
-
const CODE = /`([^`]+)`/g;
|
|
1796
|
-
const LINK = /\[([^\]]+)\]\(([^)\s]+)\)/g;
|
|
1797
|
-
const STRONG = /\*\*(?=\S)([^*]*?\S)\*\*|__(?=\S)([^_]*?\S)__/g;
|
|
1798
|
-
const EMPHASIS = /\*(?=\S)([^*]*?\S)\*|(^|[^\p{L}\p{N}_])_(?=\S)([^_]*?\S)_(?![\p{L}\p{N}_])/gu;
|
|
1799
|
-
const safeHref = (url) => /^(https?:\/\/|mailto:)/i.test(url) ? url : void 0;
|
|
1800
|
-
const emphasis = (text, strong, em) => text.replace(STRONG, (_2, a, b2) => strong(a ?? b2)).replace(
|
|
1801
|
-
EMPHASIS,
|
|
1802
|
-
(_2, a, before, b2) => a !== void 0 ? em(a) : `${before}${em(b2)}`
|
|
1803
|
-
);
|
|
1804
|
-
const inline = (text, out) => {
|
|
1805
|
-
const kept = [];
|
|
1806
|
-
const keep = (value) => `${kept.push(value) - 1}`;
|
|
1807
|
-
const marks = (t) => emphasis(t, out.strong, out.em);
|
|
1808
|
-
const rest = text.replace(/\uE000/g, "").replace(ESCAPABLE, (_2, c) => keep(out.text(c))).replace(CODE, (_2, body) => keep(out.code(body))).replace(
|
|
1809
|
-
LINK,
|
|
1810
|
-
(_2, label, url) => keep(out.link(marks(out.text(label)), url))
|
|
1811
|
-
);
|
|
1812
|
-
return marks(out.text(rest)).replace(
|
|
1813
|
-
/\uE000(\d+)\uE000/g,
|
|
1814
|
-
(_2, i) => kept[Number(i)]
|
|
1815
|
-
);
|
|
1816
|
-
};
|
|
1817
|
-
function renderInlineMarkdown(text) {
|
|
1818
|
-
if (typeof text !== "string") return "";
|
|
1819
|
-
return inline(text, {
|
|
1820
|
-
text: escapeHtml,
|
|
1821
|
-
code: (body) => `<code>${escapeHtml(body)}</code>`,
|
|
1822
|
-
link: (label, url) => {
|
|
1823
|
-
const href = safeHref(url);
|
|
1824
|
-
return href ? `<a href="${escapeHtml(href)}">${label}</a>` : label;
|
|
1825
|
-
},
|
|
1826
|
-
strong: (t) => `<strong>${t}</strong>`,
|
|
1827
|
-
em: (t) => `<em>${t}</em>`
|
|
1828
|
-
});
|
|
1829
|
-
}
|
|
1830
1830
|
function InlineMarkdown({ text, as: Tag = "span", ...rest }) {
|
|
1831
1831
|
return /* @__PURE__ */ jsx(
|
|
1832
1832
|
Tag,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsonresume-theme-marketing-narrative",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "Marketing professionals - your narrative and campaigns are the focus",
|
|
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.4.
|
|
22
|
+
"@jsonresume/core": "0.4.1"
|
|
23
23
|
},
|
|
24
24
|
"exports": {
|
|
25
25
|
".": {
|