jsonresume-theme-minimalist-grid 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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # jsonresume-theme-minimalist-grid
2
2
 
3
+ ## 0.2.14
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [601e883]
8
+ - @jsonresume/core@0.4.1
9
+
3
10
  ## 0.2.13
4
11
 
5
12
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1455,6 +1455,50 @@ function SectionTitle({
1455
1455
  }
1456
1456
  );
1457
1457
  }
1458
+ const ESCAPES = {
1459
+ "&": "&",
1460
+ "<": "&lt;",
1461
+ ">": "&gt;",
1462
+ '"': "&quot;",
1463
+ "'": "&#39;"
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
 
@@ -1860,50 +1904,6 @@ dt.span`
1860
1904
  }
1861
1905
  }
1862
1906
  `;
1863
- const ESCAPES = {
1864
- "&": "&amp;",
1865
- "<": "&lt;",
1866
- ">": "&gt;",
1867
- '"': "&quot;",
1868
- "'": "&#39;"
1869
- };
1870
- const escapeHtml = (text) => text.replace(/[&<>"']/g, (c) => ESCAPES[c]);
1871
- const ESCAPABLE = /\\([\\`*_[\]()!#])/g;
1872
- const CODE = /`([^`]+)`/g;
1873
- const LINK = /\[([^\]]+)\]\(([^)\s]+)\)/g;
1874
- const STRONG = /\*\*(?=\S)([^*]*?\S)\*\*|__(?=\S)([^_]*?\S)__/g;
1875
- const EMPHASIS = /\*(?=\S)([^*]*?\S)\*|(^|[^\p{L}\p{N}_])_(?=\S)([^_]*?\S)_(?![\p{L}\p{N}_])/gu;
1876
- const safeHref = (url) => /^(https?:\/\/|mailto:)/i.test(url) ? url : void 0;
1877
- const emphasis = (text, strong, em) => text.replace(STRONG, (_2, a, b2) => strong(a ?? b2)).replace(
1878
- EMPHASIS,
1879
- (_2, a, before, b2) => a !== void 0 ? em(a) : `${before}${em(b2)}`
1880
- );
1881
- const inline = (text, out) => {
1882
- const kept = [];
1883
- const keep = (value) => `${kept.push(value) - 1}`;
1884
- const marks = (t) => emphasis(t, out.strong, out.em);
1885
- const rest = text.replace(/\uE000/g, "").replace(ESCAPABLE, (_2, c) => keep(out.text(c))).replace(CODE, (_2, body) => keep(out.code(body))).replace(
1886
- LINK,
1887
- (_2, label, url) => keep(out.link(marks(out.text(label)), url))
1888
- );
1889
- return marks(out.text(rest)).replace(
1890
- /\uE000(\d+)\uE000/g,
1891
- (_2, i) => kept[Number(i)]
1892
- );
1893
- };
1894
- function renderInlineMarkdown(text) {
1895
- if (typeof text !== "string") return "";
1896
- return inline(text, {
1897
- text: escapeHtml,
1898
- code: (body) => `<code>${escapeHtml(body)}</code>`,
1899
- link: (label, url) => {
1900
- const href = safeHref(url);
1901
- return href ? `<a href="${escapeHtml(href)}">${label}</a>` : label;
1902
- },
1903
- strong: (t) => `<strong>${t}</strong>`,
1904
- em: (t) => `<em>${t}</em>`
1905
- });
1906
- }
1907
1907
  function InlineMarkdown({ text, as: Tag = "span", ...rest }) {
1908
1908
  return /* @__PURE__ */ jsx(
1909
1909
  Tag,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsonresume-theme-minimalist-grid",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "description": "Clean, contemporary theme with geometric precision and baseline grid alignment. For minimalists and designers.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "styled-components": "^6.1.19",
13
- "@jsonresume/core": "0.4.0"
13
+ "@jsonresume/core": "0.4.1"
14
14
  },
15
15
  "exports": {
16
16
  ".": {