@pdfme/common 4.1.0 → 4.1.1-dev.2
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/dist/cjs/src/index.js.map +1 -1
- package/dist/cjs/src/schema.js +5 -1
- package/dist/cjs/src/schema.js.map +1 -1
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/schema.js +5 -1
- package/dist/esm/src/schema.js.map +1 -1
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/schema.d.ts +25 -16
- package/dist/types/src/types.d.ts +5 -2
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/schema.ts +8 -1
- package/src/types.ts +8 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAQwB;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAQwB;AAsDtB,8FA7DA,4BAAa,OA6DA;AACb,+FA7DA,6BAAc,OA6DA;AACd,+FA7DA,6BAAc,OA6DA;AACd,+FA7DA,6BAAc,OA6DA;AACd,0FA7DA,wBAAS,OA6DA;AACT,qFA7DA,mBAAI,OA6DA;AACJ,kGA7DA,gCAAiB,OA6DA;AA9BnB,2CAqBqB;AAUnB,oGA9BA,+BAAmB,OA8BA;AACnB,+FA9BA,0BAAc,OA8BA;AACd,8FA9BA,yBAAa,OA8BA;AACb,gGA9BA,2BAAe,OA8BA;AASf,0FAtCA,qBAAS,OAsCA;AACT,4FAtCA,uBAAW,OAsCA;AACX,+FAtCA,0BAAc,OAsCA;AACd,8FAtCA,yBAAa,OAsCA;AACb,6FAtCA,wBAAY,OAsCA;AACZ,kGAtCA,6BAAiB,OAsCA;AACjB,mGAtCA,8BAAkB,OAsCA;AAClB,mGAtCA,8BAAkB,OAsCA;AAflB,sFAtBA,iBAAK,OAsBA;AACL,sFAtBA,iBAAK,OAsBA;AACL,sFAtBA,iBAAK,OAsBA;AACL,sFAtBA,iBAAK,OAsBA;AACL,2FAtBA,sBAAU,OAsBA;AACV,qGAtBA,gCAAoB,OAsBA;AACpB,2FAtBA,sBAAU,OAsBA;AACV,mGAtBA,8BAAkB,OAsBA"}
|
package/dist/cjs/src/schema.js
CHANGED
@@ -57,6 +57,9 @@ exports.Dict = zod_1.z.object({
|
|
57
57
|
'schemas.text.fit': zod_1.z.string(),
|
58
58
|
'schemas.text.dynamicFontSize': zod_1.z.string(),
|
59
59
|
'schemas.text.format': zod_1.z.string(),
|
60
|
+
'schemas.mvt.typingInstructions': zod_1.z.string(),
|
61
|
+
'schemas.mvt.sampleField': zod_1.z.string(),
|
62
|
+
'schemas.mvt.variablesSampleData': zod_1.z.string(),
|
60
63
|
'schemas.barcodes.barColor': zod_1.z.string(),
|
61
64
|
'schemas.barcodes.includetext': zod_1.z.string(),
|
62
65
|
'schemas.table.alternateBackgroundColor': zod_1.z.string(),
|
@@ -93,7 +96,8 @@ exports.BlankPdf = zod_1.z.object({
|
|
93
96
|
height: zod_1.z.number(),
|
94
97
|
padding: zod_1.z.tuple([zod_1.z.number(), zod_1.z.number(), zod_1.z.number(), zod_1.z.number()]),
|
95
98
|
});
|
96
|
-
|
99
|
+
const CustomPdf = zod_1.z.union([zod_1.z.string(), ArrayBufferSchema, Uint8ArraySchema]);
|
100
|
+
exports.BasePdf = zod_1.z.union([CustomPdf, exports.BlankPdf]);
|
97
101
|
exports.Template = zod_1.z
|
98
102
|
.object({
|
99
103
|
schemas: zod_1.z.array(zod_1.z.record(exports.Schema)),
|
@@ -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,EAAE,IAAI,EAAE,IAAI,EA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../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,EACT,IAAI,EACJ,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,EACT,IAAI,EACJ,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AA8BxB,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,KAAK,EACL,UAAU,EACV,oBAAoB,EACpB,UAAU,EACV,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,aAAa,EACb,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,KAAK,EACL,UAAU,EACV,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GACnB,CAAC"}
|
package/dist/esm/src/schema.js
CHANGED
@@ -54,6 +54,9 @@ export const Dict = z.object({
|
|
54
54
|
'schemas.text.fit': z.string(),
|
55
55
|
'schemas.text.dynamicFontSize': z.string(),
|
56
56
|
'schemas.text.format': z.string(),
|
57
|
+
'schemas.mvt.typingInstructions': z.string(),
|
58
|
+
'schemas.mvt.sampleField': z.string(),
|
59
|
+
'schemas.mvt.variablesSampleData': z.string(),
|
57
60
|
'schemas.barcodes.barColor': z.string(),
|
58
61
|
'schemas.barcodes.includetext': z.string(),
|
59
62
|
'schemas.table.alternateBackgroundColor': z.string(),
|
@@ -90,7 +93,8 @@ export const BlankPdf = z.object({
|
|
90
93
|
height: z.number(),
|
91
94
|
padding: z.tuple([z.number(), z.number(), z.number(), z.number()]),
|
92
95
|
});
|
93
|
-
|
96
|
+
const CustomPdf = z.union([z.string(), ArrayBufferSchema, Uint8ArraySchema]);
|
97
|
+
export const BasePdf = z.union([CustomPdf, BlankPdf]);
|
94
98
|
export const Template = z
|
95
99
|
.object({
|
96
100
|
schemas: z.array(z.record(Schema)),
|
@@ -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,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AAE1F,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,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,EAAE;CACrC,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,kDAAkD;AAElD,MAAM,CAAC,MAAM,SAAS,GAAG,aAAa,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE;IACrB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACnD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CACpD,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAA6B,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,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 { PDFME_VERSION, 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, Mode, UIRenderProps, Plugin, Lang, Dict, Size, Schema, SchemaForUI, Font, ColorType, BasePdf, BlankPdf, Template, CommonOptions, GeneratorOptions, Plugins, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps } from './types.js';
|
2
|
+
import type { ChangeSchemaItem, ChangeSchemas, PropPanel, PropPanelSchema, PropPanelWidgetProps, PDFRenderProps, Mode, UIRenderProps, Plugin, Lang, Dict, Size, Schema, SchemaForUI, Font, ColorType, BasePdf, BlankPdf, Template, CommonOptions, 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, px2mm, isHexValid, getInputFromTemplate, isBlankPdf, getDynamicTemplate } from './helper.js';
|
4
4
|
export { PDFME_VERSION, 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, px2mm, isHexValid, getInputFromTemplate, isBlankPdf, getDynamicTemplate, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, };
|
5
|
-
export type { Lang, Dict, Size, Schema, SchemaForUI, Font, ColorType, BasePdf, BlankPdf, Template, CommonOptions, GeneratorOptions, Plugins, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps, ChangeSchemas, PropPanel, PropPanelSchema, PropPanelWidgetProps, PDFRenderProps, UIRenderProps, Mode, Plugin, };
|
5
|
+
export type { Lang, Dict, Size, Schema, SchemaForUI, Font, ColorType, BasePdf, BlankPdf, Template, CommonOptions, GeneratorOptions, Plugins, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps, ChangeSchemaItem, ChangeSchemas, PropPanel, PropPanelSchema, PropPanelWidgetProps, PDFRenderProps, UIRenderProps, Mode, Plugin, };
|
@@ -51,6 +51,9 @@ export declare const Dict: z.ZodObject<{
|
|
51
51
|
'schemas.text.fit': z.ZodString;
|
52
52
|
'schemas.text.dynamicFontSize': z.ZodString;
|
53
53
|
'schemas.text.format': z.ZodString;
|
54
|
+
'schemas.mvt.typingInstructions': z.ZodString;
|
55
|
+
'schemas.mvt.sampleField': z.ZodString;
|
56
|
+
'schemas.mvt.variablesSampleData': z.ZodString;
|
54
57
|
'schemas.barcodes.barColor': z.ZodString;
|
55
58
|
'schemas.barcodes.includetext': z.ZodString;
|
56
59
|
'schemas.table.alternateBackgroundColor': z.ZodString;
|
@@ -109,6 +112,9 @@ export declare const Dict: z.ZodObject<{
|
|
109
112
|
'schemas.text.fit': string;
|
110
113
|
'schemas.text.dynamicFontSize': string;
|
111
114
|
'schemas.text.format': string;
|
115
|
+
'schemas.mvt.typingInstructions': string;
|
116
|
+
'schemas.mvt.sampleField': string;
|
117
|
+
'schemas.mvt.variablesSampleData': string;
|
112
118
|
'schemas.barcodes.barColor': string;
|
113
119
|
'schemas.barcodes.includetext': string;
|
114
120
|
'schemas.table.alternateBackgroundColor': string;
|
@@ -167,6 +173,9 @@ export declare const Dict: z.ZodObject<{
|
|
167
173
|
'schemas.text.fit': string;
|
168
174
|
'schemas.text.dynamicFontSize': string;
|
169
175
|
'schemas.text.format': string;
|
176
|
+
'schemas.mvt.typingInstructions': string;
|
177
|
+
'schemas.mvt.sampleField': string;
|
178
|
+
'schemas.mvt.variablesSampleData': string;
|
170
179
|
'schemas.barcodes.barColor': string;
|
171
180
|
'schemas.barcodes.includetext': string;
|
172
181
|
'schemas.table.alternateBackgroundColor': string;
|
@@ -310,7 +319,7 @@ export declare const BlankPdf: z.ZodObject<{
|
|
310
319
|
height: number;
|
311
320
|
padding: [number, number, number, number];
|
312
321
|
}>;
|
313
|
-
export declare const BasePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>, z.ZodObject<{
|
322
|
+
export declare const BasePdf: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>, z.ZodObject<{
|
314
323
|
width: z.ZodNumber;
|
315
324
|
height: z.ZodNumber;
|
316
325
|
padding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
@@ -382,7 +391,7 @@ export declare const Template: z.ZodObject<{
|
|
382
391
|
opacity: z.ZodOptional<z.ZodNumber>;
|
383
392
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
384
393
|
}, z.ZodTypeAny, "passthrough">>>, "many">;
|
385
|
-
basePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>, z.ZodObject<{
|
394
|
+
basePdf: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>, z.ZodObject<{
|
386
395
|
width: z.ZodNumber;
|
387
396
|
height: z.ZodNumber;
|
388
397
|
padding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
@@ -455,7 +464,7 @@ export declare const Template: z.ZodObject<{
|
|
455
464
|
opacity: z.ZodOptional<z.ZodNumber>;
|
456
465
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
457
466
|
}, z.ZodTypeAny, "passthrough">>>, "many">;
|
458
|
-
basePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>, z.ZodObject<{
|
467
|
+
basePdf: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>, z.ZodObject<{
|
459
468
|
width: z.ZodNumber;
|
460
469
|
height: z.ZodNumber;
|
461
470
|
padding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
@@ -528,7 +537,7 @@ export declare const Template: z.ZodObject<{
|
|
528
537
|
opacity: z.ZodOptional<z.ZodNumber>;
|
529
538
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
530
539
|
}, z.ZodTypeAny, "passthrough">>>, "many">;
|
531
|
-
basePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>, z.ZodObject<{
|
540
|
+
basePdf: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>, z.ZodObject<{
|
532
541
|
width: z.ZodNumber;
|
533
542
|
height: z.ZodNumber;
|
534
543
|
padding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
@@ -733,7 +742,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
733
742
|
opacity: z.ZodOptional<z.ZodNumber>;
|
734
743
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
735
744
|
}, z.ZodTypeAny, "passthrough">>>, "many">;
|
736
|
-
basePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>, z.ZodObject<{
|
745
|
+
basePdf: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>, z.ZodObject<{
|
737
746
|
width: z.ZodNumber;
|
738
747
|
height: z.ZodNumber;
|
739
748
|
padding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
@@ -806,7 +815,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
806
815
|
opacity: z.ZodOptional<z.ZodNumber>;
|
807
816
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
808
817
|
}, z.ZodTypeAny, "passthrough">>>, "many">;
|
809
|
-
basePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>, z.ZodObject<{
|
818
|
+
basePdf: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>, z.ZodObject<{
|
810
819
|
width: z.ZodNumber;
|
811
820
|
height: z.ZodNumber;
|
812
821
|
padding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
@@ -879,7 +888,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
879
888
|
opacity: z.ZodOptional<z.ZodNumber>;
|
880
889
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
881
890
|
}, z.ZodTypeAny, "passthrough">>>, "many">;
|
882
|
-
basePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>, z.ZodObject<{
|
891
|
+
basePdf: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>, z.ZodObject<{
|
883
892
|
width: z.ZodNumber;
|
884
893
|
height: z.ZodNumber;
|
885
894
|
padding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
@@ -1226,7 +1235,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1226
1235
|
opacity: z.ZodOptional<z.ZodNumber>;
|
1227
1236
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1228
1237
|
}, z.ZodTypeAny, "passthrough">>>, "many">;
|
1229
|
-
basePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>, z.ZodObject<{
|
1238
|
+
basePdf: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>, z.ZodObject<{
|
1230
1239
|
width: z.ZodNumber;
|
1231
1240
|
height: z.ZodNumber;
|
1232
1241
|
padding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
@@ -1299,7 +1308,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1299
1308
|
opacity: z.ZodOptional<z.ZodNumber>;
|
1300
1309
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1301
1310
|
}, z.ZodTypeAny, "passthrough">>>, "many">;
|
1302
|
-
basePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>, z.ZodObject<{
|
1311
|
+
basePdf: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>, z.ZodObject<{
|
1303
1312
|
width: z.ZodNumber;
|
1304
1313
|
height: z.ZodNumber;
|
1305
1314
|
padding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
@@ -1372,7 +1381,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1372
1381
|
opacity: z.ZodOptional<z.ZodNumber>;
|
1373
1382
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1374
1383
|
}, z.ZodTypeAny, "passthrough">>>, "many">;
|
1375
|
-
basePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>, z.ZodObject<{
|
1384
|
+
basePdf: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>, z.ZodObject<{
|
1376
1385
|
width: z.ZodNumber;
|
1377
1386
|
height: z.ZodNumber;
|
1378
1387
|
padding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
@@ -1684,7 +1693,7 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1684
1693
|
opacity: z.ZodOptional<z.ZodNumber>;
|
1685
1694
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1686
1695
|
}, z.ZodTypeAny, "passthrough">>>, "many">;
|
1687
|
-
basePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>, z.ZodObject<{
|
1696
|
+
basePdf: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>, z.ZodObject<{
|
1688
1697
|
width: z.ZodNumber;
|
1689
1698
|
height: z.ZodNumber;
|
1690
1699
|
padding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
@@ -1757,7 +1766,7 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1757
1766
|
opacity: z.ZodOptional<z.ZodNumber>;
|
1758
1767
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1759
1768
|
}, z.ZodTypeAny, "passthrough">>>, "many">;
|
1760
|
-
basePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>, z.ZodObject<{
|
1769
|
+
basePdf: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>, z.ZodObject<{
|
1761
1770
|
width: z.ZodNumber;
|
1762
1771
|
height: z.ZodNumber;
|
1763
1772
|
padding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
@@ -1830,7 +1839,7 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1830
1839
|
opacity: z.ZodOptional<z.ZodNumber>;
|
1831
1840
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1832
1841
|
}, z.ZodTypeAny, "passthrough">>>, "many">;
|
1833
|
-
basePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>, z.ZodObject<{
|
1842
|
+
basePdf: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>, z.ZodObject<{
|
1834
1843
|
width: z.ZodNumber;
|
1835
1844
|
height: z.ZodNumber;
|
1836
1845
|
padding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
@@ -2093,7 +2102,7 @@ export declare const DesignerProps: z.ZodObject<{
|
|
2093
2102
|
opacity: z.ZodOptional<z.ZodNumber>;
|
2094
2103
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
2095
2104
|
}, z.ZodTypeAny, "passthrough">>>, "many">;
|
2096
|
-
basePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>, z.ZodObject<{
|
2105
|
+
basePdf: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>, z.ZodObject<{
|
2097
2106
|
width: z.ZodNumber;
|
2098
2107
|
height: z.ZodNumber;
|
2099
2108
|
padding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
@@ -2166,7 +2175,7 @@ export declare const DesignerProps: z.ZodObject<{
|
|
2166
2175
|
opacity: z.ZodOptional<z.ZodNumber>;
|
2167
2176
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
2168
2177
|
}, z.ZodTypeAny, "passthrough">>>, "many">;
|
2169
|
-
basePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>, z.ZodObject<{
|
2178
|
+
basePdf: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>, z.ZodObject<{
|
2170
2179
|
width: z.ZodNumber;
|
2171
2180
|
height: z.ZodNumber;
|
2172
2181
|
padding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
@@ -2239,7 +2248,7 @@ export declare const DesignerProps: z.ZodObject<{
|
|
2239
2248
|
opacity: z.ZodOptional<z.ZodNumber>;
|
2240
2249
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
2241
2250
|
}, z.ZodTypeAny, "passthrough">>>, "many">;
|
2242
|
-
basePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>, z.ZodObject<{
|
2251
|
+
basePdf: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>, z.ZodObject<{
|
2243
2252
|
width: z.ZodNumber;
|
2244
2253
|
height: z.ZodNumber;
|
2245
2254
|
padding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
@@ -6,11 +6,12 @@ import type { ThemeConfig, GlobalToken } from 'antd';
|
|
6
6
|
import type { WidgetProps as _PropPanelWidgetProps, Schema as _PropPanelSchema } from 'form-render';
|
7
7
|
import { Lang, Dict, Mode, Size, Schema, Font, SchemaForUI, BasePdf, BlankPdf, CommonOptions, Template, GeneratorOptions, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps, ColorType } from './schema.js';
|
8
8
|
export type PropPanelSchema = _PropPanelSchema;
|
9
|
-
export type
|
9
|
+
export type ChangeSchemaItem = {
|
10
10
|
key: string;
|
11
11
|
value: any;
|
12
12
|
schemaId: string;
|
13
|
-
}
|
13
|
+
};
|
14
|
+
export type ChangeSchemas = (objs: ChangeSchemaItem[]) => void;
|
14
15
|
/**
|
15
16
|
* Properties used for PDF rendering.
|
16
17
|
* @template T Type of the extended Schema object.
|
@@ -122,6 +123,7 @@ export interface PropPanel<T extends Schema> {
|
|
122
123
|
* @property {function} pdf Function for rendering PDFs.
|
123
124
|
* @property {function} ui Function for rendering UI.
|
124
125
|
* @property {PropPanel} propPanel Object for defining the property panel.
|
126
|
+
* @property {boolean} [uninterruptedEditMode] When editing in the UI, should the field avoid re-rendering while in edit mode?
|
125
127
|
*/
|
126
128
|
export type Plugin<T extends Schema & {
|
127
129
|
[key: string]: any;
|
@@ -129,6 +131,7 @@ export type Plugin<T extends Schema & {
|
|
129
131
|
pdf: (arg: PDFRenderProps<T>) => Promise<void> | void;
|
130
132
|
ui: (arg: UIRenderProps<T>) => Promise<void> | void;
|
131
133
|
propPanel: PropPanel<T>;
|
134
|
+
uninterruptedEditMode?: boolean;
|
132
135
|
};
|
133
136
|
export type Plugins = {
|
134
137
|
[key: string]: Plugin<any> | undefined;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
@@ -8,6 +8,7 @@ import {
|
|
8
8
|
DEFAULT_FONT_NAME,
|
9
9
|
} from './constants.js';
|
10
10
|
import type {
|
11
|
+
ChangeSchemaItem,
|
11
12
|
ChangeSchemas,
|
12
13
|
PropPanel,
|
13
14
|
PropPanelSchema,
|
@@ -107,6 +108,7 @@ export type {
|
|
107
108
|
UIProps,
|
108
109
|
PreviewProps,
|
109
110
|
DesignerProps,
|
111
|
+
ChangeSchemaItem,
|
110
112
|
ChangeSchemas,
|
111
113
|
PropPanel,
|
112
114
|
PropPanelSchema,
|
package/src/schema.ts
CHANGED
@@ -58,6 +58,10 @@ export const Dict = z.object({
|
|
58
58
|
'schemas.text.dynamicFontSize': z.string(),
|
59
59
|
'schemas.text.format': z.string(),
|
60
60
|
|
61
|
+
'schemas.mvt.typingInstructions': z.string(),
|
62
|
+
'schemas.mvt.sampleField': z.string(),
|
63
|
+
'schemas.mvt.variablesSampleData': z.string(),
|
64
|
+
|
61
65
|
'schemas.barcodes.barColor': z.string(),
|
62
66
|
'schemas.barcodes.includetext': z.string(),
|
63
67
|
|
@@ -95,13 +99,16 @@ export const SchemaForUI = Schema.merge(SchemaForUIAdditionalInfo);
|
|
95
99
|
|
96
100
|
const ArrayBufferSchema: z.ZodSchema<ArrayBuffer> = z.any().refine((v) => v instanceof ArrayBuffer);
|
97
101
|
const Uint8ArraySchema: z.ZodSchema<Uint8Array> = z.any().refine((v) => v instanceof Uint8Array);
|
102
|
+
|
98
103
|
export const BlankPdf = z.object({
|
99
104
|
width: z.number(),
|
100
105
|
height: z.number(),
|
101
106
|
padding: z.tuple([z.number(), z.number(), z.number(), z.number()]),
|
102
107
|
});
|
103
108
|
|
104
|
-
|
109
|
+
const CustomPdf = z.union([z.string(), ArrayBufferSchema, Uint8ArraySchema]);
|
110
|
+
|
111
|
+
export const BasePdf = z.union([CustomPdf, BlankPdf]);
|
105
112
|
|
106
113
|
export const Template = z
|
107
114
|
.object({
|
package/src/types.ts
CHANGED
@@ -26,7 +26,12 @@ import {
|
|
26
26
|
} from './schema.js';
|
27
27
|
|
28
28
|
export type PropPanelSchema = _PropPanelSchema;
|
29
|
-
export type
|
29
|
+
export type ChangeSchemaItem = {
|
30
|
+
key: string,
|
31
|
+
value: any,
|
32
|
+
schemaId: string
|
33
|
+
};
|
34
|
+
export type ChangeSchemas = (objs: ChangeSchemaItem[]) => void;
|
30
35
|
|
31
36
|
/**
|
32
37
|
* Properties used for PDF rendering.
|
@@ -142,11 +147,13 @@ export interface PropPanel<T extends Schema> {
|
|
142
147
|
* @property {function} pdf Function for rendering PDFs.
|
143
148
|
* @property {function} ui Function for rendering UI.
|
144
149
|
* @property {PropPanel} propPanel Object for defining the property panel.
|
150
|
+
* @property {boolean} [uninterruptedEditMode] When editing in the UI, should the field avoid re-rendering while in edit mode?
|
145
151
|
*/
|
146
152
|
export type Plugin<T extends Schema & { [key: string]: any }> = {
|
147
153
|
pdf: (arg: PDFRenderProps<T>) => Promise<void> | void;
|
148
154
|
ui: (arg: UIRenderProps<T>) => Promise<void> | void;
|
149
155
|
propPanel: PropPanel<T>;
|
156
|
+
uninterruptedEditMode?: boolean;
|
150
157
|
};
|
151
158
|
|
152
159
|
export type Plugins = { [key: string]: Plugin<any> | undefined };
|