@broadpaper/server 0.1.1

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/Dockerfile ADDED
@@ -0,0 +1,22 @@
1
+ # BroadPaper render service.
2
+ #
3
+ # The browserless engine is WebAssembly, so this is a plain Node image with no
4
+ # browser in it: ~150 MB against the ~1.5 GB a Playwright base costs, and it
5
+ # starts in milliseconds rather than seconds. Report data never leaves your
6
+ # network — there is no BroadPaper endpoint for it to be sent to.
7
+ FROM node:22-alpine
8
+ WORKDIR /app
9
+ ENV NODE_ENV=production PORT=4780
10
+
11
+ COPY package.json ./
12
+ COPY dist ./dist
13
+ RUN npm install --omit=dev --ignore-scripts && npm cache clean --force
14
+
15
+ # Never as root: this process parses documents supplied by callers.
16
+ USER node
17
+ EXPOSE 4780
18
+
19
+ HEALTHCHECK --interval=30s --timeout=5s --start-period=5s \
20
+ CMD node -e "fetch('http://localhost:'+(process.env.PORT||4780)+'/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"
21
+
22
+ CMD ["node", "dist/cli.js"]
package/LICENSE ADDED
@@ -0,0 +1,143 @@
1
+ BroadPaper — Software Licence
2
+
3
+ Copyright (c) 2026 Codingbadger Creative Limited, trading as BroadPaper.
4
+ Registered in England and Wales, company number 16896863.
5
+ hello@broadpaper.com
6
+
7
+ This is proprietary software, not open source. It is free to evaluate, with
8
+ every feature enabled and no trial clock, and requires a paid Licence for
9
+ production use. The full agreement is the Terms and Conditions at
10
+ https://www.broadpaper.com/legal/terms/ ; this notice is the part of it you need
11
+ in the package, and where the two differ, those Terms prevail.
12
+
13
+ Version of 9 September 2026.
14
+
15
+
16
+ 1. DEFINITIONS
17
+
18
+ "Software" means the BroadPaper packages published by us — @broadpaper/core,
19
+ @broadpaper/blocks, @broadpaper/renderer, @broadpaper/forme, @broadpaper/pdf,
20
+ @broadpaper/server, @broadpaper/license, @broadpaper/editor, @broadpaper/react,
21
+ @broadpaper/angular and BroadPaper.Client — together with their documentation
22
+ and updates.
23
+
24
+ "Licence" means a signed licence certificate we have issued to your
25
+ Organisation, and the rights granted with it. A Licence belongs to the
26
+ Organisation, not to an individual.
27
+
28
+ "Product" means an application your Organisation builds that incorporates the
29
+ Software.
30
+
31
+ "Internal User" means someone who works for your Organisation: an employee, an
32
+ officer, or a contractor engaged by you and working under your direction.
33
+ "External User" means anyone else, including your customers, their staff, your
34
+ partners and the public.
35
+
36
+ "Licence Year" means the twelve months from the date a paid Licence is issued
37
+ or renewed.
38
+
39
+
40
+ 2. EVALUATION
41
+
42
+ You may install and use the Software free of charge, worldwide and
43
+ non-exclusively, for development, testing and evaluation. Every feature is
44
+ enabled, nothing expires, and there is no limit on how long you take.
45
+
46
+ Documents generated without a paid Licence carry a visible BroadPaper
47
+ evaluation mark. This grant does not permit production use, whether or not you
48
+ charge for it and whether or not the mark is present in the output. Removing,
49
+ suppressing or circumventing the mark does not make unlicensed production use
50
+ permitted.
51
+
52
+
53
+ 3. PAID LICENCES
54
+
55
+ Subject to payment, we grant your Organisation a non-exclusive,
56
+ non-transferable, worldwide licence to install and use the Software in
57
+ Products, in any number of Products and for an unlimited number of users,
58
+ developers, documents and renders. Two types are offered, unlocking identical
59
+ software and differing only in who the resulting Product may be made available
60
+ to:
61
+
62
+ Internal — Products for your Organisation's Internal Users only.
63
+ SaaS / OEM — the above, and Products made available to External Users:
64
+ software you sell, host, embed, ship or otherwise make
65
+ available outside your Organisation.
66
+
67
+ Because the Software cannot and does not detect how it is deployed, which type
68
+ you need is determined by the use you actually make of it, not by what the
69
+ software permits.
70
+
71
+ A Licence runs for the Licence Year. When it ends you may continue to use any
72
+ version of the Software released during a Licence Year you paid for,
73
+ indefinitely and under this notice, but you will receive no further updates or
74
+ support unless you renew, and the Software stops rendering without the
75
+ evaluation mark once the certificate's grace period has passed.
76
+
77
+
78
+ 4. REDISTRIBUTION
79
+
80
+ You may redistribute the Software only as a compiled, integrated part of a
81
+ Product. You may not distribute it on its own, offer it as a component for
82
+ others to build with, or make its functionality available as a stand-alone
83
+ report-design service. The end users of your Product do not need their own
84
+ Licence.
85
+
86
+
87
+ 5. LICENCE CERTIFICATES
88
+
89
+ A Licence is a cryptographically signed certificate recording your
90
+ Organisation, its Licence type and its expiry date. The Software verifies it
91
+ locally, against a public key compiled into the package, and makes no network
92
+ call to do so.
93
+
94
+ It is not a secret, and we do not ask you to treat it as one: it may appear in
95
+ your application's configuration, its build and its distributed code. You may
96
+ not share it with anyone outside your Organisation for their own use, alter it,
97
+ or interfere with the Software's licence checking or its evaluation mark.
98
+
99
+
100
+ 6. RESTRICTIONS
101
+
102
+ Except as expressly permitted above, you may not: copy, modify, translate or
103
+ create derivative works of the Software beyond what integrating it into your
104
+ Product requires; reverse engineer it beyond what applicable law allows; remove
105
+ any proprietary notice; use it to build a competing report designer; or use it
106
+ in breach of any law, including to generate documents intended to deceive.
107
+
108
+ We own the Software and everything in it that is not third-party material.
109
+ Nothing here transfers ownership. Your templates, your data, your themes and
110
+ the documents your Product produces are yours; we claim no rights in them and,
111
+ because the Software makes no calls to us, we never receive them.
112
+
113
+
114
+ 7. THIRD-PARTY COMPONENTS
115
+
116
+ The Software incorporates third-party components under their own licences.
117
+ These are listed in the THIRD-PARTY-NOTICES.md file distributed with each
118
+ package — including the fonts and Rust crates statically linked into the Forme
119
+ engine, which no dependency manifest reveals. Those licences govern those
120
+ components.
121
+
122
+
123
+ 8. NO WARRANTY, AND LIABILITY
124
+
125
+ Except for the limited ninety-day warranty in the Terms, the Software is
126
+ provided "AS IS", without warranty of any kind, express or implied, including
127
+ merchantability, fitness for a particular purpose and non-infringement. We do
128
+ not warrant that the Software is error-free, or that a document it produces
129
+ meets any regulatory or legal requirement that applies to you: that remains
130
+ your responsibility.
131
+
132
+ To the extent the law allows, we are not liable for any loss of profit,
133
+ revenue, business, data or goodwill, or for any indirect or consequential
134
+ loss. Our total liability in any twelve-month period is limited to the amount
135
+ you paid us in that period, or $100 if you paid nothing. Nothing here limits
136
+ liability for death or personal injury caused by negligence, for fraud, or for
137
+ anything else that cannot be limited by law.
138
+
139
+ This notice is governed by the law of England and Wales.
140
+
141
+
142
+ Questions, and licence purchases: hello@broadpaper.com
143
+ Pricing and the full Terms: https://www.broadpaper.com/legal/terms/
@@ -0,0 +1,255 @@
1
+ # Third-party notices
2
+
3
+ BroadPaper is built on the work below. This file is generated by
4
+ `scripts/third-party-notices.mjs` from what is actually installed — including
5
+ the contents of the WebAssembly engine, which carries its own dependencies and
6
+ its own fonts inside a single binary. Do not edit it by hand.
7
+
8
+ It ships inside every published package and beside the demo, because two of the
9
+ licences here require their notice to travel with the software.
10
+
11
+ ## The PDF engine
12
+
13
+ `@formepdf/core` and `@formepdf/shared` — the browserless layout and PDF engine,
14
+ Rust compiled to WebAssembly. Used unmodified, as an npm dependency.
15
+
16
+ MIT License
17
+
18
+ Copyright (c) 2026 Daniel Molitor
19
+
20
+ Permission is hereby granted, free of charge, to any person obtaining a copy
21
+ of this software and associated documentation files (the "Software"), to deal
22
+ in the Software without restriction, including without limitation the rights
23
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24
+ copies of the Software, and to permit persons to whom the Software is
25
+ furnished to do so, subject to the following conditions:
26
+
27
+ The above copyright notice and this permission notice shall be included in all
28
+ copies or substantial portions of the Software.
29
+
30
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
36
+ SOFTWARE.
37
+
38
+ ## Fonts inside the engine
39
+
40
+ The engine binary carries complete font files, and subsets of them are embedded
41
+ into any PDF containing a character the standard PDF faces cannot represent — a
42
+ Greek or Cyrillic name, a symbol. Documents produced this way are unrestricted:
43
+ the licence below exempts anything created *with* the font. The notice is
44
+ required because the font software itself travels inside the engine.
45
+
46
+ ### Noto Sans Regular
47
+
48
+ Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic)
49
+
50
+ Licensed under the SIL Open Font License, Version 1.1.
51
+
52
+ Its own declaration, verbatim from the font's name table:
53
+
54
+ Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-
55
+ greek-cyrillic)Noto SansRegular2.015;GOOG;NotoSans-RegularNoto Sans RegularV
56
+ ersion 2.015; ttfautohint (v1.8.4.7-5d5b)NotoSans-RegularNoto is a trademark
57
+ of Google LLC.Monotype Imaging Inc.Monotype Design TeamDesigned by Monotype
58
+ design team, Irene Vlachou.http://www.google.com/get/noto/http://www.monoty
59
+ pe.com/studioThis Font Software is licensed under the SIL Open Font License,
60
+ Version 1.1. This license is available with a FAQ at: https://scripts.sil.o
61
+ rg/OFLhttps://scripts.sil.org/OFLflorin symbolTitling Alternates I and J for
62
+ titling and all cap settingsAccented Greek SCiota adscrip
63
+ t
64
+
65
+ ### Noto Sans Bold
66
+
67
+ Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic)
68
+
69
+ Licensed under the SIL Open Font License, Version 1.1.
70
+
71
+ Its own declaration, verbatim from the font's name table:
72
+
73
+ Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-
74
+ greek-cyrillic)Noto SansBold2.015;GOOG;NotoSans-BoldNoto Sans BoldVersion 2.
75
+ 015; ttfautohint (v1.8.4.7-5d5b)NotoSans-BoldNoto is a trademark of Google L
76
+ LC.Monotype Imaging Inc.Monotype Design TeamDesigned by Monotype design team
77
+ , Irene Vlachou.http://www.google.com/get/noto/http://www.monotype.com/studi
78
+ oThis Font Software is licensed under the SIL Open Font License, Version 1.1
79
+ . This license is available with a FAQ at: https://scripts.sil.org/OFLhttps:
80
+ //scripts.sil.org/OFLflorin symbolTitling Alternates I and J for titling and
81
+ all cap settingsAccented Greek SCiota adscrip
82
+ t
83
+
84
+ -----------------------------------------------------------
85
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
86
+ -----------------------------------------------------------
87
+
88
+ PREAMBLE
89
+ The goals of the Open Font License (OFL) are to stimulate worldwide
90
+ development of collaborative font projects, to support the font creation
91
+ efforts of academic and linguistic communities, and to provide a free and
92
+ open framework in which fonts may be shared and improved in partnership
93
+ with others.
94
+
95
+ The OFL allows the licensed fonts to be used, studied, modified and
96
+ redistributed freely as long as they are not sold by themselves. The
97
+ fonts, including any derivative works, can be bundled, embedded,
98
+ redistributed and/or sold with any software provided that any reserved
99
+ names are not used by derivative works. The fonts and derivatives,
100
+ however, cannot be released under any other type of license. The
101
+ requirement for fonts to remain under this license does not apply
102
+ to any document created using the fonts or their derivatives.
103
+
104
+ DEFINITIONS
105
+ "Font Software" refers to the set of files released by the Copyright
106
+ Holder(s) under this license and clearly marked as such. This may
107
+ include source files, build scripts and documentation.
108
+
109
+ "Reserved Font Name" refers to any names specified as such after the
110
+ copyright statement(s).
111
+
112
+ "Original Version" refers to the collection of Font Software components as
113
+ distributed by the Copyright Holder(s).
114
+
115
+ "Modified Version" refers to any derivative made by adding to, deleting,
116
+ or substituting -- in part or in whole -- any of the components of the
117
+ Original Version, by changing formats or by porting the Font Software to a
118
+ new environment.
119
+
120
+ "Author" refers to any designer, engineer, programmer, technical
121
+ writer or other person who contributed to the Font Software.
122
+
123
+ PERMISSION & CONDITIONS
124
+ Permission is hereby granted, free of charge, to any person obtaining
125
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
126
+ redistribute, and sell modified and unmodified copies of the Font
127
+ Software, subject to the following conditions:
128
+
129
+ 1) Neither the Font Software nor any of its individual components,
130
+ in Original or Modified Versions, may be sold by itself.
131
+
132
+ 2) Original or Modified Versions of the Font Software may be bundled,
133
+ redistributed and/or sold with any software, provided that each copy
134
+ contains the above copyright notice and this license. These can be
135
+ included either as stand-alone text files, human-readable headers or
136
+ in the appropriate machine-readable metadata fields within text or
137
+ binary files as long as those fields can be easily viewed by the user.
138
+
139
+ 3) No Modified Version of the Font Software may use the Reserved Font
140
+ Name(s) unless explicit written permission is granted by the corresponding
141
+ Copyright Holder. This restriction only applies to the primary font name as
142
+ presented to the users.
143
+
144
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
145
+ Software shall not be used to promote, endorse or advertise any
146
+ Modified Version, except to acknowledge the contribution(s) of the
147
+ Copyright Holder(s) and the Author(s) or with their explicit written
148
+ permission.
149
+
150
+ 5) The Font Software, modified or unmodified, in part or in whole,
151
+ must be distributed entirely under this license, and must not be
152
+ distributed under any other license. The requirement for fonts to
153
+ remain under this license does not apply to any document created
154
+ using the Font Software.
155
+
156
+ TERMINATION
157
+ This license becomes null and void if any of the above conditions are
158
+ not met.
159
+
160
+ DISCLAIMER
161
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
162
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
163
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
164
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
165
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
166
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
167
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
168
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
169
+ OTHER DEALINGS IN THE FONT SOFTWARE.
170
+
171
+ ## Rust crates inside the engine
172
+
173
+ These 38 crates are statically linked into the engine binary and are
174
+ therefore redistributed with it. The list is read out of the compiled artefact
175
+ rather than from a manifest, so it reflects what is genuinely in there.
176
+
177
+ - aho-corasick-1.1.4
178
+ - barcoders-2.0.0
179
+ - base64-0.22.1
180
+ - base64ct-1.8.3
181
+ - console_error_panic_hook-0.1.7
182
+ - const-oid-0.9.6
183
+ - der-0.7.10
184
+ - fdeflate-0.3.7
185
+ - hypher-0.1.6
186
+ - image-0.24.9
187
+ - itoa-1.0.17
188
+ - jpeg-decoder-0.3.2
189
+ - memchr-2.8.0
190
+ - miniz_oxide-0.7.4
191
+ - num-bigint-dig-0.8.6
192
+ - num-integer-0.1.46
193
+ - pem-rfc7468-0.7.0
194
+ - png-0.17.16
195
+ - qrcode-0.14.1
196
+ - quick-xml-0.37.5
197
+ - regex-1.12.3
198
+ - regex-automata-0.4.14
199
+ - regex-syntax-0.8.10
200
+ - rsa-0.9.10
201
+ - rustybuzz-0.20.1
202
+ - serde-1.0.228
203
+ - serde-wasm-bindgen-0.6.5
204
+ - serde_core-1.0.228
205
+ - serde_json-1.0.149
206
+ - signature-2.2.0
207
+ - smallvec-1.15.1
208
+ - ttf-parser-0.25.1
209
+ - unicode-bidi-0.3.18
210
+ - unicode-bidi-mirroring-0.4.0
211
+ - unicode-linebreak-0.1.5
212
+ - unicode-properties-0.1.4
213
+ - unicode-script-0.5.8
214
+ - wasm-bindgen-0.2.108
215
+
216
+ ## npm dependencies
217
+
218
+ Runtime dependencies of the published packages. A consumer installs these from
219
+ npm themselves, under the licences their own packages carry.
220
+
221
+ | Package | Version | Licence |
222
+ | --- | --- | --- |
223
+ | `@floating-ui/react` | 0.27.20 | MIT |
224
+ | `@formepdf/core` | 0.20.0 | MIT |
225
+ | `@formepdf/shared` | 0.20.0 | MIT |
226
+ | `@noble/ed25519` | 3.2.0 | MIT |
227
+ | `d3-scale` | 4.0.2 | ISC |
228
+ | `d3-shape` | 3.2.0 | ISC |
229
+ | `immer` | 10.2.0 | MIT |
230
+ | `lucide-react` | 0.469.0 | ISC |
231
+ | `pdf-lib` | 1.17.1 | MIT |
232
+ | `prosemirror-commands` | 1.7.2 | MIT |
233
+ | `prosemirror-history` | 1.5.0 | MIT |
234
+ | `prosemirror-keymap` | 1.2.3 | MIT |
235
+ | `prosemirror-model` | 1.25.11 | MIT |
236
+ | `prosemirror-schema-list` | 1.5.1 | MIT |
237
+ | `prosemirror-state` | 1.4.4 | MIT |
238
+ | `prosemirror-view` | 1.42.3 | MIT |
239
+ | `react` | 19.2.8 | MIT |
240
+ | `react-dom` | 19.2.8 | MIT |
241
+ | `tslib` | 2.8.1 | 0BSD |
242
+ | `zod` | 3.25.76 | MIT |
243
+
244
+ ### A note on the Chromium backend
245
+
246
+ `@broadpaper/pdf` drives headless Chromium through Playwright, which is an
247
+ optional peer dependency: it is absent from the table above because the host
248
+ installs it deliberately, not because the backend stopped needing it.
249
+ `playwright-core` is Apache-2.0, but it *downloads a browser build separately
250
+ at install time*. That browser is covered by nothing here: it carries its own
251
+ licences, several of them, and they are not ours to restate. Anyone shipping an
252
+ image built on that backend needs to carry Chromium's notices too. The
253
+ browserless engine named at the top of this file has no such tail, which is one
254
+ of the reasons it is the recommended backend.
255
+