-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into svg-typing
- Loading branch information
Showing
183 changed files
with
4,068 additions
and
20,720 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@react-pdf/layout': minor | ||
--- | ||
|
||
Upgraded yoga to v2 and dropped bundled yoga v1 package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@react-pdf/types": patch | ||
--- | ||
|
||
fix: add clipPath to typing for SVGPresentationAttributes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
'@react-pdf/examples': patch | ||
'@react-pdf/textkit': patch | ||
'@react-pdf/layout': patch | ||
'@react-pdf/pdfkit': patch | ||
'@react-pdf/image': patch | ||
--- | ||
|
||
fix linting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@react-pdf/examples': major | ||
--- | ||
|
||
add dev script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@react-pdf/pdfkit': patch | ||
--- | ||
|
||
fix: copy-paste for registered font |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@react-pdf/types": patch | ||
--- | ||
|
||
Updated svg.d.ts to include strokeLinejoin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
node_modules | ||
lib | ||
rollup.config.js | ||
packages/yoga/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: CI | |
|
||
env: | ||
FORCE_COLOR: 2 | ||
NODE: 14 | ||
NODE: 18 | ||
|
||
on: | ||
pull_request: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: Release | |
|
||
env: | ||
FORCE_COLOR: 2 | ||
NODE: 14 | ||
NODE: 18 | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ coverage | |
.idea | ||
.DS_Store | ||
.cache | ||
.parcel-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
14 | ||
18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,5 @@ | |
"packages": [ | ||
"packages/*" | ||
], | ||
"useWorkspaces": true, | ||
"npmClient": "yarn" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
extends: ['../../.eslintrc.js', 'plugin:react/recommended'], | ||
rules: { | ||
'react/prop-types': 0, | ||
'jsx-a11y/anchor-is-valid': 0, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* eslint react/prop-types: 0 */ | ||
/* eslint react/jsx-sort-props: 0 */ | ||
|
||
import React from 'react' | ||
import { Document, Page, Image, StyleSheet } from '@react-pdf/renderer' | ||
|
||
import Quijote1 from '../../public/quijote1.jpg' | ||
|
||
const styles = StyleSheet.create({ | ||
body: { | ||
paddingTop: 35, | ||
paddingBottom: 65, | ||
paddingHorizontal: 35, | ||
}, | ||
image: { | ||
marginVertical: 15, | ||
marginHorizontal: 0, | ||
width: 520, | ||
height: 200, | ||
backgroundColor: 'red', | ||
objectFit: 'fill', | ||
objectPositionX: 'center', | ||
objectPositionY: 'center', | ||
borderWith: 2, | ||
padding: 2, | ||
borderColor: 'blue', | ||
borderStyle: 'solid', | ||
}, | ||
image2: { | ||
marginVertical: 15, | ||
marginHorizontal: 0, | ||
width: 300, | ||
backgroundColor: 'green', | ||
objectFit: 'fill', | ||
objectPositionX: 'center', | ||
objectPositionY: 'center', | ||
borderWith: 2, | ||
padding: 2, | ||
borderColor: 'blue', | ||
borderStyle: 'solid', | ||
}, | ||
}) | ||
|
||
const MyDoc = () => { | ||
return ( | ||
<Page style={styles.body}> | ||
<Image style={styles.image} src={Quijote1} /> | ||
<Image style={styles.image2} src={Quijote1} /> | ||
<Image style={styles.image} src={Quijote1} /> | ||
<Image style={styles.image2} src={Quijote1} /> | ||
</Page> | ||
) | ||
} | ||
|
||
const App = () => { | ||
return ( | ||
<Document> | ||
<MyDoc /> | ||
</Document> | ||
) | ||
} | ||
|
||
export default App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* eslint react/prop-types: 0 */ | ||
/* eslint react/jsx-sort-props: 0 */ | ||
|
||
import React from 'react' | ||
import { Document, Page, Text, View, StyleSheet, Font } from '@react-pdf/renderer' | ||
|
||
import RobotoFont from "../../public/Roboto-Regular.ttf"; | ||
|
||
const styles = StyleSheet.create({ | ||
body: { | ||
paddingTop: 35, | ||
paddingBottom: 65, | ||
paddingHorizontal: 35, | ||
}, | ||
text: { | ||
fontSize: 15, | ||
maxLines: 1, | ||
fontColor: '#000000', | ||
textOverflow: 'ellipsis', | ||
fontFamily: 'Roboto' | ||
}, | ||
}) | ||
|
||
Font.register({ | ||
family: "Roboto", | ||
fonts: [ | ||
{ | ||
src: RobotoFont, | ||
fontWeight: 400, | ||
}, | ||
] | ||
}); | ||
|
||
const MyDoc = () => { | ||
return ( | ||
<Page style={styles.body}> | ||
<View style={{ width: 70 }}> | ||
<Text style={styles.text}>And here here</Text> | ||
</View> | ||
</Page> | ||
) | ||
} | ||
|
||
const App = () => { | ||
return ( | ||
<Document> | ||
<MyDoc /> | ||
</Document> | ||
) | ||
} | ||
|
||
export default App |
Oops, something went wrong.