@paprize/core 0.0.12 → 0.2.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,52 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8e2ef6e: add `prefer` option to keepOnSamePage
8
+ - c73b65f: add OrderedListPlugin to manage numbered lists across page breaks
9
+
10
+ ## 0.1.0
11
+
12
+ ### Minor Changes
13
+
14
+ ### Changed
15
+
16
+ - 909306c: Add page is full state check in page overflow handling (#26 (https://github.com/your-repo/pull/26))
17
+ - 909306c: Improve skipped elements logic and logging (#25 (https://github.com/your-repo/pull/25))
18
+ - 909306c: Accept empty and true as valid value for attributes
19
+ - 909306c: Expand plugin hooks with beforePagination
20
+
21
+ ## 0.0.12
22
+
23
+ ### Patch Changes
24
+
25
+ - 33f727c: update dependencies
26
+
27
+ ## 0.0.11
28
+
29
+ ### Patch Changes
30
+
31
+ - b4a5711: fix pagination issue in Table and long texts
32
+ - b4a5711: - fix section hight calculation
33
+ - refactor `tryAddSection` to use section context instead of page contexts
34
+
35
+ ## 0.0.10
36
+
37
+ ### Patch Changes
38
+
39
+ - 307425f: fix empty package issue
40
+
41
+ ## 0.0.9
42
+
43
+ ### Patch Changes
44
+
45
+ - 673b94e: switch to pnpm
46
+
3
47
  All notable changes to this project will be documented in this file.
4
48
 
5
49
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
50
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
51
 
8
- ## [Unreleased]
52
+ ## [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/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
+ ```