@jsonresume/core 0.3.6 → 0.3.8
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/dist/tokens.css +2 -2
- package/package.json +3 -3
- package/src/primitives/Section.jsx +2 -1
- package/src/ssr/index.js +13 -0
- package/src/styles/tokens.css +2 -2
package/dist/tokens.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsonresume/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "Framework-agnostic resume component core - design tokens, primitives, and validators",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"styled-components": "^6.1.19",
|
|
39
|
-
"@jsonresume/types": "0.6.
|
|
40
|
-
"@jsonresume/utils": "0.4.
|
|
39
|
+
"@jsonresume/types": "0.6.1",
|
|
40
|
+
"@jsonresume/utils": "0.4.1"
|
|
41
41
|
},
|
|
42
42
|
"keywords": [
|
|
43
43
|
"resume",
|
|
@@ -18,7 +18,8 @@ const StyledSection = styled.section`
|
|
|
18
18
|
props.theme?.spacing?.section || 'var(--resume-space-section, 2rem)'};
|
|
19
19
|
|
|
20
20
|
@media print {
|
|
21
|
-
|
|
21
|
+
/* Sections can span pages; their headings stay with the first entry. */
|
|
22
|
+
page-break-inside: auto;
|
|
22
23
|
}
|
|
23
24
|
`;
|
|
24
25
|
|
package/src/ssr/index.js
CHANGED
|
@@ -25,6 +25,18 @@ const CSS_RESET =
|
|
|
25
25
|
'<style>*,*::before,*::after{box-sizing:border-box}' +
|
|
26
26
|
'html,body{margin:0;padding:0}body{-webkit-font-smoothing:antialiased}</style>';
|
|
27
27
|
|
|
28
|
+
// Page margins repeat on continuation pages; body padding does not. Themes
|
|
29
|
+
// can override these defaults with their own print rules later in the head.
|
|
30
|
+
const PRINT_DEFAULTS = `<style data-jsonresume-core-print>
|
|
31
|
+
@page{size:auto;margin:12mm}
|
|
32
|
+
@media print{
|
|
33
|
+
body,h1,h2,h3,h4,p,li,a{overflow-wrap:anywhere}
|
|
34
|
+
:where(main,aside,section,article,header,div){min-width:0}
|
|
35
|
+
h1,h2,h3,h4,h5,h6{break-inside:avoid;break-after:avoid}
|
|
36
|
+
p,li{orphans:2;widows:2}
|
|
37
|
+
}
|
|
38
|
+
</style>`;
|
|
39
|
+
|
|
28
40
|
/** Stylesheet href for the @jsonresume/core design tokens (CSS custom props). */
|
|
29
41
|
const TOKENS_CSS_HREF = 'https://unpkg.com/@jsonresume/core/dist/tokens.css';
|
|
30
42
|
|
|
@@ -147,6 +159,7 @@ export function renderResumeDocument(element, options = {}) {
|
|
|
147
159
|
fontLinks +
|
|
148
160
|
tokensLink +
|
|
149
161
|
resetTag +
|
|
162
|
+
PRINT_DEFAULTS +
|
|
150
163
|
head +
|
|
151
164
|
styleTags +
|
|
152
165
|
headAfterStyles +
|
package/src/styles/tokens.css
CHANGED