jsonresume-theme-coastal-creative 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 +6 -0
- package/dist/index.js +70 -11
- package/package.json +1 -1
- package/src/Resume.jsx +15 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# jsonresume-theme-coastal-creative
|
|
2
2
|
|
|
3
|
+
## 0.2.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2b3af11: Render inline Markdown (bold, emphasis, code, links) in summaries, descriptions and highlights with the shared renderer from @jsonresume/core (#600).
|
|
8
|
+
|
|
3
9
|
## 0.2.13
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1823,16 +1823,16 @@ const StyledLink = dt.a`
|
|
|
1823
1823
|
}
|
|
1824
1824
|
`;
|
|
1825
1825
|
function Link({ href, children, className, ...rest }) {
|
|
1826
|
-
const
|
|
1827
|
-
if (!
|
|
1826
|
+
const safeHref2 = safeUrl(href);
|
|
1827
|
+
if (!safeHref2) {
|
|
1828
1828
|
return /* @__PURE__ */ jsx("span", { className, children });
|
|
1829
1829
|
}
|
|
1830
|
-
const isExternal = isExternalUrl(
|
|
1830
|
+
const isExternal = isExternalUrl(safeHref2);
|
|
1831
1831
|
const externalProps = isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {};
|
|
1832
1832
|
return /* @__PURE__ */ jsx(
|
|
1833
1833
|
StyledLink,
|
|
1834
1834
|
{
|
|
1835
|
-
href:
|
|
1835
|
+
href: safeHref2,
|
|
1836
1836
|
className: `resume-link ${className || ""}`.trim(),
|
|
1837
1837
|
...externalProps,
|
|
1838
1838
|
...rest,
|
|
@@ -1860,6 +1860,59 @@ dt.span`
|
|
|
1860
1860
|
}
|
|
1861
1861
|
}
|
|
1862
1862
|
`;
|
|
1863
|
+
const ESCAPES = {
|
|
1864
|
+
"&": "&",
|
|
1865
|
+
"<": "<",
|
|
1866
|
+
">": ">",
|
|
1867
|
+
'"': """,
|
|
1868
|
+
"'": "'"
|
|
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
|
+
function InlineMarkdown({ text, as: Tag = "span", ...rest }) {
|
|
1908
|
+
return /* @__PURE__ */ jsx(
|
|
1909
|
+
Tag,
|
|
1910
|
+
{
|
|
1911
|
+
...rest,
|
|
1912
|
+
dangerouslySetInnerHTML: { __html: renderInlineMarkdown(text) }
|
|
1913
|
+
}
|
|
1914
|
+
);
|
|
1915
|
+
}
|
|
1863
1916
|
dt.hr`
|
|
1864
1917
|
border: none;
|
|
1865
1918
|
border-top: 0.5pt solid
|
|
@@ -6366,7 +6419,7 @@ function Resume({ resume }) {
|
|
|
6366
6419
|
basics.label && /* @__PURE__ */ jsx(Label, { children: basics.label }),
|
|
6367
6420
|
/* @__PURE__ */ jsx(ContactWrapper, { children: /* @__PURE__ */ jsx(ContactInfo, { basics }) })
|
|
6368
6421
|
] }),
|
|
6369
|
-
basics.summary && /* @__PURE__ */ jsx(SummarySection, { children: /* @__PURE__ */ jsx(
|
|
6422
|
+
basics.summary && /* @__PURE__ */ jsx(SummarySection, { children: /* @__PURE__ */ jsx(InlineMarkdown, { as: SummaryText, text: basics.summary }) }),
|
|
6370
6423
|
work.length > 0 && /* @__PURE__ */ jsxs(MainSection, { children: [
|
|
6371
6424
|
/* @__PURE__ */ jsx(MainSectionTitle, { children: "Experience" }),
|
|
6372
6425
|
work.map((job, index) => /* @__PURE__ */ jsxs(WorkItem, { children: [
|
|
@@ -6375,8 +6428,8 @@ function Resume({ resume }) {
|
|
|
6375
6428
|
/* @__PURE__ */ jsx(WorkMeta, { children: /* @__PURE__ */ jsx(DateRange, { startDate: job.startDate, endDate: job.endDate }) })
|
|
6376
6429
|
] }),
|
|
6377
6430
|
job.name && /* @__PURE__ */ jsx(WorkCompany, { children: job.name }),
|
|
6378
|
-
job.summary && /* @__PURE__ */ jsx(
|
|
6379
|
-
job.highlights && job.highlights.length > 0 && /* @__PURE__ */ jsx(WorkHighlights, { children: job.highlights.map((highlight, i) => /* @__PURE__ */ jsx("li",
|
|
6431
|
+
job.summary && /* @__PURE__ */ jsx(InlineMarkdown, { as: WorkDescription, text: job.summary }),
|
|
6432
|
+
job.highlights && job.highlights.length > 0 && /* @__PURE__ */ jsx(WorkHighlights, { children: job.highlights.map((highlight, i) => /* @__PURE__ */ jsx(InlineMarkdown, { as: "li", text: highlight }, i)) })
|
|
6380
6433
|
] }, index))
|
|
6381
6434
|
] }),
|
|
6382
6435
|
skills.length > 0 && /* @__PURE__ */ jsxs(MainSection, { children: [
|
|
@@ -6399,8 +6452,14 @@ function Resume({ resume }) {
|
|
|
6399
6452
|
}
|
|
6400
6453
|
) })
|
|
6401
6454
|
] }),
|
|
6402
|
-
project.description && /* @__PURE__ */ jsx(
|
|
6403
|
-
|
|
6455
|
+
project.description && /* @__PURE__ */ jsx(
|
|
6456
|
+
InlineMarkdown,
|
|
6457
|
+
{
|
|
6458
|
+
as: WorkDescription,
|
|
6459
|
+
text: project.description
|
|
6460
|
+
}
|
|
6461
|
+
),
|
|
6462
|
+
project.highlights && project.highlights.length > 0 && /* @__PURE__ */ jsx(WorkHighlights, { children: project.highlights.map((highlight, i) => /* @__PURE__ */ jsx(InlineMarkdown, { as: "li", text: highlight }, i)) })
|
|
6404
6463
|
] }, index))
|
|
6405
6464
|
] }),
|
|
6406
6465
|
education.length > 0 && /* @__PURE__ */ jsxs(MainSection, { children: [
|
|
@@ -6429,8 +6488,8 @@ function Resume({ resume }) {
|
|
|
6429
6488
|
/* @__PURE__ */ jsx(WorkMeta, { children: /* @__PURE__ */ jsx(DateRange, { startDate: vol.startDate, endDate: vol.endDate }) })
|
|
6430
6489
|
] }),
|
|
6431
6490
|
/* @__PURE__ */ jsx(WorkCompany, { children: vol.organization }),
|
|
6432
|
-
vol.summary && /* @__PURE__ */ jsx(
|
|
6433
|
-
vol.highlights && vol.highlights.length > 0 && /* @__PURE__ */ jsx(WorkHighlights, { children: vol.highlights.map((highlight, i) => /* @__PURE__ */ jsx("li",
|
|
6491
|
+
vol.summary && /* @__PURE__ */ jsx(InlineMarkdown, { as: WorkDescription, text: vol.summary }),
|
|
6492
|
+
vol.highlights && vol.highlights.length > 0 && /* @__PURE__ */ jsx(WorkHighlights, { children: vol.highlights.map((highlight, i) => /* @__PURE__ */ jsx(InlineMarkdown, { as: "li", text: highlight }, i)) })
|
|
6434
6493
|
] }, index))
|
|
6435
6494
|
] }),
|
|
6436
6495
|
awards.length > 0 && /* @__PURE__ */ jsxs(MainSection, { children: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsonresume-theme-coastal-creative",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "Calm, spacious theme with ocean blue accents and generous line heights. Design-forward yet approachable.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
package/src/Resume.jsx
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
ContactInfo,
|
|
10
10
|
Link,
|
|
11
11
|
safeUrl,
|
|
12
|
+
InlineMarkdown,
|
|
12
13
|
} from '@jsonresume/core';
|
|
13
14
|
|
|
14
15
|
const Layout = styled.div`
|
|
@@ -236,7 +237,7 @@ function Resume({ resume }) {
|
|
|
236
237
|
|
|
237
238
|
{basics.summary && (
|
|
238
239
|
<SummarySection>
|
|
239
|
-
<SummaryText
|
|
240
|
+
<InlineMarkdown as={SummaryText} text={basics.summary} />
|
|
240
241
|
</SummarySection>
|
|
241
242
|
)}
|
|
242
243
|
|
|
@@ -252,11 +253,13 @@ function Resume({ resume }) {
|
|
|
252
253
|
</WorkMeta>
|
|
253
254
|
</WorkHeader>
|
|
254
255
|
{job.name && <WorkCompany>{job.name}</WorkCompany>}
|
|
255
|
-
{job.summary &&
|
|
256
|
+
{job.summary && (
|
|
257
|
+
<InlineMarkdown as={WorkDescription} text={job.summary} />
|
|
258
|
+
)}
|
|
256
259
|
{job.highlights && job.highlights.length > 0 && (
|
|
257
260
|
<WorkHighlights>
|
|
258
261
|
{job.highlights.map((highlight, i) => (
|
|
259
|
-
<li key={i}
|
|
262
|
+
<InlineMarkdown as="li" key={i} text={highlight} />
|
|
260
263
|
))}
|
|
261
264
|
</WorkHighlights>
|
|
262
265
|
)}
|
|
@@ -306,12 +309,15 @@ function Resume({ resume }) {
|
|
|
306
309
|
)}
|
|
307
310
|
</WorkHeader>
|
|
308
311
|
{project.description && (
|
|
309
|
-
<
|
|
312
|
+
<InlineMarkdown
|
|
313
|
+
as={WorkDescription}
|
|
314
|
+
text={project.description}
|
|
315
|
+
/>
|
|
310
316
|
)}
|
|
311
317
|
{project.highlights && project.highlights.length > 0 && (
|
|
312
318
|
<WorkHighlights>
|
|
313
319
|
{project.highlights.map((highlight, i) => (
|
|
314
|
-
<li key={i}
|
|
320
|
+
<InlineMarkdown as="li" key={i} text={highlight} />
|
|
315
321
|
))}
|
|
316
322
|
</WorkHighlights>
|
|
317
323
|
)}
|
|
@@ -354,11 +360,13 @@ function Resume({ resume }) {
|
|
|
354
360
|
</WorkMeta>
|
|
355
361
|
</WorkHeader>
|
|
356
362
|
<WorkCompany>{vol.organization}</WorkCompany>
|
|
357
|
-
{vol.summary &&
|
|
363
|
+
{vol.summary && (
|
|
364
|
+
<InlineMarkdown as={WorkDescription} text={vol.summary} />
|
|
365
|
+
)}
|
|
358
366
|
{vol.highlights && vol.highlights.length > 0 && (
|
|
359
367
|
<WorkHighlights>
|
|
360
368
|
{vol.highlights.map((highlight, i) => (
|
|
361
|
-
<li key={i}
|
|
369
|
+
<InlineMarkdown as="li" key={i} text={highlight} />
|
|
362
370
|
))}
|
|
363
371
|
</WorkHighlights>
|
|
364
372
|
)}
|