@ahmedrowaihi/pdf-forge-components 1.0.0-canary.0
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/LICENSE.md +8 -0
- package/README.md +61 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +17 -0
- package/dist/index.mjs +5 -0
- package/package.json +42 -0
- package/readme.md +61 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Copyright 2024 Plus Five Five, Inc
|
|
2
|
+
Copyright 2025 ahmedrowaihi (fork modifications)
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
5
|
+
|
|
6
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<div align="center"><strong>@ahmedrowaihi/pdf-forge-components</strong></div>
|
|
2
|
+
<div align="center">A collection of all React PDF Render components.</div>
|
|
3
|
+
<br />
|
|
4
|
+
<div align="center">
|
|
5
|
+
<a href="https://react-pdf-forge.com">Website</a>
|
|
6
|
+
<span> · </span>
|
|
7
|
+
<a href="https://github.com/ahmedrowaihi/react-pdf-forge">GitHub</a>
|
|
8
|
+
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
Install component from your command line.
|
|
14
|
+
|
|
15
|
+
#### With yarn
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
yarn add @ahmedrowaihi/pdf-forge-components -E
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
#### With npm
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
npm install @ahmedrowaihi/pdf-forge-components -E
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### With pnpm
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
pnpm install @ahmedrowaihi/pdf-forge-components -E
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Getting started
|
|
34
|
+
|
|
35
|
+
Add the component to your PDF template. Include styles where needed.
|
|
36
|
+
|
|
37
|
+
```jsx
|
|
38
|
+
import { Document, Body, Heading } from '@ahmedrowaihi/pdf-forge-components';
|
|
39
|
+
|
|
40
|
+
const PDFTemplate = () => {
|
|
41
|
+
return (
|
|
42
|
+
<Document>
|
|
43
|
+
<Body>
|
|
44
|
+
<Heading as="h1">Lorem ipsum</Heading>
|
|
45
|
+
</Body>
|
|
46
|
+
</Document>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Components
|
|
52
|
+
|
|
53
|
+
- **Document** - Document wrapper component
|
|
54
|
+
- **PrintStyles** - Print-specific CSS styles (Playwright handles page size via `format: 'A4'`)
|
|
55
|
+
- **PageBreak** - Page break controls
|
|
56
|
+
- **Html, Head, Body** - Document structure primitives
|
|
57
|
+
- **Font** - Custom font loading
|
|
58
|
+
|
|
59
|
+
## License
|
|
60
|
+
|
|
61
|
+
MIT License
|
package/dist/index.d.mts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
var __ahmedrowaihi_pdf_forge_core = require("@ahmedrowaihi/pdf-forge-core");
|
|
4
|
+
Object.keys(__ahmedrowaihi_pdf_forge_core).forEach(function (k) {
|
|
5
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function () { return __ahmedrowaihi_pdf_forge_core[k]; }
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
var __ahmedrowaihi_pdf_forge_primitive = require("@ahmedrowaihi/pdf-forge-primitive");
|
|
12
|
+
Object.keys(__ahmedrowaihi_pdf_forge_primitive).forEach(function (k) {
|
|
13
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return __ahmedrowaihi_pdf_forge_primitive[k]; }
|
|
16
|
+
});
|
|
17
|
+
});
|
package/dist/index.mjs
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ahmedrowaihi/pdf-forge-components",
|
|
3
|
+
"version": "1.0.0-canary.0",
|
|
4
|
+
"description": "A collection of all React PDF Render components",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/**"
|
|
10
|
+
],
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": {
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
15
|
+
"default": "./dist/index.mjs"
|
|
16
|
+
},
|
|
17
|
+
"require": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@ahmedrowaihi/pdf-forge-core": "1.0.0-canary.0",
|
|
26
|
+
"@ahmedrowaihi/pdf-forge-primitive": "1.0.0-canary.0"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"react": "^18.0 || ^19.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"typescript": "5.9.3",
|
|
33
|
+
"tsconfig": "1.0.0-canary.0"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsdown src/index.ts --format esm,cjs --dts --external react",
|
|
40
|
+
"clean": "rm -rf dist"
|
|
41
|
+
}
|
|
42
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<div align="center"><strong>@ahmedrowaihi/pdf-forge-components</strong></div>
|
|
2
|
+
<div align="center">A collection of all React PDF Render components.</div>
|
|
3
|
+
<br />
|
|
4
|
+
<div align="center">
|
|
5
|
+
<a href="https://react-pdf-forge.com">Website</a>
|
|
6
|
+
<span> · </span>
|
|
7
|
+
<a href="https://github.com/ahmedrowaihi/react-pdf-forge">GitHub</a>
|
|
8
|
+
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
Install component from your command line.
|
|
14
|
+
|
|
15
|
+
#### With yarn
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
yarn add @ahmedrowaihi/pdf-forge-components -E
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
#### With npm
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
npm install @ahmedrowaihi/pdf-forge-components -E
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### With pnpm
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
pnpm install @ahmedrowaihi/pdf-forge-components -E
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Getting started
|
|
34
|
+
|
|
35
|
+
Add the component to your PDF template. Include styles where needed.
|
|
36
|
+
|
|
37
|
+
```jsx
|
|
38
|
+
import { Document, Body, Heading } from '@ahmedrowaihi/pdf-forge-components';
|
|
39
|
+
|
|
40
|
+
const PDFTemplate = () => {
|
|
41
|
+
return (
|
|
42
|
+
<Document>
|
|
43
|
+
<Body>
|
|
44
|
+
<Heading as="h1">Lorem ipsum</Heading>
|
|
45
|
+
</Body>
|
|
46
|
+
</Document>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Components
|
|
52
|
+
|
|
53
|
+
- **Document** - Document wrapper component
|
|
54
|
+
- **PrintStyles** - Print-specific CSS styles (Playwright handles page size via `format: 'A4'`)
|
|
55
|
+
- **PageBreak** - Page break controls
|
|
56
|
+
- **Html, Head, Body** - Document structure primitives
|
|
57
|
+
- **Font** - Custom font loading
|
|
58
|
+
|
|
59
|
+
## License
|
|
60
|
+
|
|
61
|
+
MIT License
|