jsonresume-theme-investor-brief 0.2.13 → 0.2.15
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 +13 -0
- package/dist/index.js +70 -11
- package/package.json +2 -2
- package/src/Resume.jsx +15 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# jsonresume-theme-investor-brief
|
|
2
2
|
|
|
3
|
+
## 0.2.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [601e883]
|
|
8
|
+
- @jsonresume/core@0.4.1
|
|
9
|
+
|
|
10
|
+
## 0.2.14
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 2b3af11: Render inline Markdown (bold, emphasis, code, links) in summaries, descriptions and highlights with the shared renderer from @jsonresume/core (#600).
|
|
15
|
+
|
|
3
16
|
## 0.2.13
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
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
|
|
|
@@ -1787,16 +1831,16 @@ const StyledLink = dt.a`
|
|
|
1787
1831
|
}
|
|
1788
1832
|
`;
|
|
1789
1833
|
function Link({ href, children, className, ...rest }) {
|
|
1790
|
-
const
|
|
1791
|
-
if (!
|
|
1834
|
+
const safeHref2 = safeUrl(href);
|
|
1835
|
+
if (!safeHref2) {
|
|
1792
1836
|
return /* @__PURE__ */ jsx("span", { className, children });
|
|
1793
1837
|
}
|
|
1794
|
-
const isExternal = isExternalUrl(
|
|
1838
|
+
const isExternal = isExternalUrl(safeHref2);
|
|
1795
1839
|
const externalProps = isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {};
|
|
1796
1840
|
return /* @__PURE__ */ jsx(
|
|
1797
1841
|
StyledLink,
|
|
1798
1842
|
{
|
|
1799
|
-
href:
|
|
1843
|
+
href: safeHref2,
|
|
1800
1844
|
className: `resume-link ${className || ""}`.trim(),
|
|
1801
1845
|
...externalProps,
|
|
1802
1846
|
...rest,
|
|
@@ -1824,6 +1868,15 @@ dt.span`
|
|
|
1824
1868
|
}
|
|
1825
1869
|
}
|
|
1826
1870
|
`;
|
|
1871
|
+
function InlineMarkdown({ text, as: Tag = "span", ...rest }) {
|
|
1872
|
+
return /* @__PURE__ */ jsx(
|
|
1873
|
+
Tag,
|
|
1874
|
+
{
|
|
1875
|
+
...rest,
|
|
1876
|
+
dangerouslySetInnerHTML: { __html: renderInlineMarkdown(text) }
|
|
1877
|
+
}
|
|
1878
|
+
);
|
|
1879
|
+
}
|
|
1827
1880
|
dt.hr`
|
|
1828
1881
|
border: none;
|
|
1829
1882
|
border-top: 0.5pt solid
|
|
@@ -6379,7 +6432,7 @@ function Resume({ resume }) {
|
|
|
6379
6432
|
basics.label && /* @__PURE__ */ jsx(Label, { children: basics.label }),
|
|
6380
6433
|
/* @__PURE__ */ jsx(ContactWrapper, { children: /* @__PURE__ */ jsx(ContactInfo, { basics }) })
|
|
6381
6434
|
] }),
|
|
6382
|
-
basics.summary && /* @__PURE__ */ jsx(SummarySection, { children: /* @__PURE__ */ jsx(
|
|
6435
|
+
basics.summary && /* @__PURE__ */ jsx(SummarySection, { children: /* @__PURE__ */ jsx(InlineMarkdown, { as: SummaryText, text: basics.summary }) }),
|
|
6383
6436
|
keyMetrics.length > 0 && /* @__PURE__ */ jsxs(MainSection, { children: [
|
|
6384
6437
|
/* @__PURE__ */ jsx(MainSectionTitle, { children: "Key Metrics" }),
|
|
6385
6438
|
/* @__PURE__ */ jsx(MetricsGrid, { children: keyMetrics.map((metric, index) => /* @__PURE__ */ jsxs(MetricCard, { children: [
|
|
@@ -6395,8 +6448,8 @@ function Resume({ resume }) {
|
|
|
6395
6448
|
/* @__PURE__ */ jsx(WorkMeta, { children: /* @__PURE__ */ jsx(DateRange, { startDate: job.startDate, endDate: job.endDate }) })
|
|
6396
6449
|
] }),
|
|
6397
6450
|
job.name && /* @__PURE__ */ jsx(WorkCompany, { children: job.name }),
|
|
6398
|
-
job.summary && /* @__PURE__ */ jsx(
|
|
6399
|
-
job.highlights && job.highlights.length > 0 && /* @__PURE__ */ jsx(WorkHighlights, { children: job.highlights.map((highlight, i) => /* @__PURE__ */ jsx("li",
|
|
6451
|
+
job.summary && /* @__PURE__ */ jsx(InlineMarkdown, { as: WorkDescription, text: job.summary }),
|
|
6452
|
+
job.highlights && job.highlights.length > 0 && /* @__PURE__ */ jsx(WorkHighlights, { children: job.highlights.map((highlight, i) => /* @__PURE__ */ jsx(InlineMarkdown, { as: "li", text: highlight }, i)) })
|
|
6400
6453
|
] }, index))
|
|
6401
6454
|
] }),
|
|
6402
6455
|
skills.length > 0 && /* @__PURE__ */ jsxs(MainSection, { children: [
|
|
@@ -6419,8 +6472,14 @@ function Resume({ resume }) {
|
|
|
6419
6472
|
}
|
|
6420
6473
|
) })
|
|
6421
6474
|
] }),
|
|
6422
|
-
project.description && /* @__PURE__ */ jsx(
|
|
6423
|
-
|
|
6475
|
+
project.description && /* @__PURE__ */ jsx(
|
|
6476
|
+
InlineMarkdown,
|
|
6477
|
+
{
|
|
6478
|
+
as: WorkDescription,
|
|
6479
|
+
text: project.description
|
|
6480
|
+
}
|
|
6481
|
+
),
|
|
6482
|
+
project.highlights && project.highlights.length > 0 && /* @__PURE__ */ jsx(WorkHighlights, { children: project.highlights.map((highlight, i) => /* @__PURE__ */ jsx(InlineMarkdown, { as: "li", text: highlight }, i)) })
|
|
6424
6483
|
] }, index))
|
|
6425
6484
|
] }),
|
|
6426
6485
|
education.length > 0 && /* @__PURE__ */ jsxs(MainSection, { children: [
|
|
@@ -6449,8 +6508,8 @@ function Resume({ resume }) {
|
|
|
6449
6508
|
/* @__PURE__ */ jsx(WorkMeta, { children: /* @__PURE__ */ jsx(DateRange, { startDate: vol.startDate, endDate: vol.endDate }) })
|
|
6450
6509
|
] }),
|
|
6451
6510
|
/* @__PURE__ */ jsx(WorkCompany, { children: vol.organization }),
|
|
6452
|
-
vol.summary && /* @__PURE__ */ jsx(
|
|
6453
|
-
vol.highlights && vol.highlights.length > 0 && /* @__PURE__ */ jsx(WorkHighlights, { children: vol.highlights.map((highlight, i) => /* @__PURE__ */ jsx("li",
|
|
6511
|
+
vol.summary && /* @__PURE__ */ jsx(InlineMarkdown, { as: WorkDescription, text: vol.summary }),
|
|
6512
|
+
vol.highlights && vol.highlights.length > 0 && /* @__PURE__ */ jsx(WorkHighlights, { children: vol.highlights.map((highlight, i) => /* @__PURE__ */ jsx(InlineMarkdown, { as: "li", text: highlight }, i)) })
|
|
6454
6513
|
] }, index))
|
|
6455
6514
|
] }),
|
|
6456
6515
|
awards.length > 0 && /* @__PURE__ */ jsxs(MainSection, { children: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsonresume-theme-investor-brief",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15",
|
|
4
4
|
"description": "Crisp, analytical, results-focused theme resembling a fund report. Data-first with Key Metrics section.",
|
|
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.
|
|
13
|
+
"@jsonresume/core": "0.4.1"
|
|
14
14
|
},
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|
package/src/Resume.jsx
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
ContactInfo,
|
|
8
8
|
Link,
|
|
9
9
|
safeUrl,
|
|
10
|
+
InlineMarkdown,
|
|
10
11
|
} from '@jsonresume/core';
|
|
11
12
|
|
|
12
13
|
const Layout = styled.div`
|
|
@@ -298,7 +299,7 @@ function Resume({ resume }) {
|
|
|
298
299
|
|
|
299
300
|
{basics.summary && (
|
|
300
301
|
<SummarySection>
|
|
301
|
-
<SummaryText
|
|
302
|
+
<InlineMarkdown as={SummaryText} text={basics.summary} />
|
|
302
303
|
</SummarySection>
|
|
303
304
|
)}
|
|
304
305
|
|
|
@@ -328,11 +329,13 @@ function Resume({ resume }) {
|
|
|
328
329
|
</WorkMeta>
|
|
329
330
|
</WorkHeader>
|
|
330
331
|
{job.name && <WorkCompany>{job.name}</WorkCompany>}
|
|
331
|
-
{job.summary &&
|
|
332
|
+
{job.summary && (
|
|
333
|
+
<InlineMarkdown as={WorkDescription} text={job.summary} />
|
|
334
|
+
)}
|
|
332
335
|
{job.highlights && job.highlights.length > 0 && (
|
|
333
336
|
<WorkHighlights>
|
|
334
337
|
{job.highlights.map((highlight, i) => (
|
|
335
|
-
<li key={i}
|
|
338
|
+
<InlineMarkdown as="li" key={i} text={highlight} />
|
|
336
339
|
))}
|
|
337
340
|
</WorkHighlights>
|
|
338
341
|
)}
|
|
@@ -380,12 +383,15 @@ function Resume({ resume }) {
|
|
|
380
383
|
)}
|
|
381
384
|
</WorkHeader>
|
|
382
385
|
{project.description && (
|
|
383
|
-
<
|
|
386
|
+
<InlineMarkdown
|
|
387
|
+
as={WorkDescription}
|
|
388
|
+
text={project.description}
|
|
389
|
+
/>
|
|
384
390
|
)}
|
|
385
391
|
{project.highlights && project.highlights.length > 0 && (
|
|
386
392
|
<WorkHighlights>
|
|
387
393
|
{project.highlights.map((highlight, i) => (
|
|
388
|
-
<li key={i}
|
|
394
|
+
<InlineMarkdown as="li" key={i} text={highlight} />
|
|
389
395
|
))}
|
|
390
396
|
</WorkHighlights>
|
|
391
397
|
)}
|
|
@@ -428,11 +434,13 @@ function Resume({ resume }) {
|
|
|
428
434
|
</WorkMeta>
|
|
429
435
|
</WorkHeader>
|
|
430
436
|
<WorkCompany>{vol.organization}</WorkCompany>
|
|
431
|
-
{vol.summary &&
|
|
437
|
+
{vol.summary && (
|
|
438
|
+
<InlineMarkdown as={WorkDescription} text={vol.summary} />
|
|
439
|
+
)}
|
|
432
440
|
{vol.highlights && vol.highlights.length > 0 && (
|
|
433
441
|
<WorkHighlights>
|
|
434
442
|
{vol.highlights.map((highlight, i) => (
|
|
435
|
-
<li key={i}
|
|
443
|
+
<InlineMarkdown as="li" key={i} text={highlight} />
|
|
436
444
|
))}
|
|
437
445
|
</WorkHighlights>
|
|
438
446
|
)}
|