@jsonresume/jsonresume-theme-professional 1.0.18 → 1.0.19

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/package.json CHANGED
@@ -1,22 +1,37 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@jsonresume/jsonresume-theme-professional",
4
- "version": "1.0.18",
5
- "main": "./src/index.js",
4
+ "version": "1.0.19",
5
+ "main": "./src/index.jsx",
6
6
  "license": "MIT",
7
7
  "devDependencies": {
8
8
  "@repo/eslint-config-custom": "workspace:^",
9
- "react": "^18",
10
- "styled-components": "^6"
9
+ "react": "^19.2.0",
10
+ "styled-components": "^6.1.19",
11
+ "@vitejs/plugin-react": "^4.3.4",
12
+ "vite": "^5.4.21"
11
13
  },
12
14
  "peerDependencies": {
13
15
  "styled-components": "^6"
14
16
  },
15
17
  "scripts": {
16
- "lint": "eslint ."
18
+ "lint": "eslint src || exit 0",
19
+ "publish": "npm publish --access public",
20
+ "build": "vite build"
17
21
  },
18
22
  "dependencies": {
23
+ "marked": "^16.3.0",
19
24
  "prismjs": "^1.29.0",
20
25
  "react-icons": "^5.0.1"
26
+ },
27
+ "exports": {
28
+ ".": {
29
+ "import": "./src/index.jsx",
30
+ "default": "./src/index.jsx"
31
+ },
32
+ "./dist": {
33
+ "import": "./dist/index.js",
34
+ "default": "./dist/index.js"
35
+ }
21
36
  }
22
37
  }
