@paprize/core 0.0.11 → 0.1.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/CHANGELOG.md CHANGED
@@ -1,8 +1,45 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ ### Changed
8
+
9
+ - 909306c: Add page is full state check in page overflow handling (#26 (https://github.com/your-repo/pull/26))
10
+ - 909306c: Improve skipped elements logic and logging (#25 (https://github.com/your-repo/pull/25))
11
+ - 909306c: Accept empty and true as valid value for attributes
12
+ - 909306c: Expand plugin hooks with beforePagination
13
+
14
+ ## 0.0.12
15
+
16
+ ### Patch Changes
17
+
18
+ - 33f727c: update dependencies
19
+
20
+ ## 0.0.11
21
+
22
+ ### Patch Changes
23
+
24
+ - b4a5711: fix pagination issue in Table and long texts
25
+ - b4a5711: - fix section hight calculation
26
+ - refactor `tryAddSection` to use section context instead of page contexts
27
+
28
+ ## 0.0.10
29
+
30
+ ### Patch Changes
31
+
32
+ - 307425f: fix empty package issue
33
+
34
+ ## 0.0.9
35
+
36
+ ### Patch Changes
37
+
38
+ - 673b94e: switch to pnpm
39
+
3
40
  All notable changes to this project will be documented in this file.
4
41
 
5
42
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
43
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
44
 
8
- ## [Unreleased]
45
+ ## [Unreleased]
package/README.md CHANGED
@@ -1,5 +1,79 @@
1
1
  # Paprize
2
2
 
3
- Design your report using the full power of JavaScript and CSS, mark the report section by paprize components and then paprize pagination engine will transforming it into a beautiful, professional, print-ready pages.
3
+ **Build clean, print-ready reports with familiar web tools.**
4
4
 
5
- ![Components](https://raw.githubusercontent.com/PejmanNik/paprize/refs/heads/main/packages/website/static/img/components.svg)
5
+ Paprize is a report-generation toolkit that lets you design pages with JavaScript/TypeScript, React, and CSS. Mark your layout with Paprize components, then let its pagination engine split content into polished, printable pages.
6
+
7
+ ## Documentation
8
+
9
+ For guides, API references, and full examples, visit [paprize.page](https://paprize.page).
10
+
11
+ ## Why Paprize
12
+
13
+ - **Web-native authoring**: Build reports with standard HTML and CSS.
14
+ - **Automatic pagination**: Split long content into pages without manual slicing.
15
+ - **Composable layout primitives**: Structure reports with sections, headers, footers, and content wrappers.
16
+ - **Print-ready output**: Configure A4, Letter, or custom sizes and margins.
17
+
18
+ ![Paprize components](https://raw.githubusercontent.com/PejmanNik/paprize/refs/heads/main/website/static/img/components.svg)
19
+
20
+ ## Packages
21
+
22
+ - `@paprize/react`: React components for report layout and pagination.
23
+ - `@paprize/vanilla`: Framework-agnostic DOM API.
24
+ - `@paprize/puppeteer`: PDF rendering adapter for server-side generation.
25
+
26
+ ## Installation
27
+
28
+ Choose one UI package (`react` or `vanilla`), and if you need server-side PDF generation, pair it with the Puppeteer adapter.
29
+
30
+ ```bash
31
+ # React
32
+ npm install @paprize/react @paprize/puppeteer
33
+
34
+ # Vanilla JavaScript/TypeScript
35
+ npm install @paprize/vanilla @paprize/puppeteer
36
+ ```
37
+
38
+ ## Quick Start
39
+
40
+ ### Vanilla HTML
41
+
42
+ ```html
43
+ <div data-pz-preview>
44
+ <div data-pz-section>
45
+ <div data-pz-page-header>
46
+ <h2>Page <span data-pz-v-page-number></span></h2>
47
+ </div>
48
+
49
+ <div data-pz-page-content>...</div>
50
+ </div>
51
+ </div>
52
+ ```
53
+
54
+ ### React
55
+
56
+ ```tsx
57
+ function App() {
58
+ return (
59
+ <ReportRoot>
60
+ <ReportPreview>
61
+ <Section size={pageSize.A4}>
62
+ <PageHeader>
63
+ <Header />
64
+ </PageHeader>
65
+
66
+ <PageContent>
67
+ <Finance />
68
+ <Business />
69
+ </PageContent>
70
+
71
+ <PageFooter>
72
+ <Footer />
73
+ </PageFooter>
74
+ </Section>
75
+ </ReportPreview>
76
+ </ReportRoot>
77
+ );
78
+ }
79
+ ```