@pdfme/common 3.1.5-dev.6 → 3.1.5-dev.8

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.
@@ -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,6 +1,6 @@
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
5
  const langs = ['en', 'ja', 'ar', 'th', 'pl', 'it', 'de'];
6
6
  exports.Lang = zod_1.z.enum(langs);
@@ -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,EAAE,IAAI,CAAU,CAAC;AAErD,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,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,SAAS,EAAE,OAAC,CAA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AAC,EAAE,MAAM,EAAE,cAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAE3D,QAAA,aAAa,GAAG,eAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC"}
@@ -1 +1 @@
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;AAyBxB,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
+ {"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"}
@@ -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,EAAE,IAAI,CAAU,CAAC;AAElE,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAClC,MAAM,CAAC,MAAM,IAAI,GAAG,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eSchemas, 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, };
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -1070,6 +1102,7 @@ export declare const PreviewProps: z.ZodObject<{
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;
@@ -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;
@@ -1331,6 +1370,7 @@ export declare const DesignerProps: z.ZodObject<{
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;
@@ -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;
@@ -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.6",
3
+ "version": "3.1.5-dev.8",
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
@@ -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>;