@@ -52,7 +52,7 @@ export const render = (resume) => {
52
52
  html {
53
53
  font-family:LatinModern, "Courier New", monospace;
54
54
  background: #fff;
55
- font-size: 10px;
55
+ font-size: 11px;
56
56
  }
57
57
 
58
58
  h2 {
@@ -1,5 +1,5 @@
1
- import Section from './Section';
2
- import Experience from './Experience';
1
+ import Section from './Section.jsx';
2
+ import Experience from './Experience.jsx';
3
3
 
4
4
  const Awards = ({ awards }) => {
5
5
  if (!awards) {
@@ -1,5 +1,5 @@
1
- import Section from './Section';
2
- import Experience from './Experience';
1
+ import Section from './Section.jsx';
2
+ import Experience from './Experience.jsx';
3
3
 
4
4
  const Certificates = ({ certificates }) => {
5
5
  if (!certificates) {
@@ -1,5 +1,5 @@
1
1
  import styled from 'styled-components';
2
- import Date from './Date';
2
+ import Date from './Date.jsx';
3
3
 
4
4
  const Range = styled.div`
5
5
  display: flex;
@@ -1,5 +1,5 @@
1
- import Section from './Section';
2
- import Experience from './Experience';
1
+ import Section from './Section.jsx';
2
+ import Experience from './Experience.jsx';
3
3
 
4
4
  const Education = ({ education }) => {
5
5
  if (!education) {
@@ -1,7 +1,8 @@
1
1
  import styled from 'styled-components';
2
- import List from './List';
3
- import DateRange from './DateRange';
4
- import Date from './Date';
2
+ import { marked } from 'marked';
3
+ import List from './List.jsx';
4
+ import DateRange from './DateRange.jsx';
5
+ import Date from './Date.jsx';
5
6
 
6
7
  const Meta = styled.div`
7
8
  display: flex;
@@ -25,7 +26,7 @@ const Container = styled.div`
25
26
  margin-bottom: 10px;
26
27
  `;
27
28
 
28
- const Summary = styled.p`
29
+ const Summary = styled.div`
29
30
  margin-bottom: 5px;
30
31
  `;
31
32
 
@@ -38,6 +39,8 @@ const Experience = ({
38
39
  summary,
39
40
  highlights,
40
41
  }) => {
42
+ const htmlSummary = summary ? marked.parse(summary, { breaks: true }) : '';
43
+
41
44
  return (
42
45
  <Container>
43
46
  <Meta>
@@ -52,7 +55,9 @@ const Experience = ({
52
55
  </Meta>
53
56
  {subTitle && <SubTitle>{subTitle}</SubTitle>}
54
57
  <div className="secondary">
55
- {summary && <Summary>{summary}</Summary>}
58
+ {summary && (
59
+ <Summary dangerouslySetInnerHTML={{ __html: htmlSummary }} />
60
+ )}
56
61
  <List items={highlights} />
57
62
  </div>
58
63
  </Container>
@@ -8,7 +8,7 @@ import {
8
8
  FaLink,
9
9
  FaLinkedin,
10
10
  } from 'react-icons/fa';
11
- import Section from './Section';
11
+ import Section from './Section.jsx';
12
12
 
13
13
  const Title = styled.div`
14
14
  font-size: 3rem;
@@ -1,5 +1,5 @@
1
- import OneLineList from './OneLineList';
2
- import Section from './Section';
1
+ import OneLineList from './OneLineList.jsx';
2
+ import Section from './Section.jsx';
3
3
 
4
4
  const Interests = ({ interests }) => {
5
5
  // check if interests is null, empty, empty string or empty array
@@ -1,6 +1,6 @@
1
- import OneLineList from './OneLineList';
1
+ import OneLineList from './OneLineList.jsx';
2
2
 
3
- import Section from './Section';
3
+ import Section from './Section.jsx';
4
4
 
5
5
  const Languages = ({ languages }) => {
6
6
  if (!languages) {
@@ -1,4 +1,5 @@
1
1
  import styled from 'styled-components';
2
+ import { marked } from 'marked';
2
3
 
3
4
  const ListContainer = styled.ul`
4
5
  padding-left: 20px;
@@ -19,9 +20,12 @@ const List = ({ items }) => {
19
20
 
20
21
  return (
21
22
  <ListContainer>
22
- {items.map((item) => (
23
- <li key={item}>{item}</li>
24
- ))}
23
+ {items.map((item, index) => {
24
+ const htmlContent = marked.parseInline(item, { breaks: true });
25
+ return (
26
+ <li key={index} dangerouslySetInnerHTML={{ __html: htmlContent }} />
27
+ );
28
+ })}
25
29
  </ListContainer>
26
30
  );
27
31
  };
@@ -1,5 +1,5 @@
1
- import Section from './Section';
2
- import Experience from './Experience';
1
+ import Section from './Section.jsx';
2
+ import Experience from './Experience.jsx';
3
3
 
4
4
  const Work = ({ projects }) => {
5
5
  if (!projects) {
@@ -1,5 +1,5 @@
1
- import Section from './Section';
2
- import Experience from './Experience';
1
+ import Section from './Section.jsx';
2
+ import Experience from './Experience.jsx';
3
3
 
4
4
  const Publications = ({ publications }) => {
5
5
  if (!publications) {
@@ -1,5 +1,5 @@
1
1
  import styled from 'styled-components';
2
- import Section from './Section';
2
+ import Section from './Section.jsx';
3
3
 
4
4
  const Name = styled.div`
5
5
  font-weight: 600;
@@ -1,17 +1,17 @@
1
1
  import styled from 'styled-components';
2
- import Projects from './Projects';
3
- import Hero from './Hero';
4
- import Summary from './Summary';
5
- import Education from './Education';
6
- import Work from './Work';
7
- import Certificates from './Certificates';
8
- import Publications from './Publications';
9
- import Awards from './Awards';
10
- import Skills from './Skills';
11
- import Interests from './Interests';
12
- import Languages from './Languages';
13
- import References from './References';
14
- import Volunteer from './Volunteer';
2
+ import Projects from './Projects.jsx';
3
+ import Hero from './Hero.jsx';
4
+ import Summary from './Summary.jsx';
5
+ import Education from './Education.jsx';
6
+ import Work from './Work.jsx';
7
+ import Certificates from './Certificates.jsx';
8
+ import Publications from './Publications.jsx';
9
+ import Awards from './Awards.jsx';
10
+ import Skills from './Skills.jsx';
11
+ import Interests from './Interests.jsx';
12
+ import Languages from './Languages.jsx';
13
+ import References from './References.jsx';
14
+ import Volunteer from './Volunteer.jsx';
15
15
 
16
16
  const Layout = styled.div`
17
17
  max-width: 660px;
@@ -25,13 +25,13 @@ const Resume = ({ resume }) => {
25
25
  <Layout>
26
26
  <Hero basics={resume.basics} />
27
27
  <Summary basics={resume.basics} />
28
- <Education education={resume.education} />
29
28
  <Work work={resume.work} />
30
29
  <Projects projects={resume.projects} />
31
- <Volunteer volunteer={resume.volunteer} />
30
+ <Education education={resume.education} />
32
31
  <Certificates certificates={resume.certificates} />
33
32
  <Publications publications={resume.publications} />
34
33
  <Awards awards={resume.awards} />
34
+ <Volunteer volunteer={resume.volunteer} />
35
35
  <Languages languages={resume.languages} />
36
36
  <Skills skills={resume.skills} />
37
37
  <Interests interests={resume.interests} />
@@ -1,6 +1,6 @@
1
- import OneLineList from './OneLineList';
1
+ import OneLineList from './OneLineList.jsx';
2
2
 
3
- import Section from './Section';
3
+ import Section from './Section.jsx';
4
4
 
5
5
  const Skills = ({ skills }) => {
6
6
  if (!skills) {
@@ -0,0 +1,20 @@
1
+ import styled from 'styled-components';
2
+ import { marked } from 'marked';
3
+ import Section from './Section.jsx';
4
+
5
+ const Summary = styled.div``;
6
+
7
+ const SummaryComponent = ({ basics }) => {
8
+ const { summary } = basics;
9
+ const htmlContent = summary ? marked.parse(summary, { breaks: true }) : '';
10
+
11
+ return (
12
+ <Section>
13
+ <div className="secondary">
14
+ <Summary dangerouslySetInnerHTML={{ __html: htmlContent }} />
15
+ </div>
16
+ </Section>
17
+ );
18
+ };
19
+
20
+ export default SummaryComponent;
@@ -1,5 +1,5 @@
1
- import Section from './Section';
2
- import Experience from './Experience';
1
+ import Section from './Section.jsx';
2
+ import Experience from './Experience.jsx';
3
3
 
4
4
  const Volunteer = ({ volunteer }) => {
5
5
  if (!volunteer) {
@@ -1,5 +1,5 @@
1
- import Section from './Section';
2
- import Experience from './Experience';
1
+ import Section from './Section.jsx';
2
+ import Experience from './Experience.jsx';
3
3
 
4
4
  const Work = ({ work }) => {
5
5
  if (!work) {
package/vite.config.js ADDED
@@ -0,0 +1,33 @@
1
+ import { defineConfig } from 'vite';
2
+ import react from '@vitejs/plugin-react';
3
+
4
+ export default defineConfig({
5
+ plugins: [react()],
6
+ build: {
7
+ ssr: true,
8
+ target: 'node18',
9
+ outDir: './dist',
10
+ emptyOutDir: true,
11
+ minify: false,
12
+ lib: {
13
+ entry: './src/index.jsx',
14
+ formats: ['es'],
15
+ fileName: 'index',
16
+ },
17
+ rollupOptions: {
18
+ external: ['react', 'react-dom', 'react-dom/server', 'react/jsx-runtime'],
19
+ output: {
20
+ exports: 'named',
21
+ },
22
+ },
23
+ },
24
+ ssr: {
25
+ // Force bundle these packages instead of externalizing
26
+ noExternal: [
27
+ 'styled-components',
28
+ '@emotion/is-prop-valid',
29
+ 'stylis',
30
+ 'shallowequal',
31
+ ],
32
+ },
33
+ });
@@ -1,5 +0,0 @@
1
-
2
- > jsonresume-theme-professional@0.0.0 lint /home/ajax/repos/jsonresume.org/packages/jsonresume-theme-professional
3
- > eslint .
4
-
5
- Pages directory cannot be found at /home/ajax/repos/jsonresume.org/packages/jsonresume-theme-professional/pages or /home/ajax/repos/jsonresume.org/packages/jsonresume-theme-professional/src/pages. If using a custom path, please configure with the `no-html-link-for-pages` rule in your eslint config file.
package/src/ui/Summary.js DELETED
@@ -1,17 +0,0 @@
1
- import styled from 'styled-components';
2
- import Section from './Section';
3
-
4
- const Summary = styled.p``;
5
-
6
- const SummaryComponent = ({ basics }) => {
7
- const { summary } = basics;
8
- return (
9
- <Section>
10
- <div className="secondary">
11
- <Summary>{summary}</Summary>
12
- </div>
13
- </Section>
14
- );
15
- };
16
-
17
- export default SummaryComponent;
File without changes
File without changes
File without changes
File without changes