@pdfme/common 3.1.5-dev.1 → 3.1.5-dev.10

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,6 +27,7 @@ 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-----------------
31
32
  'schemas.textColor': zod_1.z.string(),
32
33
  'schemas.bgColor': zod_1.z.string(),
@@ -49,11 +50,14 @@ exports.Dict = zod_1.z.object({
49
50
  'schemas.text.fit': zod_1.z.string(),
50
51
  'schemas.text.dynamicFontSize': zod_1.z.string(),
51
52
  'schemas.barcodes.barColor': zod_1.z.string(),
53
+ 'schemas.line.color': zod_1.z.string(),
52
54
  });
55
+ exports.Mode = zod_1.z.enum(['viewer', 'form', 'designer']);
53
56
  exports.Size = zod_1.z.object({ height: zod_1.z.number(), width: zod_1.z.number() });
54
57
  exports.Schema = zod_1.z
55
58
  .object({
56
59
  type: zod_1.z.string(),
60
+ readOnly: zod_1.z.boolean().optional(),
57
61
  position: zod_1.z.object({ x: zod_1.z.number(), y: zod_1.z.number() }),
58
62
  width: zod_1.z.number(),
59
63
  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;IAC/C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,KAAK,EAAE,OAAC,C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 {"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,6 +24,7 @@ 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-----------------
28
29
  'schemas.textColor': z.string(),
29
30
  'schemas.bgColor': z.string(),
@@ -46,11 +47,14 @@ export const Dict = z.object({
46
47
  'schemas.text.fit': z.string(),
47
48
  'schemas.text.dynamicFontSize': z.string(),
48
49
  'schemas.barcodes.barColor': z.string(),
50
+ 'schemas.line.color': z.string(),
49
51
  });
52
+ export const Mode = z.enum(['viewer', 'form', 'designer']);
50
53
  export const Size = z.object({ height: z.number(), width: z.number() });
51
54
  export const Schema = z
52
55
  .object({
53
56
  type: z.string(),
57
+ readOnly: z.boolean().optional(),
54
58
  position: z.object({ x: z.number(), y: z.number() }),
55
59
  width: z.number(),
56
60
  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,CAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,WAAW,EAAE,CAAC,CAAC,MAA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C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,WAAW,CAAC,CAAC;AAEpG,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC;IACxC,YAAY,EAAE,iBAAiB;IAC/B,OAAO,EAAE,SAAS,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAExE,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, ZOOM, DEFAULT_FONT_NAME } from './constants.js';
2
- 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,7 @@ 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;
25
26
  'schemas.textColor': z.ZodString;
26
27
  'schemas.bgColor': z.ZodString;
27
28
  'schemas.horizontal': z.ZodString;
@@ -43,6 +44,7 @@ export declare const Dict: z.ZodObject<{
43
44
  'schemas.text.fit': z.ZodString;
44
45
  'schemas.text.dynamicFontSize': z.ZodString;
45
46
  'schemas.barcodes.barColor': z.ZodString;
47
+ 'schemas.line.color': z.ZodString;
46
48
  }, "strip", z.ZodTypeAny, {
47
49
  cancel: string;
48
50
  field: string;
@@ -65,6 +67,7 @@ export declare const Dict: z.ZodObject<{
65
67
  errorBulkUpdateFieldName: string;
66
68
  commitBulkUpdateFieldName: string;
67
69
  bulkUpdateFieldName: string;
70
+ hexColorPrompt: string;
68
71
  'schemas.textColor': string;
69
72
  'schemas.bgColor': string;
70
73
  'schemas.horizontal': string;
@@ -86,6 +89,7 @@ export declare const Dict: z.ZodObject<{
86
89
  'schemas.text.fit': string;
87
90
  'schemas.text.dynamicFontSize': string;
88
91
  'schemas.barcodes.barColor': string;
92
+ 'schemas.line.color': string;
89
93
  }, {
90
94
  cancel: string;
91
95
  field: string;
@@ -108,6 +112,7 @@ export declare const Dict: z.ZodObject<{
108
112
  errorBulkUpdateFieldName: string;
109
113
  commitBulkUpdateFieldName: string;
110
114
  bulkUpdateFieldName: string;
115
+ hexColorPrompt: string;
111
116
  'schemas.textColor': string;
112
117
  'schemas.bgColor': string;
113
118
  'schemas.horizontal': string;
@@ -129,7 +134,9 @@ export declare const Dict: z.ZodObject<{
129
134
  'schemas.text.fit': string;
130
135
  'schemas.text.dynamicFontSize': string;
131
136
  'schemas.barcodes.barColor': string;
137
+ 'schemas.line.color': string;
132
138
  }>;
139
+ export declare const Mode: z.ZodEnum<["viewer", "form", "designer"]>;
133
140
  export declare const Size: z.ZodObject<{
134
141
  height: z.ZodNumber;
135
142
  width: z.ZodNumber;
@@ -142,6 +149,7 @@ export declare const Size: z.ZodObject<{
142
149
  }>;
143
150
  export declare const Schema: z.ZodObject<{
144
151
  type: z.ZodString;
152
+ readOnly: z.ZodOptional<z.ZodBoolean>;
145
153
  position: z.ZodObject<{
146
154
  x: z.ZodNumber;
147
155
  y: z.ZodNumber;
@@ -158,6 +166,7 @@ export declare const Schema: z.ZodObject<{
158
166
  opacity: z.ZodOptional<z.ZodNumber>;
159
167
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
160
168
  type: z.ZodString;
169
+ readOnly: z.ZodOptional<z.ZodBoolean>;
161
170
  position: z.ZodObject<{
162
171
  x: z.ZodNumber;
163
172
  y: z.ZodNumber;
@@ -174,6 +183,7 @@ export declare const Schema: z.ZodObject<{
174
183
  opacity: z.ZodOptional<z.ZodNumber>;
175
184
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
176
185
  type: z.ZodString;
186
+ readOnly: z.ZodOptional<z.ZodBoolean>;
177
187
  position: z.ZodObject<{
178
188
  x: z.ZodNumber;
179
189
  y: z.ZodNumber;
@@ -195,6 +205,7 @@ export declare const SchemaForUI: z.ZodObject<{
195
205
  height: z.ZodNumber;
196
206
  rotate: z.ZodOptional<z.ZodNumber>;
197
207
  type: z.ZodString;
208
+ readOnly: z.ZodOptional<z.ZodBoolean>;
198
209
  position: z.ZodObject<{
199
210
  x: z.ZodNumber;
200
211
  y: z.ZodNumber;
@@ -221,6 +232,7 @@ export declare const SchemaForUI: z.ZodObject<{
221
232
  key: string;
222
233
  opacity?: number | undefined;
223
234
  rotate?: number | undefined;
235
+ readOnly?: boolean | undefined;
224
236
  }, {
225
237
  width: number;
226
238
  height: number;
@@ -234,6 +246,7 @@ export declare const SchemaForUI: z.ZodObject<{
234
246
  key: string;
235
247
  opacity?: number | undefined;
236
248
  rotate?: number | undefined;
249
+ readOnly?: boolean | undefined;
237
250
  }>;
238
251
  export declare const Font: z.ZodRecord<z.ZodString, z.ZodObject<{
239
252
  data: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>;
@@ -252,6 +265,7 @@ export declare const BasePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.
252
265
  export declare const Template: z.ZodObject<{
253
266
  schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
254
267
  type: z.ZodString;
268
+ readOnly: z.ZodOptional<z.ZodBoolean>;
255
269
  position: z.ZodObject<{
256
270
  x: z.ZodNumber;
257
271
  y: z.ZodNumber;
@@ -268,6 +282,7 @@ export declare const Template: z.ZodObject<{
268
282
  opacity: z.ZodOptional<z.ZodNumber>;
269
283
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
270
284
  type: z.ZodString;
285
+ readOnly: z.ZodOptional<z.ZodBoolean>;
271
286
  position: z.ZodObject<{
272
287
  x: z.ZodNumber;
273
288
  y: z.ZodNumber;
@@ -284,6 +299,7 @@ export declare const Template: z.ZodObject<{
284
299
  opacity: z.ZodOptional<z.ZodNumber>;
285
300
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
286
301
  type: z.ZodString;
302
+ readOnly: z.ZodOptional<z.ZodBoolean>;
287
303
  position: z.ZodObject<{
288
304
  x: z.ZodNumber;
289
305
  y: z.ZodNumber;
@@ -305,6 +321,7 @@ export declare const Template: z.ZodObject<{
305
321
  }, "strip", z.ZodTypeAny, {
306
322
  schemas: Record<string, z.objectOutputType<{
307
323
  type: z.ZodString;
324
+ readOnly: z.ZodOptional<z.ZodBoolean>;
308
325
  position: z.ZodObject<{
309
326
  x: z.ZodNumber;
310
327
  y: z.ZodNumber;
@@ -326,6 +343,7 @@ export declare const Template: z.ZodObject<{
326
343
  }, {
327
344
  schemas: Record<string, z.objectInputType<{
328
345
  type: z.ZodString;
346
+ readOnly: z.ZodOptional<z.ZodBoolean>;
329
347
  position: z.ZodObject<{
330
348
  x: z.ZodNumber;
331
349
  y: z.ZodNumber;
@@ -420,6 +438,7 @@ export declare const GenerateProps: z.ZodObject<{
420
438
  template: z.ZodObject<{
421
439
  schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
422
440
  type: z.ZodString;
441
+ readOnly: z.ZodOptional<z.ZodBoolean>;
423
442
  position: z.ZodObject<{
424
443
  x: z.ZodNumber;
425
444
  y: z.ZodNumber;
@@ -436,6 +455,7 @@ export declare const GenerateProps: z.ZodObject<{
436
455
  opacity: z.ZodOptional<z.ZodNumber>;
437
456
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
438
457
  type: z.ZodString;
458
+ readOnly: z.ZodOptional<z.ZodBoolean>;
439
459
  position: z.ZodObject<{
440
460
  x: z.ZodNumber;
441
461
  y: z.ZodNumber;
@@ -452,6 +472,7 @@ export declare const GenerateProps: z.ZodObject<{
452
472
  opacity: z.ZodOptional<z.ZodNumber>;
453
473
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
454
474
  type: z.ZodString;
475
+ readOnly: z.ZodOptional<z.ZodBoolean>;
455
476
  position: z.ZodObject<{
456
477
  x: z.ZodNumber;
457
478
  y: z.ZodNumber;
@@ -473,6 +494,7 @@ export declare const GenerateProps: z.ZodObject<{
473
494
  }, "strip", z.ZodTypeAny, {
474
495
  schemas: Record<string, z.objectOutputType<{
475
496
  type: z.ZodString;
497
+ readOnly: z.ZodOptional<z.ZodBoolean>;
476
498
  position: z.ZodObject<{
477
499
  x: z.ZodNumber;
478
500
  y: z.ZodNumber;
@@ -494,6 +516,7 @@ export declare const GenerateProps: z.ZodObject<{
494
516
  }, {
495
517
  schemas: Record<string, z.objectInputType<{
496
518
  type: z.ZodString;
519
+ readOnly: z.ZodOptional<z.ZodBoolean>;
497
520
  position: z.ZodObject<{
498
521
  x: z.ZodNumber;
499
522
  y: z.ZodNumber;
@@ -601,6 +624,7 @@ export declare const GenerateProps: z.ZodObject<{
601
624
  template: {
602
625
  schemas: Record<string, z.objectOutputType<{
603
626
  type: z.ZodString;
627
+ readOnly: z.ZodOptional<z.ZodBoolean>;
604
628
  position: z.ZodObject<{
605
629
  x: z.ZodNumber;
606
630
  y: z.ZodNumber;
@@ -654,6 +678,7 @@ export declare const GenerateProps: z.ZodObject<{
654
678
  template: {
655
679
  schemas: Record<string, z.objectInputType<{
656
680
  type: z.ZodString;
681
+ readOnly: z.ZodOptional<z.ZodBoolean>;
657
682
  position: z.ZodObject<{
658
683
  x: z.ZodNumber;
659
684
  y: z.ZodNumber;
@@ -718,7 +743,7 @@ export declare const UIOptions: z.ZodObject<{
718
743
  fallback?: boolean | undefined;
719
744
  subset?: boolean | undefined;
720
745
  }>>>;
721
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
746
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
722
747
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
723
748
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
724
749
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -735,7 +760,7 @@ export declare const UIOptions: z.ZodObject<{
735
760
  fallback?: boolean | undefined;
736
761
  subset?: boolean | undefined;
737
762
  }>>>;
738
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
763
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
739
764
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
740
765
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
741
766
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
@@ -752,7 +777,7 @@ export declare const UIOptions: z.ZodObject<{
752
777
  fallback?: boolean | undefined;
753
778
  subset?: boolean | undefined;
754
779
  }>>>;
755
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
780
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
756
781
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
757
782
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
758
783
  }, z.ZodTypeAny, "passthrough">>;
@@ -760,6 +785,7 @@ export declare const UIProps: z.ZodObject<{
760
785
  template: z.ZodObject<{
761
786
  schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
762
787
  type: z.ZodString;
788
+ readOnly: z.ZodOptional<z.ZodBoolean>;
763
789
  position: z.ZodObject<{
764
790
  x: z.ZodNumber;
765
791
  y: z.ZodNumber;
@@ -776,6 +802,7 @@ export declare const UIProps: z.ZodObject<{
776
802
  opacity: z.ZodOptional<z.ZodNumber>;
777
803
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
778
804
  type: z.ZodString;
805
+ readOnly: z.ZodOptional<z.ZodBoolean>;
779
806
  position: z.ZodObject<{
780
807
  x: z.ZodNumber;
781
808
  y: z.ZodNumber;
@@ -792,6 +819,7 @@ export declare const UIProps: z.ZodObject<{
792
819
  opacity: z.ZodOptional<z.ZodNumber>;
793
820
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
794
821
  type: z.ZodString;
822
+ readOnly: z.ZodOptional<z.ZodBoolean>;
795
823
  position: z.ZodObject<{
796
824
  x: z.ZodNumber;
797
825
  y: z.ZodNumber;
@@ -813,6 +841,7 @@ export declare const UIProps: z.ZodObject<{
813
841
  }, "strip", z.ZodTypeAny, {
814
842
  schemas: Record<string, z.objectOutputType<{
815
843
  type: z.ZodString;
844
+ readOnly: z.ZodOptional<z.ZodBoolean>;
816
845
  position: z.ZodObject<{
817
846
  x: z.ZodNumber;
818
847
  y: z.ZodNumber;
@@ -834,6 +863,7 @@ export declare const UIProps: z.ZodObject<{
834
863
  }, {
835
864
  schemas: Record<string, z.objectInputType<{
836
865
  type: z.ZodString;
866
+ readOnly: z.ZodOptional<z.ZodBoolean>;
837
867
  position: z.ZodObject<{
838
868
  x: z.ZodNumber;
839
869
  y: z.ZodNumber;
@@ -881,7 +911,7 @@ export declare const UIProps: z.ZodObject<{
881
911
  fallback?: boolean | undefined;
882
912
  subset?: boolean | undefined;
883
913
  }>>>;
884
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
914
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
885
915
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
886
916
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
887
917
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -898,7 +928,7 @@ export declare const UIProps: z.ZodObject<{
898
928
  fallback?: boolean | undefined;
899
929
  subset?: boolean | undefined;
900
930
  }>>>;
901
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
931
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
902
932
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
903
933
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
904
934
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
@@ -915,7 +945,7 @@ export declare const UIProps: z.ZodObject<{
915
945
  fallback?: boolean | undefined;
916
946
  subset?: boolean | undefined;
917
947
  }>>>;
918
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
948
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
919
949
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
920
950
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
921
951
  }, z.ZodTypeAny, "passthrough">>>;
@@ -923,6 +953,7 @@ export declare const UIProps: z.ZodObject<{
923
953
  template: {
924
954
  schemas: Record<string, z.objectOutputType<{
925
955
  type: z.ZodString;
956
+ readOnly: z.ZodOptional<z.ZodBoolean>;
926
957
  position: z.ZodObject<{
927
958
  x: z.ZodNumber;
928
959
  y: z.ZodNumber;
@@ -962,7 +993,7 @@ export declare const UIProps: z.ZodObject<{
962
993
  fallback?: boolean | undefined;
963
994
  subset?: boolean | undefined;
964
995
  }>>>;
965
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
996
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
966
997
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
967
998
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
968
999
  }, z.ZodTypeAny, "passthrough"> | undefined;
@@ -970,6 +1001,7 @@ export declare const UIProps: z.ZodObject<{
970
1001
  template: {
971
1002
  schemas: Record<string, z.objectInputType<{
972
1003
  type: z.ZodString;
1004
+ readOnly: z.ZodOptional<z.ZodBoolean>;
973
1005
  position: z.ZodObject<{
974
1006
  x: z.ZodNumber;
975
1007
  y: z.ZodNumber;
@@ -1009,7 +1041,7 @@ export declare const UIProps: z.ZodObject<{
1009
1041
  fallback?: boolean | undefined;
1010
1042
  subset?: boolean | undefined;
1011
1043
  }>>>;
1012
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1044
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1013
1045
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1014
1046
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1015
1047
  }, z.ZodTypeAny, "passthrough"> | undefined;
@@ -1029,7 +1061,7 @@ export declare const PreviewProps: z.ZodObject<{
1029
1061
  fallback?: boolean | undefined;
1030
1062
  subset?: boolean | undefined;
1031
1063
  }>>>;
1032
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1064
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1033
1065
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1034
1066
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1035
1067
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -1046,7 +1078,7 @@ export declare const PreviewProps: z.ZodObject<{
1046
1078
  fallback?: boolean | undefined;
1047
1079
  subset?: boolean | undefined;
1048
1080
  }>>>;
1049
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1081
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1050
1082
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1051
1083
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1052
1084
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
@@ -1063,13 +1095,14 @@ export declare const PreviewProps: z.ZodObject<{
1063
1095
  fallback?: boolean | undefined;
1064
1096
  subset?: boolean | undefined;
1065
1097
  }>>>;
1066
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1098
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1067
1099
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1068
1100
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1069
1101
  }, z.ZodTypeAny, "passthrough">>>;
1070
1102
  template: z.ZodObject<{
1071
1103
  schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
1072
1104
  type: z.ZodString;
1105
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1073
1106
  position: z.ZodObject<{
1074
1107
  x: z.ZodNumber;
1075
1108
  y: z.ZodNumber;
@@ -1086,6 +1119,7 @@ export declare const PreviewProps: z.ZodObject<{
1086
1119
  opacity: z.ZodOptional<z.ZodNumber>;
1087
1120
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1088
1121
  type: z.ZodString;
1122
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1089
1123
  position: z.ZodObject<{
1090
1124
  x: z.ZodNumber;
1091
1125
  y: z.ZodNumber;
@@ -1102,6 +1136,7 @@ export declare const PreviewProps: z.ZodObject<{
1102
1136
  opacity: z.ZodOptional<z.ZodNumber>;
1103
1137
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1104
1138
  type: z.ZodString;
1139
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1105
1140
  position: z.ZodObject<{
1106
1141
  x: z.ZodNumber;
1107
1142
  y: z.ZodNumber;
@@ -1123,6 +1158,7 @@ export declare const PreviewProps: z.ZodObject<{
1123
1158
  }, "strip", z.ZodTypeAny, {
1124
1159
  schemas: Record<string, z.objectOutputType<{
1125
1160
  type: z.ZodString;
1161
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1126
1162
  position: z.ZodObject<{
1127
1163
  x: z.ZodNumber;
1128
1164
  y: z.ZodNumber;
@@ -1144,6 +1180,7 @@ export declare const PreviewProps: z.ZodObject<{
1144
1180
  }, {
1145
1181
  schemas: Record<string, z.objectInputType<{
1146
1182
  type: z.ZodString;
1183
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1147
1184
  position: z.ZodObject<{
1148
1185
  x: z.ZodNumber;
1149
1186
  y: z.ZodNumber;
@@ -1182,6 +1219,7 @@ export declare const PreviewProps: z.ZodObject<{
1182
1219
  template: {
1183
1220
  schemas: Record<string, z.objectOutputType<{
1184
1221
  type: z.ZodString;
1222
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1185
1223
  position: z.ZodObject<{
1186
1224
  x: z.ZodNumber;
1187
1225
  y: z.ZodNumber;
@@ -1217,7 +1255,7 @@ export declare const PreviewProps: z.ZodObject<{
1217
1255
  fallback?: boolean | undefined;
1218
1256
  subset?: boolean | undefined;
1219
1257
  }>>>;
1220
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1258
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1221
1259
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1222
1260
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1223
1261
  }, z.ZodTypeAny, "passthrough"> | undefined;
@@ -1230,6 +1268,7 @@ export declare const PreviewProps: z.ZodObject<{
1230
1268
  template: {
1231
1269
  schemas: Record<string, z.objectInputType<{
1232
1270
  type: z.ZodString;
1271
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1233
1272
  position: z.ZodObject<{
1234
1273
  x: z.ZodNumber;
1235
1274
  y: z.ZodNumber;
@@ -1265,7 +1304,7 @@ export declare const PreviewProps: z.ZodObject<{
1265
1304
  fallback?: boolean | undefined;
1266
1305
  subset?: boolean | undefined;
1267
1306
  }>>>;
1268
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1307
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1269
1308
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1270
1309
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1271
1310
  }, z.ZodTypeAny, "passthrough"> | undefined;
@@ -1290,7 +1329,7 @@ export declare const DesignerProps: z.ZodObject<{
1290
1329
  fallback?: boolean | undefined;
1291
1330
  subset?: boolean | undefined;
1292
1331
  }>>>;
1293
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1332
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1294
1333
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1295
1334
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1296
1335
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -1307,7 +1346,7 @@ export declare const DesignerProps: z.ZodObject<{
1307
1346
  fallback?: boolean | undefined;
1308
1347
  subset?: boolean | undefined;
1309
1348
  }>>>;
1310
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1349
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1311
1350
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1312
1351
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1313
1352
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
@@ -1324,13 +1363,14 @@ export declare const DesignerProps: z.ZodObject<{
1324
1363
  fallback?: boolean | undefined;
1325
1364
  subset?: boolean | undefined;
1326
1365
  }>>>;
1327
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1366
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1328
1367
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1329
1368
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1330
1369
  }, z.ZodTypeAny, "passthrough">>>;
1331
1370
  template: z.ZodObject<{
1332
1371
  schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
1333
1372
  type: z.ZodString;
1373
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1334
1374
  position: z.ZodObject<{
1335
1375
  x: z.ZodNumber;
1336
1376
  y: z.ZodNumber;
@@ -1347,6 +1387,7 @@ export declare const DesignerProps: z.ZodObject<{
1347
1387
  opacity: z.ZodOptional<z.ZodNumber>;
1348
1388
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1349
1389
  type: z.ZodString;
1390
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1350
1391
  position: z.ZodObject<{
1351
1392
  x: z.ZodNumber;
1352
1393
  y: z.ZodNumber;
@@ -1363,6 +1404,7 @@ export declare const DesignerProps: z.ZodObject<{
1363
1404
  opacity: z.ZodOptional<z.ZodNumber>;
1364
1405
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1365
1406
  type: z.ZodString;
1407
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1366
1408
  position: z.ZodObject<{
1367
1409
  x: z.ZodNumber;
1368
1410
  y: z.ZodNumber;
@@ -1384,6 +1426,7 @@ export declare const DesignerProps: z.ZodObject<{
1384
1426
  }, "strip", z.ZodTypeAny, {
1385
1427
  schemas: Record<string, z.objectOutputType<{
1386
1428
  type: z.ZodString;
1429
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1387
1430
  position: z.ZodObject<{
1388
1431
  x: z.ZodNumber;
1389
1432
  y: z.ZodNumber;
@@ -1405,6 +1448,7 @@ export declare const DesignerProps: z.ZodObject<{
1405
1448
  }, {
1406
1449
  schemas: Record<string, z.objectInputType<{
1407
1450
  type: z.ZodString;
1451
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1408
1452
  position: z.ZodObject<{
1409
1453
  x: z.ZodNumber;
1410
1454
  y: z.ZodNumber;
@@ -1442,6 +1486,7 @@ export declare const DesignerProps: z.ZodObject<{
1442
1486
  template: {
1443
1487
  schemas: Record<string, z.objectOutputType<{
1444
1488
  type: z.ZodString;
1489
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1445
1490
  position: z.ZodObject<{
1446
1491
  x: z.ZodNumber;
1447
1492
  y: z.ZodNumber;
@@ -1476,7 +1521,7 @@ export declare const DesignerProps: z.ZodObject<{
1476
1521
  fallback?: boolean | undefined;
1477
1522
  subset?: boolean | undefined;
1478
1523
  }>>>;
1479
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1524
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1480
1525
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1481
1526
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1482
1527
  }, z.ZodTypeAny, "passthrough"> | undefined;
@@ -1489,6 +1534,7 @@ export declare const DesignerProps: z.ZodObject<{
1489
1534
  template: {
1490
1535
  schemas: Record<string, z.objectInputType<{
1491
1536
  type: z.ZodString;
1537
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1492
1538
  position: z.ZodObject<{
1493
1539
  x: z.ZodNumber;
1494
1540
  y: z.ZodNumber;
@@ -1523,7 +1569,7 @@ export declare const DesignerProps: z.ZodObject<{
1523
1569
  fallback?: boolean | undefined;
1524
1570
  subset?: boolean | undefined;
1525
1571
  }>>>;
1526
- lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it"]>>;
1572
+ lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de"]>>;
1527
1573
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1528
1574
  theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1529
1575
  }, 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-dev.1",
3
+ "version": "3.1.5-dev.10",
4
4
  "sideEffects": false,
5
5
  "author": "hand-dot",
6
6
  "license": "MIT",
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,6 +26,7 @@ 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-----------------
30
31
  'schemas.textColor': z.string(),
31
32
  'schemas.bgColor': z.string(),
@@ -50,13 +51,17 @@ export const Dict = z.object({
50
51
  'schemas.text.dynamicFontSize': z.string(),
51
52
 
52
53
  'schemas.barcodes.barColor': z.string(),
54
+
55
+ 'schemas.line.color': z.string(),
53
56
  });
57
+ export const Mode = z.enum(['viewer', 'form', 'designer']);
54
58
 
55
59
  export const Size = z.object({ height: z.number(), width: z.number() });
56
60
 
57
61
  export const Schema = z
58
62
  .object({
59
63
  type: z.string(),
64
+ readOnly: z.boolean().optional(),
60
65
  position: z.object({ x: z.number(), y: z.number() }),
61
66
  width: z.number(),
62
67
  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>;