@pdfme/common 6.0.5 → 6.0.6
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +47 -5
- package/dist/version.d.ts +1 -1
- package/package.json +1 -5
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,44 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { PDFPage, PDFDocument } from '@pdfme/pdf-lib';
|
|
3
|
-
import type { ThemeConfig } from 'antd';
|
|
4
|
-
import type { WidgetProps as _PropPanelWidgetProps, Schema as _PropPanelSchema } from 'form-render';
|
|
5
3
|
import { Lang, Dict, Mode, Size, Schema, Font, SchemaForUI, BasePdf, BlankPdf, CustomPdf, CommonOptions, Template, GeneratorOptions, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps, ColorType, LegacySchemaPageArray, SchemaPageArray } from './schema.js';
|
|
6
|
-
export
|
|
4
|
+
export interface UIOptionsThemeToken {
|
|
5
|
+
colorPrimary?: string;
|
|
6
|
+
colorPrimaryBg?: string;
|
|
7
|
+
colorWhite?: string;
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface UIOptionsTheme {
|
|
11
|
+
token?: UIOptionsThemeToken;
|
|
12
|
+
components?: Record<string, Record<string, unknown>>;
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
export interface PropPanelRule {
|
|
16
|
+
validator?: (...args: any[]) => unknown;
|
|
17
|
+
message?: string;
|
|
18
|
+
pattern?: RegExp | string;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
}
|
|
21
|
+
export interface PropPanelSchema {
|
|
22
|
+
title?: string;
|
|
23
|
+
type?: string;
|
|
24
|
+
widget?: string;
|
|
25
|
+
default?: unknown;
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
format?: string;
|
|
28
|
+
required?: boolean;
|
|
29
|
+
hidden?: boolean | string;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
bind?: string | false | string[];
|
|
32
|
+
span?: number;
|
|
33
|
+
column?: number;
|
|
34
|
+
min?: number;
|
|
35
|
+
max?: number;
|
|
36
|
+
props?: Record<string, unknown>;
|
|
37
|
+
rules?: PropPanelRule[];
|
|
38
|
+
properties?: Record<string, PropPanelSchema>;
|
|
39
|
+
items?: PropPanelSchema | PropPanelSchema[];
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
}
|
|
7
42
|
export type ChangeSchemaItem = {
|
|
8
43
|
key: string;
|
|
9
44
|
value: unknown;
|
|
@@ -101,7 +136,14 @@ type PropPanelProps = {
|
|
|
101
136
|
theme: UITheme;
|
|
102
137
|
i18n: (key: string) => string;
|
|
103
138
|
};
|
|
104
|
-
|
|
139
|
+
type PropPanelWidgetRuntimeProps = {
|
|
140
|
+
schema?: PropPanelSchema;
|
|
141
|
+
value?: unknown;
|
|
142
|
+
onChange?: (...args: any[]) => unknown;
|
|
143
|
+
error?: unknown;
|
|
144
|
+
[key: string]: unknown;
|
|
145
|
+
};
|
|
146
|
+
export type PropPanelWidgetProps = PropPanelWidgetRuntimeProps & PropPanelProps;
|
|
105
147
|
/**
|
|
106
148
|
* Used for customizing the property panel.
|
|
107
149
|
* @template T - Type of the extended Schema object.
|
|
@@ -170,7 +212,7 @@ export type GenerateProps = Omit<z.infer<typeof GenerateProps>, 'plugins'> & {
|
|
|
170
212
|
plugins?: Plugins;
|
|
171
213
|
};
|
|
172
214
|
export type UIOptions = z.infer<typeof UIOptions> & {
|
|
173
|
-
theme?:
|
|
215
|
+
theme?: UIOptionsTheme;
|
|
174
216
|
};
|
|
175
217
|
export type UIProps = Omit<z.infer<typeof UIProps>, 'plugins'> & {
|
|
176
218
|
plugins?: Plugins;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PDFME_VERSION = "6.0.
|
|
1
|
+
export declare const PDFME_VERSION = "6.0.6";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pdfme/common",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.6",
|
|
4
4
|
"description": "TypeScript base PDF generator and React base UI. Open source, developed by the community, and completely free to use under the MIT license!",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pdf",
|
|
@@ -55,9 +55,5 @@
|
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/estree": "^1.0.6"
|
|
58
|
-
},
|
|
59
|
-
"peerDependencies": {
|
|
60
|
-
"antd": "^5.11.2 || ^6.0.0",
|
|
61
|
-
"form-render": "^2.2.20"
|
|
62
58
|
}
|
|
63
59
|
}
|