jsonresume-theme-monochrome-noir 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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # jsonresume-theme-monochrome-noir
2
2
 
3
+ ## 1.1.14
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [601e883]
8
+ - @jsonresume/core@0.4.1
9
+
3
10
  ## 1.1.13
4
11
 
5
12
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1444,6 +1444,50 @@ function SectionTitle({
1444
1444
  }
1445
1445
  );
1446
1446
  }
1447
+ const ESCAPES = {
1448
+ "&": "&",
1449
+ "<": "&lt;",
1450
+ ">": "&gt;",
1451
+ '"': "&quot;",
1452
+ "'": "&#39;"
1453
+ };
1454
+ const escapeHtml = (text) => text.replace(/[&<>"']/g, (c) => ESCAPES[c]);
1455
+ const ESCAPABLE = /\\([\\`*_[\]()!#])/g;
1456
+ const CODE = /`([^`]+)`/g;
1457
+ const LINK = /\[([^\]]+)\]\(([^)\s]+)\)/g;
1458
+ const STRONG = /\*\*(?=\S)([^*]*?\S)\*\*|__(?=\S)([^_]*?\S)__/g;
1459
+ const EMPHASIS = /\*(?=\S)([^*]*?\S)\*|(^|[^\p{L}\p{N}_])_(?=\S)([^_]*?\S)_(?![\p{L}\p{N}_])/gu;
1460
+ const safeHref = (url) => /^(https?:\/\/|mailto:)/i.test(url) ? url : void 0;
1461
+ const emphasis = (text, strong, em) => text.replace(STRONG, (_2, a, b2) => strong(a ?? b2)).replace(
1462
+ EMPHASIS,
1463
+ (_2, a, before, b2) => a !== void 0 ? em(a) : `${before}${em(b2)}`
1464
+ );
1465
+ const inline = (text, out) => {
1466
+ const kept = [];
1467
+ const keep = (value) => `${kept.push(value) - 1}`;
1468
+ const marks = (t) => emphasis(t, out.strong, out.em);
1469
+ const rest = text.replace(/\uE000/g, "").replace(ESCAPABLE, (_2, c) => keep(out.text(c))).replace(CODE, (_2, body) => keep(out.code(body))).replace(
1470
+ LINK,
1471
+ (_2, label, url) => keep(out.link(marks(out.text(label)), url))
1472
+ );
1473
+ return marks(out.text(rest)).replace(
1474
+ /\uE000(\d+)\uE000/g,
1475
+ (_2, i) => kept[Number(i)]
1476
+ );
1477
+ };
1478
+ function renderInlineMarkdown(text) {
1479
+ if (typeof text !== "string") return "";
1480
+ return inline(text, {
1481
+ text: escapeHtml,
1482
+ code: (body) => `<code>${escapeHtml(body)}</code>`,
1483
+ link: (label, url) => {
1484
+ const href = safeHref(url);
1485
+ return href ? `<a href="${escapeHtml(href)}">${label}</a>` : label;
1486
+ },
1487
+ strong: (t) => `<strong>${t}</strong>`,
1488
+ em: (t) => `<em>${t}</em>`
1489
+ });
1490
+ }
1447
1491
  dt.div`
1448
1492
  margin-bottom: ${(props) => props.theme?.spacing?.item || "var(--resume-space-item, 1rem)"};
1449
1493
 
@@ -1813,50 +1857,6 @@ dt.span`
1813
1857
  }
1814
1858
  }
1815
1859
  `;
1816
- const ESCAPES = {
1817
- "&": "&amp;",
1818
- "<": "&lt;",
1819
- ">": "&gt;",
1820
- '"': "&quot;",
1821
- "'": "&#39;"
1822
- };
1823
- const escapeHtml = (text) => text.replace(/[&<>"']/g, (c) => ESCAPES[c]);
1824
- const ESCAPABLE = /\\([\\`*_[\]()!#])/g;
1825
- const CODE = /`([^`]+)`/g;
1826
- const LINK = /\[([^\]]+)\]\(([^)\s]+)\)/g;
1827
- const STRONG = /\*\*(?=\S)([^*]*?\S)\*\*|__(?=\S)([^_]*?\S)__/g;
1828
- const EMPHASIS = /\*(?=\S)([^*]*?\S)\*|(^|[^\p{L}\p{N}_])_(?=\S)([^_]*?\S)_(?![\p{L}\p{N}_])/gu;
1829
- const safeHref = (url) => /^(https?:\/\/|mailto:)/i.test(url) ? url : void 0;
1830
- const emphasis = (text, strong, em) => text.replace(STRONG, (_2, a, b2) => strong(a ?? b2)).replace(
1831
- EMPHASIS,
1832
- (_2, a, before, b2) => a !== void 0 ? em(a) : `${before}${em(b2)}`
1833
- );
1834
- const inline = (text, out) => {
1835
- const kept = [];
1836
- const keep = (value) => `${kept.push(value) - 1}`;
1837
- const marks = (t) => emphasis(t, out.strong, out.em);
1838
- const rest = text.replace(/\uE000/g, "").replace(ESCAPABLE, (_2, c) => keep(out.text(c))).replace(CODE, (_2, body) => keep(out.code(body))).replace(
1839
- LINK,
1840
- (_2, label, url) => keep(out.link(marks(out.text(label)), url))
1841
- );
1842
- return marks(out.text(rest)).replace(
1843
- /\uE000(\d+)\uE000/g,
1844
- (_2, i) => kept[Number(i)]
1845
- );
1846
- };
1847
- function renderInlineMarkdown(text) {
1848
- if (typeof text !== "string") return "";
1849
- return inline(text, {
1850
- text: escapeHtml,
1851
- code: (body) => `<code>${escapeHtml(body)}</code>`,
1852
- link: (label, url) => {
1853
- const href = safeHref(url);
1854
- return href ? `<a href="${escapeHtml(href)}">${label}</a>` : label;
1855
- },
1856
- strong: (t) => `<strong>${t}</strong>`,
1857
- em: (t) => `<em>${t}</em>`
1858
- });
1859
- }
1860
1860
  function InlineMarkdown({ text, as: Tag = "span", ...rest }) {
1861
1861
  return /* @__PURE__ */ jsx(
1862
1862
  Tag,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsonresume-theme-monochrome-noir",
3
- "version": "1.1.13",
3
+ "version": "1.1.14",
4
4
  "description": "Sharp, modern, ultra-clean theme with bold contrasts and minimal design",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",
@@ -20,7 +20,7 @@
20
20
  "react": "^19.2.0",
21
21
  "react-dom": "^19.2.0",
22
22
  "styled-components": "^6.1.19",
23
- "@jsonresume/core": "0.4.0"
23
+ "@jsonresume/core": "0.4.1"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react": "^19.2.0",