@pdfme/common 3.1.5 → 3.2.0-dev.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/README.md ADDED
@@ -0,0 +1,303 @@
1
+ # PDFME
2
+
3
+ <p>
4
+ <a href="https://github.com/pdfme/pdfme/blob/master/LICENSE.md">
5
+ <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="pdfme is released under the MIT license." />
6
+ </a>
7
+ <a href="https://github.com/pdfme/pdfme/actions/workflows/nodejs.yml">
8
+ <img src="https://github.com/pdfme/pdfme/workflows/Unit%20Testing/badge.svg" alt="Unit Testing status" />
9
+ </a>
10
+ <a href="https://www.npmjs.com/package/@pdfme/common">
11
+ <img src="https://img.shields.io/npm/v/@pdfme/common.svg" alt="Current npm package version." />
12
+ </a>
13
+ <a href="https://npmcharts.com/compare/@pdfme/common?minimal=true">
14
+ <img src="https://img.shields.io/npm/dm/@pdfme/common.svg" alt="Downloads per month on npm." />
15
+ </a>
16
+ <a href="https://pdfme.com/docs/development-guide#contribution">
17
+ <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome!" />
18
+ </a>
19
+ <a href="https://twitter.com/intent/tweet?text=Awesome+pdf+library%21&url=https://pdfme.com">
20
+ <img src="https://img.shields.io/twitter/url/http/shields.io.svg?style=social" alt="Tweet" />
21
+ </a>
22
+ </p>
23
+
24
+ TypeScript base PDF generator and React base UI.
25
+ Open source, developed by the community, and completely free to use under the MIT license!
26
+
27
+ <p align="center">
28
+ <img src="https://raw.githubusercontent.com/pdfme/pdfme/main/website/static/img/logo.svg" width="300"/>
29
+ </p>
30
+
31
+ ## Features
32
+
33
+ | Fast PDF Generator | Easy PDF template design | Simple JSON template |
34
+ | -------------------------------------------------------------------------------------------- | ----------------------------------------------------- | -------------------------------------------------------------- |
35
+ | Works on node and browser. Use templates to generate PDF, Complex operations are not needed. | Anyone can easily create templates with the designer. | Templates are JSON data that is easy to understand and handle. |
36
+
37
+ ---
38
+
39
+ <!--
40
+ This is a copy of website/docs/getting-started.md from below.
41
+ - Replace the image path: /img/image.png -> /website/static/img/image.png
42
+ - Replace the link: / -> https://pdfme.com/
43
+ -->
44
+
45
+ ## Introduction
46
+
47
+ pdfme was created to simplify the design and generation process of a PDF. It is especially useful for the following use cases:
48
+
49
+ - Need to create a designed PDF with short code.
50
+ - Need to integrate PDF editor features into an application.
51
+ - Need to create a large number of PDFs without compromising performance
52
+
53
+ As an example, the author's service [https://labelmake.jp/](https://labelmake.jp/) can create more than 100 varieties of PDFs and generates more than 100,000 PDF files per month. Notably, the monthly server cost, utilizing Cloud Functions For Firebase, remains below $10.
54
+
55
+ ## Installation
56
+
57
+ The operating requirements should be the node environment `>=16`.
58
+ There are two packages in pdfme, generator and UI.
59
+
60
+ The package for generating PDF can be installed with the following command.
61
+
62
+ ```
63
+ npm i @pdfme/generator @pdfme/common
64
+ ```
65
+
66
+ The packages for using PDF designer, forms and viewers can be installed with the following commands.
67
+
68
+ ```
69
+ npm i @pdfme/ui @pdfme/common
70
+ ```
71
+
72
+ \*You must install `@pdfme/common` regardless of which package you use.
73
+
74
+ The following type, function and classes are available in pdfme.
75
+
76
+ `@pdfme/common`
77
+
78
+ - [Template](https://pdfme.com/docs/getting-started#template)
79
+
80
+ `@pdfme/generator`
81
+
82
+ - [generate](https://pdfme.com/docs/getting-started#generator)
83
+
84
+ `@pdfme/ui`
85
+
86
+ - [Designer](https://pdfme.com/docs/getting-started#designer)
87
+ - [Form](https://pdfme.com/docs/getting-started#form)
88
+ - [Viewer](https://pdfme.com/docs/getting-started#viewer)
89
+
90
+ If your environment uses webpack, import the necessary items as shown below.
91
+
92
+ ```ts
93
+ import type { Template } from '@pdfme/common';
94
+ import { generate } from '@pdfme/generator';
95
+ ```
96
+
97
+ ```ts
98
+ import type { Template } from '@pdfme/common';
99
+ import { Designer, Form, Viewer } from '@pdfme/ui';
100
+ ```
101
+
102
+ **All objects use `Template`, which will be briefly explained in the next section.**
103
+
104
+ ## Template
105
+
106
+ The core of pdfme library are Templates.
107
+ Template Type can be imported by both `@pdfme/generator` or `@pdfme/ui`. Templates are used everywhere.
108
+
109
+ A template can be divided into two parts: a fixed part and a variable part.
110
+ We call them basePdf and schema.
111
+ The following image is a good illustration of a template.
112
+
113
+ ![](https://raw.githubusercontent.com/pdfme/pdfme/main/website/static/img/template.png)
114
+
115
+ - **basePdf**: PDF data for the fixed part of the PDF to be generated.
116
+ - **schemas**: Definition data for the variable part of the PDF to be generated.
117
+
118
+ **basePdf** can be given a `string`(base64), `ArrayBuffer`, or `Uint8Array`.
119
+ A blank A4 PDF can be imported with `BLANK_PDF`. You can use it to check how it works.
120
+
121
+ **schemas** can only utilize text by default, but you can load images and various barcodes like QR codes as plugins from the `@pdfme/schemas` package.
122
+ Additionally, you can create your own schemas, allowing you to render types other than the ones mentioned above.
123
+ Check detail about [Custom Schemas](https://pdfme.com/docs/custom-schemas) from here
124
+
125
+ Let's take a look at some specific data.
126
+ (If you are using TypeScript, you can import the Template type.)
127
+
128
+ ### Minimal Template
129
+
130
+ ```ts
131
+ import { Template, BLANK_PDF } from '@pdfme/common';
132
+
133
+ const template: Template = {
134
+ basePdf: BLANK_PDF,
135
+ schemas: [
136
+ {
137
+ a: {
138
+ type: 'text',
139
+ position: { x: 0, y: 0 },
140
+ width: 10,
141
+ height: 10,
142
+ },
143
+ b: {
144
+ type: 'text',
145
+ position: { x: 10, y: 10 },
146
+ width: 10,
147
+ height: 10,
148
+ },
149
+ c: {
150
+ type: 'text',
151
+ position: { x: 20, y: 20 },
152
+ width: 10,
153
+ height: 10,
154
+ },
155
+ },
156
+ ],
157
+ };
158
+ ```
159
+
160
+ You can create a template from [Template Design page](https://pdfme.com/template-design). Or, if you want to integrate the template creation feature into your application, check out the [Designer section](https://pdfme.com/docs/getting-started#designer).
161
+
162
+ ## Generator
163
+
164
+ The PDF generator function, `generate`, takes 2 arguments of `template` and `inputs` for generate a PDF. It works both in Node.js and in the browser.
165
+
166
+ The code to generate a PDF file using the [template created above](https://pdfme.com/docs/getting-started#sample-template) is shown below.
167
+
168
+ ```ts
169
+ import type { Template } from '@pdfme/common';
170
+ import { generate } from '@pdfme/generator';
171
+
172
+ const template: Template = {
173
+ // skip... Check the Template section.
174
+ };
175
+ const inputs = [{ a: 'a1', b: 'b1', c: 'c1' }];
176
+
177
+ generate({ template, inputs }).then((pdf) => {
178
+ console.log(pdf);
179
+
180
+ // Browser
181
+ // const blob = new Blob([pdf.buffer], { type: 'application/pdf' });
182
+ // window.open(URL.createObjectURL(blob));
183
+
184
+ // Node.js
185
+ // fs.writeFileSync(path.join(__dirname, `test.pdf`), pdf);
186
+ });
187
+ ```
188
+
189
+ You can create a PDF file like the below.
190
+
191
+ ![](https://raw.githubusercontent.com/pdfme/pdfme/main/website/static/img/simple-pdf.png)
192
+
193
+ Also, each element in the inputs array corresponds to a page in the PDF, you can create a multi-page PDF file by providing multiple elements of inputs.
194
+
195
+ ## UI
196
+
197
+ The UI is composed of the Designer, Form, and Viewer classes.
198
+
199
+ ### Designer
200
+
201
+ The Designer allows you to edit the Template schemas, making it easy for anyone to create Template json objects.
202
+
203
+ You can design your own template from [Template Design page](https://pdfme.com/template-design), or you can integrate the designer into your application.
204
+
205
+ Let's integrate the designer using the template created above as the default template.
206
+
207
+ ```ts
208
+ import type { Template } from '@pdfme/common';
209
+ import { Designer } from '@pdfme/ui';
210
+
211
+ const domContainer = document.getElementById('container');
212
+ const template: Template = {
213
+ // skip... Check the Template section.
214
+ };
215
+
216
+ const designer = new Designer({ domContainer, template });
217
+ ```
218
+
219
+ The Designer class is instantiated as shown above, and the template designer is displayed in the `domContainer`.
220
+ You can edit the template as shown below. The operation is like Google Slides, etc., so you can use common keyboard shortcuts.
221
+
222
+ ![](https://raw.githubusercontent.com/pdfme/pdfme/main/website/static/img/designer.gif)
223
+
224
+ The designer instance can be manipulated with the following methods.
225
+
226
+ - `saveTemplate`
227
+ - `updateTemplate`
228
+ - `getTemplate`
229
+ - `onChangeTemplate`
230
+ - `onSaveTemplate`
231
+ - `destroy`
232
+
233
+ ### Form
234
+
235
+ You can use templates to create forms and PDF viewers.
236
+
237
+ The Form creates a UI for the user to enter schemas based on the template.
238
+
239
+ ```ts
240
+ import type { Template } from '@pdfme/common';
241
+ import { Form } from '@pdfme/ui';
242
+
243
+ const domContainer = document.getElementById('container');
244
+ const template: Template = {
245
+ // skip...
246
+ };
247
+ // This is initial data.
248
+ const inputs = [{ a: 'a1', b: 'b1', c: 'c1' }];
249
+
250
+ const form = new Form({ domContainer, template, inputs });
251
+ ```
252
+
253
+ ![](https://raw.githubusercontent.com/pdfme/pdfme/main/website/static/img/form.gif)
254
+
255
+ The form instance has a method `getInputs` to get the user's input.
256
+
257
+ You can generate a PDF file based on the user's input by passing the data you get from `getInputs` as inputs to generate, as shown in the code below.
258
+
259
+ ```ts
260
+ generate({ template, inputs: form.getInputs() }).then((pdf) => {
261
+ const blob = new Blob([pdf.buffer], { type: 'application/pdf' });
262
+ window.open(URL.createObjectURL(blob));
263
+ });
264
+ ```
265
+
266
+ ### Viewer
267
+
268
+ Viewing a PDF file in a mobile browser is a pain, because it doesn't display well in an iframe.
269
+
270
+ The Viewer is a byproduct of the Form development process, but it allows you to show your users a preview of the PDF file you will create.
271
+
272
+ Using the Viewer is basically the same as using the Form, except that user cannot edit it.
273
+
274
+ ```ts
275
+ import type { Template } from '@pdfme/common';
276
+ import { Viewer } from '@pdfme/ui';
277
+
278
+ const domContainer = document.getElementById('container');
279
+ const template: Template = {
280
+ // skip...
281
+ };
282
+ const inputs = [{ a: 'a1', b: 'b1', c: 'c1' }];
283
+
284
+ const viewer = new Viewer({ domContainer, template, inputs });
285
+ ```
286
+
287
+ ![](https://raw.githubusercontent.com/pdfme/pdfme/main/website/static/img/viewer.png)
288
+
289
+ ## Special Thanks
290
+
291
+ - [pdf-lib](https://pdf-lib.js.org/): Used in PDF generation.
292
+ - [fontkit](https://github.com/foliojs/fontkit): Used in font rendering.
293
+ - [PDF.js](https://mozilla.github.io/pdf.js/): Used in PDF viewing.
294
+ - [React](https://reactjs.org/): Used in building the UI.
295
+ - [form-render](https://xrender.fun/form-render): Used in building the UI.
296
+ - [antd](https://ant.design/): Used in building the UI.
297
+ - [react-moveable](https://daybrush.com/moveable/), [react-selecto](https://github.com/daybrush/selecto), [@scena/react-guides](https://daybrush.com/guides/): Used in Designer UI.
298
+ - [dnd-kit](https://github.com/clauderic/dnd-kit): Used in Designer UI.
299
+
300
+ I definitely could not have created pdfme without these libraries. I am grateful to the developers of these libraries.
301
+
302
+ If you want to contribute to pdfme, please check the [Development Guide](https://pdfme.com/docs/development-guide) page.
303
+ We look forward to your contribution!
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAOwB;AA6CtB,+FAnDA,6BAAc,OAmDA;AACd,+FAnDA,6BAAc,OAmDA;AACd,+FAnDA,6BAAc,OAmDA;AACd,0FAnDA,wBAAS,OAmDA;AACT,qFAnDA,mBAAI,OAmDA;AACJ,kGAnDA,gCAAiB,OAmDA;AAzBnB,2CAiBqB;AASnB,oGAzBA,+BAAmB,OAyBA;AACnB,+FAzBA,0BAAc,OAyBA;AACd,8FAzBA,yBAAa,OAyBA;AACb,gGAzBA,2BAAe,OAyBA;AAKf,0FA7BA,qBAAS,OA6BA;AACT,4FA7BA,uBAAW,OA6BA;AACX,+FA7BA,0BAAc,OA6BA;AACd,8FA7BA,yBAAa,OA6BA;AACb,6FA7BA,wBAAY,OA6BA;AACZ,kGA7BA,6BAAiB,OA6BA;AACjB,mGA7BA,8BAAkB,OA6BA;AAClB,mGA7BA,8BAAkB,OA6BA;AAXlB,sFAjBA,iBAAK,OAiBA;AACL,sFAjBA,iBAAK,OAiBA;AACL,sFAjBA,iBAAK,OAiBA;AACL,2FAjBA,sBAAU,OAiBA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAOwB;AA8CtB,+FApDA,6BAAc,OAoDA;AACd,+FApDA,6BAAc,OAoDA;AACd,+FApDA,6BAAc,OAoDA;AACd,0FApDA,wBAAS,OAoDA;AACT,qFApDA,mBAAI,OAoDA;AACJ,kGApDA,gCAAiB,OAoDA;AAzBnB,2CAiBqB;AASnB,oGAzBA,+BAAmB,OAyBA;AACnB,+FAzBA,0BAAc,OAyBA;AACd,8FAzBA,yBAAa,OAyBA;AACb,gGAzBA,2BAAe,OAyBA;AAKf,0FA7BA,qBAAS,OA6BA;AACT,4FA7BA,uBAAW,OA6BA;AACX,+FA7BA,0BAAc,OA6BA;AACd,8FA7BA,yBAAa,OA6BA;AACb,6FA7BA,wBAAY,OA6BA;AACZ,kGA7BA,6BAAiB,OA6BA;AACjB,mGA7BA,8BAAkB,OA6BA;AAClB,mGA7BA,8BAAkB,OA6BA;AAXlB,sFAjBA,iBAAK,OAiBA;AACL,sFAjBA,iBAAK,OAiBA;AACL,sFAjBA,iBAAK,OAiBA;AACL,2FAjBA,sBAAU,OAiBA"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DesignerProps = exports.PreviewProps = exports.UIProps = exports.UIOptions = exports.GenerateProps = exports.GeneratorOptions = exports.Inputs = exports.Template = exports.BasePdf = exports.Font = exports.SchemaForUI = exports.Schema = exports.Size = exports.Dict = exports.Lang = void 0;
3
+ exports.DesignerProps = exports.PreviewProps = exports.UIProps = exports.UIOptions = exports.GenerateProps = exports.GeneratorOptions = exports.Inputs = exports.Template = exports.BasePdf = exports.Font = exports.SchemaForUI = exports.Schema = exports.Size = exports.Mode = exports.Dict = exports.Lang = void 0;
4
4
  const zod_1 = require("zod");
5
- const langs = ['en', 'ja', 'ar', 'th', 'pl', 'it'];
5
+ const langs = ['en', 'ja', 'ar', 'th', 'pl', 'it', 'de'];
6
6
  exports.Lang = zod_1.z.enum(langs);
7
7
  exports.Dict = zod_1.z.object({
8
8
  // -----------------used in ui-----------------
@@ -27,7 +27,11 @@ exports.Dict = zod_1.z.object({
27
27
  errorBulkUpdateFieldName: zod_1.z.string(),
28
28
  commitBulkUpdateFieldName: zod_1.z.string(),
29
29
  bulkUpdateFieldName: zod_1.z.string(),
30
+ hexColorPrompt: zod_1.z.string(),
30
31
  // -----------------used in schemas-----------------
32
+ 'schemas.color': zod_1.z.string(),
33
+ 'schemas.borderWidth': zod_1.z.string(),
34
+ 'schemas.borderColor': zod_1.z.string(),
31
35
  'schemas.textColor': zod_1.z.string(),
32
36
  'schemas.bgColor': zod_1.z.string(),
33
37
  'schemas.horizontal': zod_1.z.string(),
@@ -49,11 +53,15 @@ exports.Dict = zod_1.z.object({
49
53
  'schemas.text.fit': zod_1.z.string(),
50
54
  'schemas.text.dynamicFontSize': zod_1.z.string(),
51
55
  'schemas.barcodes.barColor': zod_1.z.string(),
56
+ 'schemas.barcodes.includetext': zod_1.z.string(),
52
57
  });
58
+ exports.Mode = zod_1.z.enum(['viewer', 'form', 'designer']);
53
59
  exports.Size = zod_1.z.object({ height: zod_1.z.number(), width: zod_1.z.number() });
54
60
  exports.Schema = zod_1.z
55
61
  .object({
56
62
  type: zod_1.z.string(),
63
+ readOnly: zod_1.z.boolean().optional(),
64
+ readOnlyValue: zod_1.z.string().optional(),
57
65
  position: zod_1.z.object({ x: zod_1.z.number(), y: zod_1.z.number() }),
58
66
  width: zod_1.z.number(),
59
67
  height: zod_1.z.number(),
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AAE/C,QAAA,IAAI,GAAG,OAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACrB,QAAA,IAAI,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3B,+CAA+C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AAK,EACL,KAAK,EACL,KAAK,EACL,UAAU,GACX,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,EACT,IAAI,EACJ,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,eAAe,EACf,KAAK,EACL,KAAK,EACL,KAAK,EACL,UAAU,EACV,SAAS,EACT,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GACnB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,EACT,IAAI,EACJ,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AA0BxB,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,eAAe,EACf,SAAS,EACT,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,EACL,KAAK,EACL,KAAK,EACL,UAAU,GACX,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,EACT,IAAI,EACJ,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,eAAe,EACf,KAAK,EACL,KAAK,EACL,KAAK,EACL,UAAU,EACV,SAAS,EACT,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GACnB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- const langs = ['en', 'ja', 'ar', 'th', 'pl', 'it'];
2
+ const langs = ['en', 'ja', 'ar', 'th', 'pl', 'it', 'de'];
3
3
  export const Lang = z.enum(langs);
4
4
  export const Dict = z.object({
5
5
  // -----------------used in ui-----------------
@@ -24,7 +24,11 @@ export const Dict = z.object({
24
24
  errorBulkUpdateFieldName: z.string(),
25
25
  commitBulkUpdateFieldName: z.string(),
26
26
  bulkUpdateFieldName: z.string(),
27
+ hexColorPrompt: z.string(),
27
28
  // -----------------used in schemas-----------------
29
+ 'schemas.color': z.string(),
30
+ 'schemas.borderWidth': z.string(),
31
+ 'schemas.borderColor': z.string(),
28
32
  'schemas.textColor': z.string(),
29
33
  'schemas.bgColor': z.string(),
30
34
  'schemas.horizontal': z.string(),
@@ -46,11 +50,15 @@ export const Dict = z.object({
46
50
  'schemas.text.fit': z.string(),
47
51
  'schemas.text.dynamicFontSize': z.string(),
48
52
  'schemas.barcodes.barColor': z.string(),
53
+ 'schemas.barcodes.includetext': z.string(),
49
54
  });
55
+ export const Mode = z.enum(['viewer', 'form', 'designer']);
50
56
  export const Size = z.object({ height: z.number(), width: z.number() });
51
57
  export const Schema = z
52
58
  .object({
53
59
  type: z.string(),
60
+ readOnly: z.boolean().optional(),
61
+ readOnlyValue: z.string().optional(),
54
62
  position: z.object({ x: z.number(), y: z.number() }),
55
63
  width: z.number(),
56
64
  height: z.number(),
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AAE5D,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAClC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,+CAA+C;IAC/C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,KAAK,EAAE,C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import type { ChangeSchemas, PropPanel, PropPanelSchema, PropPanelWidgetProps, PDFRenderProps, UIRenderProps, Plugin, Lang, Dict, Size, Schema, SchemaForUI, Font, BasePdf, Template, GeneratorOptions, Plugins, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps } from './types.js';
2
+ import type { ChangeSchemas, PropPanel, PropPanelSchema, PropPanelWidgetProps, PDFRenderProps, Mode, UIRenderProps, Plugin, Lang, Dict, Size, Schema, SchemaForUI, Font, BasePdf, Template, GeneratorOptions, Plugins, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps } from './types.js';
3
3
  import { getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, mm2pt, pt2mm, pt2px, isHexValid } from './helper.js';
4
4
  export { MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, ZOOM, DEFAULT_FONT_NAME, getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, mm2pt, pt2mm, pt2px, isHexValid, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, };
5
- export type { Lang, Dict, Size, Schema, SchemaForUI, Font, BasePdf, Template, GeneratorOptions, Plugins, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps, ChangeSchemas, PropPanel, PropPanelSchema, PropPanelWidgetProps, PDFRenderProps, UIRenderProps, Plugin, };
5
+ export type { Lang, Dict, Size, Schema, SchemaForUI, Font, BasePdf, Template, GeneratorOptions, Plugins, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps, ChangeSchemas, PropPanel, PropPanelSchema, PropPanelWidgetProps, PDFRenderProps, UIRenderProps, Mode, Plugin, };
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export declare const Lang: z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>;
2
+ export declare const Lang: z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>;
3
3
  export declare const Dict: z.ZodObject<{
4
4
  cancel: z.ZodString;
5
5
  field: z.ZodString;
@@ -22,6 +22,10 @@ export declare const Dict: z.ZodObject<{
22
22
  errorBulkUpdateFieldName: z.ZodString;
23
23
  commitBulkUpdateFieldName: z.ZodString;
24
24
  bulkUpdateFieldName: z.ZodString;
25
+ hexColorPrompt: z.ZodString;
26
+ 'schemas.color': z.ZodString;
27
+ 'schemas.borderWidth': z.ZodString;
28
+ 'schemas.borderColor': z.ZodString;
25
29
  'schemas.textColor': z.ZodString;
26
30
  'schemas.bgColor': z.ZodString;
27
31
  'schemas.horizontal': z.ZodString;
@@ -43,6 +47,7 @@ export declare const Dict: z.ZodObject<{
43
47
  'schemas.text.fit': z.ZodString;
44
48
  'schemas.text.dynamicFontSize': z.ZodString;
45
49
  'schemas.barcodes.barColor': z.ZodString;
50
+ 'schemas.barcodes.includetext': z.ZodString;
46
51
  }, "strip", z.ZodTypeAny, {
47
52
  cancel: string;
48
53
  field: string;
@@ -65,6 +70,10 @@ export declare const Dict: z.ZodObject<{
65
70
  errorBulkUpdateFieldName: string;
66
71
  commitBulkUpdateFieldName: string;
67
72
  bulkUpdateFieldName: string;
73
+ hexColorPrompt: string;
74
+ 'schemas.color': string;
75
+ 'schemas.borderWidth': string;
76
+ 'schemas.borderColor': string;
68
77
  'schemas.textColor': string;
69
78
  'schemas.bgColor': string;
70
79
  'schemas.horizontal': string;
@@ -86,6 +95,7 @@ export declare const Dict: z.ZodObject<{
86
95
  'schemas.text.fit': string;
87
96
  'schemas.text.dynamicFontSize': string;
88
97
  'schemas.barcodes.barColor': string;
98
+ 'schemas.barcodes.includetext': string;
89
99
  }, {
90
100
  cancel: string;
91
101
  field: string;
@@ -108,6 +118,10 @@ export declare const Dict: z.ZodObject<{
108
118
  errorBulkUpdateFieldName: string;
109
119
  commitBulkUpdateFieldName: string;
110
120
  bulkUpdateFieldName: string;
121
+ hexColorPrompt: string;
122
+ 'schemas.color': string;
123
+ 'schemas.borderWidth': string;
124
+ 'schemas.borderColor': string;
111
125
  'schemas.textColor': string;
112
126
  'schemas.bgColor': string;
113
127
  'schemas.horizontal': string;
@@ -129,7 +143,9 @@ export declare const Dict: z.ZodObject<{
129
143
  'schemas.text.fit': string;
130
144
  'schemas.text.dynamicFontSize': string;
131
145
  'schemas.barcodes.barColor': string;
146
+ 'schemas.barcodes.includetext': string;
132
147
  }>;
148
+ export declare const Mode: z.ZodEnum<["viewer", "form", "designer"]>;
133
149
  export declare const Size: z.ZodObject<{
134
150
  height: z.ZodNumber;
135
151
  width: z.ZodNumber;
@@ -142,6 +158,8 @@ export declare const Size: z.ZodObject<{
142
158
  }>;
143
159
  export declare const Schema: z.ZodObject<{
144
160
  type: z.ZodString;
161
+ readOnly: z.ZodOptional<z.ZodBoolean>;
162
+ readOnlyValue: z.ZodOptional<z.ZodString>;
145
163
  position: z.ZodObject<{
146
164
  x: z.ZodNumber;
147
165
  y: z.ZodNumber;
@@ -158,6 +176,8 @@ export declare const Schema: z.ZodObject<{
158
176
  opacity: z.ZodOptional<z.ZodNumber>;
159
177
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
160
178
  type: z.ZodString;
179
+ readOnly: z.ZodOptional<z.ZodBoolean>;
180
+ readOnlyValue: z.ZodOptional<z.ZodString>;
161
181
  position: z.ZodObject<{
162
182
  x: z.ZodNumber;
163
183
  y: z.ZodNumber;
@@ -174,6 +194,8 @@ export declare const Schema: z.ZodObject<{
174
194
  opacity: z.ZodOptional<z.ZodNumber>;
175
195
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
176
196
  type: z.ZodString;
197
+ readOnly: z.ZodOptional<z.ZodBoolean>;
198
+ readOnlyValue: z.ZodOptional<z.ZodString>;
177
199
  position: z.ZodObject<{
178
200
  x: z.ZodNumber;
179
201
  y: z.ZodNumber;
@@ -195,6 +217,8 @@ export declare const SchemaForUI: z.ZodObject<{
195
217
  height: z.ZodNumber;
196
218
  rotate: z.ZodOptional<z.ZodNumber>;
197
219
  type: z.ZodString;
220
+ readOnly: z.ZodOptional<z.ZodBoolean>;
221
+ readOnlyValue: z.ZodOptional<z.ZodString>;
198
222
  position: z.ZodObject<{
199
223
  x: z.ZodNumber;
200
224
  y: z.ZodNumber;
@@ -221,6 +245,8 @@ export declare const SchemaForUI: z.ZodObject<{
221
245
  key: string;
222
246
  opacity?: number | undefined;
223
247
  rotate?: number | undefined;
248
+ readOnly?: boolean | undefined;
249
+ readOnlyValue?: string | undefined;
224
250
  }, {
225
251
  width: number;
226
252
  height: number;
@@ -234,6 +260,8 @@ export declare const SchemaForUI: z.ZodObject<{
234
260
  key: string;
235
261
  opacity?: number | undefined;
236
262
  rotate?: number | undefined;
263
+ readOnly?: boolean | undefined;
264
+ readOnlyValue?: string | undefined;
237
265
  }>;
238
266
  export declare const Font: z.ZodRecord<z.ZodString, z.ZodObject<{
239
267
  data: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>;
@@ -252,6 +280,8 @@ export declare const BasePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.
252
280
  export declare const Template: z.ZodObject<{
253
281
  schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
254
282
  type: z.ZodString;
283
+ readOnly: z.ZodOptional<z.ZodBoolean>;
284
+ readOnlyValue: z.ZodOptional<z.ZodString>;
255
285
  position: z.ZodObject<{
256
286
  x: z.ZodNumber;
257
287
  y: z.ZodNumber;
@@ -268,6 +298,8 @@ export declare const Template: z.ZodObject<{
268
298
  opacity: z.ZodOptional<z.ZodNumber>;
269
299
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
270
300
  type: z.ZodString;
301
+ readOnly: z.ZodOptional<z.ZodBoolean>;
302
+ readOnlyValue: z.ZodOptional<z.ZodString>;
271
303
  position: z.ZodObject<{
272
304
  x: z.ZodNumber;
273
305
  y: z.ZodNumber;
@@ -284,6 +316,8 @@ export declare const Template: z.ZodObject<{
284
316
  opacity: z.ZodOptional<z.ZodNumber>;
285
317
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
286
318
  type: z.ZodString;
319
+ readOnly: z.ZodOptional<z.ZodBoolean>;
320
+ readOnlyValue: z.ZodOptional<z.ZodString>;
287
321
  position: z.ZodObject<{
288
322
  x: z.ZodNumber;
289
323
  y: z.ZodNumber;
@@ -305,6 +339,8 @@ export declare const Template: z.ZodObject<{
305
339
  }, "strip", z.ZodTypeAny, {
306
340
  schemas: Record<string, z.objectOutputType<{
307
341
  type: z.ZodString;
342
+ readOnly: z.ZodOptional<z.ZodBoolean>;
343
+ readOnlyValue: z.ZodOptional<z.ZodString>;
308
344
  position: z.ZodObject<{
309
345
  x: z.ZodNumber;
310
346
  y: z.ZodNumber;
@@ -326,6 +362,8 @@ export declare const Template: z.ZodObject<{
326
362
  }, {
327
363
  schemas: Record<string, z.objectInputType<{
328
364
  type: z.ZodString;
365
+ readOnly: z.ZodOptional<z.ZodBoolean>;
366
+ readOnlyValue: z.ZodOptional<z.ZodString>;
329
367
  position: z.ZodObject<{
330
368
  x: z.ZodNumber;
331
369
  y: z.ZodNumber;
@@ -420,6 +458,8 @@ export declare const GenerateProps: z.ZodObject<{
420
458
  template: z.ZodObject<{
421
459
  schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
422
460
  type: z.ZodString;
461
+ readOnly: z.ZodOptional<z.ZodBoolean>;
462
+ readOnlyValue: z.ZodOptional<z.ZodString>;
423
463
  position: z.ZodObject<{
424
464
  x: z.ZodNumber;
425
465
  y: z.ZodNumber;
@@ -436,6 +476,8 @@ export declare const GenerateProps: z.ZodObject<{
436
476
  opacity: z.ZodOptional<z.ZodNumber>;
437
477
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
438
478
  type: z.ZodString;
479
+ readOnly: z.ZodOptional<z.ZodBoolean>;
480
+ readOnlyValue: z.ZodOptional<z.ZodString>;
439
481
  position: z.ZodObject<{
440
482
  x: z.ZodNumber;
441
483
  y: z.ZodNumber;
@@ -452,6 +494,8 @@ export declare const GenerateProps: z.ZodObject<{
452
494
  opacity: z.ZodOptional<z.ZodNumber>;
453
495
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
454
496
  type: z.ZodString;
497
+ readOnly: z.ZodOptional<z.ZodBoolean>;
498
+ readOnlyValue: z.ZodOptional<z.ZodString>;
455
499
  position: z.ZodObject<{
456
500
  x: z.ZodNumber;
457
501
  y: z.ZodNumber;
@@ -473,6 +517,8 @@ export declare const GenerateProps: z.ZodObject<{
473
517
  }, "strip", z.ZodTypeAny, {
474
518
  schemas: Record<string, z.objectOutputType<{
475
519
  type: z.ZodString;
520
+ readOnly: z.ZodOptional<z.ZodBoolean>;
521
+ readOnlyValue: z.ZodOptional<z.ZodString>;
476
522
  position: z.ZodObject<{
477
523
  x: z.ZodNumber;
478
524
  y: z.ZodNumber;
@@ -494,6 +540,8 @@ export declare const GenerateProps: z.ZodObject<{
494
540
  }, {
495
541
  schemas: Record<string, z.objectInputType<{
496
542
  type: z.ZodString;
543
+ readOnly: z.ZodOptional<z.ZodBoolean>;
544
+ readOnlyValue: z.ZodOptional<z.ZodString>;
497
545
  position: z.ZodObject<{
498
546
  x: z.ZodNumber;
499
547
  y: z.ZodNumber;
@@ -601,6 +649,8 @@ export declare const GenerateProps: z.ZodObject<{
601
649
  template: {
602
650
  schemas: Record<string, z.objectOutputType<{
603
651
  type: z.ZodString;
652
+ readOnly: z.ZodOptional<z.ZodBoolean>;
653
+ readOnlyValue: z.ZodOptional<z.ZodString>;
604
654
  position: z.ZodObject<{
605
655
  x: z.ZodNumber;
606
656
  y: z.ZodNumber;
@@ -654,6 +704,8 @@ export declare const GenerateProps: z.ZodObject<{
654
704
  template: {
655
705
  schemas: Record<string, z.objectInputType<{
656
706
  type: z.ZodString;
707
+ readOnly: z.ZodOptional<z.ZodBoolean>;
708
+ readOnlyValue: z.ZodOptional<z.ZodString>;
657
709
  position: z.ZodObject<{
658
710
  x: z.ZodNumber;
659
711
  y: z.ZodNumber;
@@ -718,7 +770,7 @@ export declare const UIOptions: z.ZodObject<{
718
770
  fallback?: boolean | undefined;
719
771
  subset?: boolean | undefined;
720
772
  }>>>;
721
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
773
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
722
774
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
723
775
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
724
776
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -735,7 +787,7 @@ export declare const UIOptions: z.ZodObject<{
735
787
  fallback?: boolean | undefined;
736
788
  subset?: boolean | undefined;
737
789
  }>>>;
738
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
790
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
739
791
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
740
792
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
741
793
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
@@ -752,7 +804,7 @@ export declare const UIOptions: z.ZodObject<{
752
804
  fallback?: boolean | undefined;
753
805
  subset?: boolean | undefined;
754
806
  }>>>;
755
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
807
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
756
808
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
757
809
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
758
810
  }, z.ZodTypeAny, "passthrough">>;
@@ -760,6 +812,8 @@ export declare const UIProps: z.ZodObject<{
760
812
  template: z.ZodObject<{
761
813
  schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
762
814
  type: z.ZodString;
815
+ readOnly: z.ZodOptional<z.ZodBoolean>;
816
+ readOnlyValue: z.ZodOptional<z.ZodString>;
763
817
  position: z.ZodObject<{
764
818
  x: z.ZodNumber;
765
819
  y: z.ZodNumber;
@@ -776,6 +830,8 @@ export declare const UIProps: z.ZodObject<{
776
830
  opacity: z.ZodOptional<z.ZodNumber>;
777
831
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
778
832
  type: z.ZodString;
833
+ readOnly: z.ZodOptional<z.ZodBoolean>;
834
+ readOnlyValue: z.ZodOptional<z.ZodString>;
779
835
  position: z.ZodObject<{
780
836
  x: z.ZodNumber;
781
837
  y: z.ZodNumber;
@@ -792,6 +848,8 @@ export declare const UIProps: z.ZodObject<{
792
848
  opacity: z.ZodOptional<z.ZodNumber>;
793
849
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
794
850
  type: z.ZodString;
851
+ readOnly: z.ZodOptional<z.ZodBoolean>;
852
+ readOnlyValue: z.ZodOptional<z.ZodString>;
795
853
  position: z.ZodObject<{
796
854
  x: z.ZodNumber;
797
855
  y: z.ZodNumber;
@@ -813,6 +871,8 @@ export declare const UIProps: z.ZodObject<{
813
871
  }, "strip", z.ZodTypeAny, {
814
872
  schemas: Record<string, z.objectOutputType<{
815
873
  type: z.ZodString;
874
+ readOnly: z.ZodOptional<z.ZodBoolean>;
875
+ readOnlyValue: z.ZodOptional<z.ZodString>;
816
876
  position: z.ZodObject<{
817
877
  x: z.ZodNumber;
818
878
  y: z.ZodNumber;
@@ -834,6 +894,8 @@ export declare const UIProps: z.ZodObject<{
834
894
  }, {
835
895
  schemas: Record<string, z.objectInputType<{
836
896
  type: z.ZodString;
897
+ readOnly: z.ZodOptional<z.ZodBoolean>;
898
+ readOnlyValue: z.ZodOptional<z.ZodString>;
837
899
  position: z.ZodObject<{
838
900
  x: z.ZodNumber;
839
901
  y: z.ZodNumber;
@@ -881,7 +943,7 @@ export declare const UIProps: z.ZodObject<{
881
943
  fallback?: boolean | undefined;
882
944
  subset?: boolean | undefined;
883
945
  }>>>;
884
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
946
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
885
947
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
886
948
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
887
949
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -898,7 +960,7 @@ export declare const UIProps: z.ZodObject<{
898
960
  fallback?: boolean | undefined;
899
961
  subset?: boolean | undefined;
900
962
  }>>>;
901
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
963
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
902
964
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
903
965
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
904
966
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
@@ -915,7 +977,7 @@ export declare const UIProps: z.ZodObject<{
915
977
  fallback?: boolean | undefined;
916
978
  subset?: boolean | undefined;
917
979
  }>>>;
918
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
980
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
919
981
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
920
982
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
921
983
  }, z.ZodTypeAny, "passthrough">>>;
@@ -923,6 +985,8 @@ export declare const UIProps: z.ZodObject<{
923
985
  template: {
924
986
  schemas: Record<string, z.objectOutputType<{
925
987
  type: z.ZodString;
988
+ readOnly: z.ZodOptional<z.ZodBoolean>;
989
+ readOnlyValue: z.ZodOptional<z.ZodString>;
926
990
  position: z.ZodObject<{
927
991
  x: z.ZodNumber;
928
992
  y: z.ZodNumber;
@@ -962,7 +1026,7 @@ export declare const UIProps: z.ZodObject<{
962
1026
  fallback?: boolean | undefined;
963
1027
  subset?: boolean | undefined;
964
1028
  }>>>;
965
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1029
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
966
1030
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
967
1031
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
968
1032
  }, z.ZodTypeAny, "passthrough"> | undefined;
@@ -970,6 +1034,8 @@ export declare const UIProps: z.ZodObject<{
970
1034
  template: {
971
1035
  schemas: Record<string, z.objectInputType<{
972
1036
  type: z.ZodString;
1037
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1038
+ readOnlyValue: z.ZodOptional<z.ZodString>;
973
1039
  position: z.ZodObject<{
974
1040
  x: z.ZodNumber;
975
1041
  y: z.ZodNumber;
@@ -1009,7 +1075,7 @@ export declare const UIProps: z.ZodObject<{
1009
1075
  fallback?: boolean | undefined;
1010
1076
  subset?: boolean | undefined;
1011
1077
  }>>>;
1012
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1078
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1013
1079
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1014
1080
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1015
1081
  }, z.ZodTypeAny, "passthrough"> | undefined;
@@ -1029,7 +1095,7 @@ export declare const PreviewProps: z.ZodObject<{
1029
1095
  fallback?: boolean | undefined;
1030
1096
  subset?: boolean | undefined;
1031
1097
  }>>>;
1032
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1098
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1033
1099
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1034
1100
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1035
1101
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -1046,7 +1112,7 @@ export declare const PreviewProps: z.ZodObject<{
1046
1112
  fallback?: boolean | undefined;
1047
1113
  subset?: boolean | undefined;
1048
1114
  }>>>;
1049
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1115
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1050
1116
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1051
1117
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1052
1118
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
@@ -1063,13 +1129,15 @@ export declare const PreviewProps: z.ZodObject<{
1063
1129
  fallback?: boolean | undefined;
1064
1130
  subset?: boolean | undefined;
1065
1131
  }>>>;
1066
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1132
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1067
1133
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1068
1134
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1069
1135
  }, z.ZodTypeAny, "passthrough">>>;
1070
1136
  template: z.ZodObject<{
1071
1137
  schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
1072
1138
  type: z.ZodString;
1139
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1140
+ readOnlyValue: z.ZodOptional<z.ZodString>;
1073
1141
  position: z.ZodObject<{
1074
1142
  x: z.ZodNumber;
1075
1143
  y: z.ZodNumber;
@@ -1086,6 +1154,8 @@ export declare const PreviewProps: z.ZodObject<{
1086
1154
  opacity: z.ZodOptional<z.ZodNumber>;
1087
1155
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1088
1156
  type: z.ZodString;
1157
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1158
+ readOnlyValue: z.ZodOptional<z.ZodString>;
1089
1159
  position: z.ZodObject<{
1090
1160
  x: z.ZodNumber;
1091
1161
  y: z.ZodNumber;
@@ -1102,6 +1172,8 @@ export declare const PreviewProps: z.ZodObject<{
1102
1172
  opacity: z.ZodOptional<z.ZodNumber>;
1103
1173
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1104
1174
  type: z.ZodString;
1175
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1176
+ readOnlyValue: z.ZodOptional<z.ZodString>;
1105
1177
  position: z.ZodObject<{
1106
1178
  x: z.ZodNumber;
1107
1179
  y: z.ZodNumber;
@@ -1123,6 +1195,8 @@ export declare const PreviewProps: z.ZodObject<{
1123
1195
  }, "strip", z.ZodTypeAny, {
1124
1196
  schemas: Record<string, z.objectOutputType<{
1125
1197
  type: z.ZodString;
1198
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1199
+ readOnlyValue: z.ZodOptional<z.ZodString>;
1126
1200
  position: z.ZodObject<{
1127
1201
  x: z.ZodNumber;
1128
1202
  y: z.ZodNumber;
@@ -1144,6 +1218,8 @@ export declare const PreviewProps: z.ZodObject<{
1144
1218
  }, {
1145
1219
  schemas: Record<string, z.objectInputType<{
1146
1220
  type: z.ZodString;
1221
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1222
+ readOnlyValue: z.ZodOptional<z.ZodString>;
1147
1223
  position: z.ZodObject<{
1148
1224
  x: z.ZodNumber;
1149
1225
  y: z.ZodNumber;
@@ -1182,6 +1258,8 @@ export declare const PreviewProps: z.ZodObject<{
1182
1258
  template: {
1183
1259
  schemas: Record<string, z.objectOutputType<{
1184
1260
  type: z.ZodString;
1261
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1262
+ readOnlyValue: z.ZodOptional<z.ZodString>;
1185
1263
  position: z.ZodObject<{
1186
1264
  x: z.ZodNumber;
1187
1265
  y: z.ZodNumber;
@@ -1217,7 +1295,7 @@ export declare const PreviewProps: z.ZodObject<{
1217
1295
  fallback?: boolean | undefined;
1218
1296
  subset?: boolean | undefined;
1219
1297
  }>>>;
1220
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1298
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1221
1299
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1222
1300
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1223
1301
  }, z.ZodTypeAny, "passthrough"> | undefined;
@@ -1230,6 +1308,8 @@ export declare const PreviewProps: z.ZodObject<{
1230
1308
  template: {
1231
1309
  schemas: Record<string, z.objectInputType<{
1232
1310
  type: z.ZodString;
1311
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1312
+ readOnlyValue: z.ZodOptional<z.ZodString>;
1233
1313
  position: z.ZodObject<{
1234
1314
  x: z.ZodNumber;
1235
1315
  y: z.ZodNumber;
@@ -1265,7 +1345,7 @@ export declare const PreviewProps: z.ZodObject<{
1265
1345
  fallback?: boolean | undefined;
1266
1346
  subset?: boolean | undefined;
1267
1347
  }>>>;
1268
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1348
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1269
1349
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1270
1350
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1271
1351
  }, z.ZodTypeAny, "passthrough"> | undefined;
@@ -1290,7 +1370,7 @@ export declare const DesignerProps: z.ZodObject<{
1290
1370
  fallback?: boolean | undefined;
1291
1371
  subset?: boolean | undefined;
1292
1372
  }>>>;
1293
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1373
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1294
1374
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1295
1375
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1296
1376
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -1307,7 +1387,7 @@ export declare const DesignerProps: z.ZodObject<{
1307
1387
  fallback?: boolean | undefined;
1308
1388
  subset?: boolean | undefined;
1309
1389
  }>>>;
1310
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1390
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1311
1391
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1312
1392
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1313
1393
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
@@ -1324,13 +1404,15 @@ export declare const DesignerProps: z.ZodObject<{
1324
1404
  fallback?: boolean | undefined;
1325
1405
  subset?: boolean | undefined;
1326
1406
  }>>>;
1327
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1407
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1328
1408
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1329
1409
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1330
1410
  }, z.ZodTypeAny, "passthrough">>>;
1331
1411
  template: z.ZodObject<{
1332
1412
  schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
1333
1413
  type: z.ZodString;
1414
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1415
+ readOnlyValue: z.ZodOptional<z.ZodString>;
1334
1416
  position: z.ZodObject<{
1335
1417
  x: z.ZodNumber;
1336
1418
  y: z.ZodNumber;
@@ -1347,6 +1429,8 @@ export declare const DesignerProps: z.ZodObject<{
1347
1429
  opacity: z.ZodOptional<z.ZodNumber>;
1348
1430
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1349
1431
  type: z.ZodString;
1432
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1433
+ readOnlyValue: z.ZodOptional<z.ZodString>;
1350
1434
  position: z.ZodObject<{
1351
1435
  x: z.ZodNumber;
1352
1436
  y: z.ZodNumber;
@@ -1363,6 +1447,8 @@ export declare const DesignerProps: z.ZodObject<{
1363
1447
  opacity: z.ZodOptional<z.ZodNumber>;
1364
1448
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1365
1449
  type: z.ZodString;
1450
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1451
+ readOnlyValue: z.ZodOptional<z.ZodString>;
1366
1452
  position: z.ZodObject<{
1367
1453
  x: z.ZodNumber;
1368
1454
  y: z.ZodNumber;
@@ -1384,6 +1470,8 @@ export declare const DesignerProps: z.ZodObject<{
1384
1470
  }, "strip", z.ZodTypeAny, {
1385
1471
  schemas: Record<string, z.objectOutputType<{
1386
1472
  type: z.ZodString;
1473
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1474
+ readOnlyValue: z.ZodOptional<z.ZodString>;
1387
1475
  position: z.ZodObject<{
1388
1476
  x: z.ZodNumber;
1389
1477
  y: z.ZodNumber;
@@ -1405,6 +1493,8 @@ export declare const DesignerProps: z.ZodObject<{
1405
1493
  }, {
1406
1494
  schemas: Record<string, z.objectInputType<{
1407
1495
  type: z.ZodString;
1496
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1497
+ readOnlyValue: z.ZodOptional<z.ZodString>;
1408
1498
  position: z.ZodObject<{
1409
1499
  x: z.ZodNumber;
1410
1500
  y: z.ZodNumber;
@@ -1442,6 +1532,8 @@ export declare const DesignerProps: z.ZodObject<{
1442
1532
  template: {
1443
1533
  schemas: Record<string, z.objectOutputType<{
1444
1534
  type: z.ZodString;
1535
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1536
+ readOnlyValue: z.ZodOptional<z.ZodString>;
1445
1537
  position: z.ZodObject<{
1446
1538
  x: z.ZodNumber;
1447
1539
  y: z.ZodNumber;
@@ -1476,7 +1568,7 @@ export declare const DesignerProps: z.ZodObject<{
1476
1568
  fallback?: boolean | undefined;
1477
1569
  subset?: boolean | undefined;
1478
1570
  }>>>;
1479
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1571
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1480
1572
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1481
1573
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1482
1574
  }, z.ZodTypeAny, "passthrough"> | undefined;
@@ -1489,6 +1581,8 @@ export declare const DesignerProps: z.ZodObject<{
1489
1581
  template: {
1490
1582
  schemas: Record<string, z.objectInputType<{
1491
1583
  type: z.ZodString;
1584
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1585
+ readOnlyValue: z.ZodOptional<z.ZodString>;
1492
1586
  position: z.ZodObject<{
1493
1587
  x: z.ZodNumber;
1494
1588
  y: z.ZodNumber;
@@ -1523,7 +1617,7 @@ export declare const DesignerProps: z.ZodObject<{
1523
1617
  fallback?: boolean | undefined;
1524
1618
  subset?: boolean | undefined;
1525
1619
  }>>>;
1526
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1620
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1527
1621
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1528
1622
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1529
1623
  }, z.ZodTypeAny, "passthrough"> | undefined;
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  import type { PDFPage, PDFDocument } from '@pdfme/pdf-lib';
3
3
  import type { ThemeConfig, GlobalToken } from 'antd';
4
4
  import type { WidgetProps as _PropPanelWidgetProps, Schema as _PropPanelSchema } from 'form-render';
5
- import { Lang, Dict, Size, Schema, Font, SchemaForUI, BasePdf, Template, GeneratorOptions, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps } from './schema.js';
5
+ import { Lang, Dict, Mode, Size, Schema, Font, SchemaForUI, BasePdf, Template, GeneratorOptions, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps } from './schema.js';
6
6
  export type PropPanelSchema = _PropPanelSchema;
7
7
  export type ChangeSchemas = (objs: {
8
8
  key: string;
@@ -36,7 +36,7 @@ export interface PDFRenderProps<T extends Schema> {
36
36
  *
37
37
  * @template T - Type of the extended Schema object.
38
38
  * @property {T} schema - Extended Schema object for rendering.
39
- * @property {'viewer' | 'form' | 'designer'} mode - String indicating the rendering state. 'designer' is only used when the field is in edit mode in the Designer.
39
+ * @property {Mode} mode - String indicating the rendering state. 'designer' is only used when the field is in edit mode in the Designer.
40
40
  * @property {number} [tabIndex] - Tab index for Form.
41
41
  * @property {string} [placeholder] - Placeholder text for Form.
42
42
  * @property {() => void} [stopEditing] - Stops editing mode, can be used when the mode is 'designer'.
@@ -51,7 +51,7 @@ export interface PDFRenderProps<T extends Schema> {
51
51
  */
52
52
  export type UIRenderProps<T extends Schema> = {
53
53
  schema: T;
54
- mode: 'viewer' | 'form' | 'designer';
54
+ mode: Mode;
55
55
  tabIndex?: number;
56
56
  placeholder?: string;
57
57
  stopEditing?: () => void;
@@ -115,8 +115,8 @@ export interface PropPanel<T extends Schema> {
115
115
  export type Plugin<T extends Schema & {
116
116
  [key: string]: any;
117
117
  }> = {
118
- pdf: (arg: PDFRenderProps<T>) => Promise<void>;
119
- ui: (arg: UIRenderProps<T>) => Promise<void>;
118
+ pdf: (arg: PDFRenderProps<T>) => Promise<void> | void;
119
+ ui: (arg: UIRenderProps<T>) => Promise<void> | void;
120
120
  propPanel: PropPanel<T>;
121
121
  };
122
122
  export type Plugins = {
@@ -124,6 +124,7 @@ export type Plugins = {
124
124
  };
125
125
  export type Lang = z.infer<typeof Lang>;
126
126
  export type Dict = z.infer<typeof Dict>;
127
+ export type Mode = z.infer<typeof Mode>;
127
128
  export type Size = z.infer<typeof Size>;
128
129
  export type Schema = z.infer<typeof Schema>;
129
130
  export type SchemaForUI = z.infer<typeof SchemaForUI>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdfme/common",
3
- "version": "3.1.5",
3
+ "version": "3.2.0-dev.1",
4
4
  "sideEffects": false,
5
5
  "author": "hand-dot",
6
6
  "license": "MIT",
@@ -32,7 +32,7 @@
32
32
  }
33
33
  },
34
34
  "scripts": {
35
- "develop": "tsc -p tsconfig.esm.json -w",
35
+ "dev": "tsc -p tsconfig.esm.json -w",
36
36
  "build": "npm-run-all --parallel build:cjs build:esm",
37
37
  "build:cjs": "tsc -p tsconfig.cjs.json",
38
38
  "build:esm": "tsc -p tsconfig.esm.json",
@@ -43,7 +43,7 @@
43
43
  "prettier": "prettier --write 'src/**/*.ts'"
44
44
  },
45
45
  "dependencies": {
46
- "@pdfme/pdf-lib": "^1.17.3",
46
+ "@pdfme/pdf-lib": "^1.18.3",
47
47
  "antd": "^5.11.2",
48
48
  "buffer": "^6.0.3",
49
49
  "form-render": "^2.2.20",
package/src/index.ts CHANGED
@@ -12,6 +12,7 @@ import type {
12
12
  PropPanelSchema,
13
13
  PropPanelWidgetProps,
14
14
  PDFRenderProps,
15
+ Mode,
15
16
  UIRenderProps,
16
17
  Plugin,
17
18
  Lang,
@@ -96,5 +97,6 @@ export type {
96
97
  PropPanelWidgetProps,
97
98
  PDFRenderProps,
98
99
  UIRenderProps,
100
+ Mode,
99
101
  Plugin,
100
102
  };
package/src/schema.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
 
3
- const langs = ['en', 'ja', 'ar', 'th', 'pl', 'it'] as const;
3
+ const langs = ['en', 'ja', 'ar', 'th', 'pl', 'it', 'de'] as const;
4
4
 
5
5
  export const Lang = z.enum(langs);
6
6
  export const Dict = z.object({
@@ -26,7 +26,11 @@ export const Dict = z.object({
26
26
  errorBulkUpdateFieldName: z.string(),
27
27
  commitBulkUpdateFieldName: z.string(),
28
28
  bulkUpdateFieldName: z.string(),
29
+ hexColorPrompt: z.string(),
29
30
  // -----------------used in schemas-----------------
31
+ 'schemas.color': z.string(),
32
+ 'schemas.borderWidth': z.string(),
33
+ 'schemas.borderColor': z.string(),
30
34
  'schemas.textColor': z.string(),
31
35
  'schemas.bgColor': z.string(),
32
36
  'schemas.horizontal': z.string(),
@@ -50,13 +54,17 @@ export const Dict = z.object({
50
54
  'schemas.text.dynamicFontSize': z.string(),
51
55
 
52
56
  'schemas.barcodes.barColor': z.string(),
57
+ 'schemas.barcodes.includetext': z.string(),
53
58
  });
59
+ export const Mode = z.enum(['viewer', 'form', 'designer']);
54
60
 
55
61
  export const Size = z.object({ height: z.number(), width: z.number() });
56
62
 
57
63
  export const Schema = z
58
64
  .object({
59
65
  type: z.string(),
66
+ readOnly: z.boolean().optional(),
67
+ readOnlyValue: z.string().optional(),
60
68
  position: z.object({ x: z.number(), y: z.number() }),
61
69
  width: z.number(),
62
70
  height: z.number(),
package/src/types.ts CHANGED
@@ -2,8 +2,23 @@ import { z } from 'zod';
2
2
  import type { PDFPage, PDFDocument } from '@pdfme/pdf-lib';
3
3
  import type { ThemeConfig, GlobalToken } from 'antd';
4
4
  import type { WidgetProps as _PropPanelWidgetProps, Schema as _PropPanelSchema } from 'form-render';
5
- // prettier-ignore
6
- import {Lang, Dict, Size, Schema, Font, SchemaForUI, BasePdf, Template, GeneratorOptions, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps} from './schema.js';
5
+ import {
6
+ Lang,
7
+ Dict,
8
+ Mode,
9
+ Size,
10
+ Schema,
11
+ Font,
12
+ SchemaForUI,
13
+ BasePdf,
14
+ Template,
15
+ GeneratorOptions,
16
+ GenerateProps,
17
+ UIOptions,
18
+ UIProps,
19
+ PreviewProps,
20
+ DesignerProps,
21
+ } from './schema.js';
7
22
 
8
23
  export type PropPanelSchema = _PropPanelSchema;
9
24
  export type ChangeSchemas = (objs: { key: string; value: any; schemaId: string }[]) => void;
@@ -37,7 +52,7 @@ export interface PDFRenderProps<T extends Schema> {
37
52
  *
38
53
  * @template T - Type of the extended Schema object.
39
54
  * @property {T} schema - Extended Schema object for rendering.
40
- * @property {'viewer' | 'form' | 'designer'} mode - String indicating the rendering state. 'designer' is only used when the field is in edit mode in the Designer.
55
+ * @property {Mode} mode - String indicating the rendering state. 'designer' is only used when the field is in edit mode in the Designer.
41
56
  * @property {number} [tabIndex] - Tab index for Form.
42
57
  * @property {string} [placeholder] - Placeholder text for Form.
43
58
  * @property {() => void} [stopEditing] - Stops editing mode, can be used when the mode is 'designer'.
@@ -52,7 +67,7 @@ export interface PDFRenderProps<T extends Schema> {
52
67
  */
53
68
  export type UIRenderProps<T extends Schema> = {
54
69
  schema: T;
55
- mode: 'viewer' | 'form' | 'designer';
70
+ mode: Mode;
56
71
  tabIndex?: number;
57
72
  placeholder?: string;
58
73
  stopEditing?: () => void;
@@ -121,8 +136,8 @@ export interface PropPanel<T extends Schema> {
121
136
  * @property {PropPanel} propPanel Object for defining the property panel.
122
137
  */
123
138
  export type Plugin<T extends Schema & { [key: string]: any }> = {
124
- pdf: (arg: PDFRenderProps<T>) => Promise<void>;
125
- ui: (arg: UIRenderProps<T>) => Promise<void>;
139
+ pdf: (arg: PDFRenderProps<T>) => Promise<void> | void;
140
+ ui: (arg: UIRenderProps<T>) => Promise<void> | void;
126
141
  propPanel: PropPanel<T>;
127
142
  };
128
143
 
@@ -130,6 +145,7 @@ export type Plugins = { [key: string]: Plugin<any> | undefined };
130
145
 
131
146
  export type Lang = z.infer<typeof Lang>;
132
147
  export type Dict = z.infer<typeof Dict>;
148
+ export type Mode = z.infer<typeof Mode>;
133
149
  export type Size = z.infer<typeof Size>;
134
150
  export type Schema = z.infer<typeof Schema>;
135
151
  export type SchemaForUI = z.infer<typeof SchemaForUI>;