@pdfme/schemas 4.2.3 → 4.2.4
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/barcodes/index.js +8 -1
- package/dist/cjs/src/barcodes/index.js.map +1 -1
- package/dist/cjs/src/barcodes/propPanel.js +0 -12
- package/dist/cjs/src/barcodes/propPanel.js.map +1 -1
- package/dist/cjs/src/graphics/image.js +2 -2
- package/dist/cjs/src/graphics/image.js.map +1 -1
- package/dist/cjs/src/graphics/svg.js +2 -2
- package/dist/cjs/src/graphics/svg.js.map +1 -1
- package/dist/cjs/src/multiVariableText/index.js +7 -1
- package/dist/cjs/src/multiVariableText/index.js.map +1 -1
- package/dist/cjs/src/multiVariableText/propPanel.js +0 -1
- package/dist/cjs/src/multiVariableText/propPanel.js.map +1 -1
- package/dist/cjs/src/shapes/line.js +1 -1
- package/dist/cjs/src/shapes/line.js.map +1 -1
- package/dist/cjs/src/shapes/rectAndEllipse.js +10 -3
- package/dist/cjs/src/shapes/rectAndEllipse.js.map +1 -1
- package/dist/cjs/src/tables/index.js +1 -0
- package/dist/cjs/src/tables/index.js.map +1 -1
- package/dist/cjs/src/tables/propPanel.js +0 -1
- package/dist/cjs/src/tables/propPanel.js.map +1 -1
- package/dist/cjs/src/text/index.js +7 -2
- package/dist/cjs/src/text/index.js.map +1 -1
- package/dist/cjs/src/text/propPanel.js +0 -1
- package/dist/cjs/src/text/propPanel.js.map +1 -1
- package/dist/esm/src/barcodes/index.js +8 -1
- package/dist/esm/src/barcodes/index.js.map +1 -1
- package/dist/esm/src/barcodes/propPanel.js +0 -12
- package/dist/esm/src/barcodes/propPanel.js.map +1 -1
- package/dist/esm/src/graphics/image.js +2 -2
- package/dist/esm/src/graphics/image.js.map +1 -1
- package/dist/esm/src/graphics/svg.js +2 -2
- package/dist/esm/src/graphics/svg.js.map +1 -1
- package/dist/esm/src/multiVariableText/index.js +7 -1
- package/dist/esm/src/multiVariableText/index.js.map +1 -1
- package/dist/esm/src/multiVariableText/propPanel.js +0 -1
- package/dist/esm/src/multiVariableText/propPanel.js.map +1 -1
- package/dist/esm/src/shapes/line.js +1 -1
- package/dist/esm/src/shapes/line.js.map +1 -1
- package/dist/esm/src/shapes/rectAndEllipse.js +10 -3
- package/dist/esm/src/shapes/rectAndEllipse.js.map +1 -1
- package/dist/esm/src/tables/index.js +1 -0
- package/dist/esm/src/tables/index.js.map +1 -1
- package/dist/esm/src/tables/propPanel.js +0 -1
- package/dist/esm/src/tables/propPanel.js.map +1 -1
- package/dist/esm/src/text/index.js +7 -2
- package/dist/esm/src/text/index.js.map +1 -1
- package/dist/esm/src/text/propPanel.js +0 -1
- package/dist/esm/src/text/propPanel.js.map +1 -1
- package/dist/types/src/shapes/rectAndEllipse.d.ts +2 -6
- package/package.json +1 -1
- package/src/barcodes/index.ts +9 -1
- package/src/barcodes/propPanel.ts +0 -13
- package/src/graphics/image.ts +2 -2
- package/src/graphics/svg.ts +2 -2
- package/src/multiVariableText/index.ts +7 -1
- package/src/multiVariableText/propPanel.ts +0 -1
- package/src/shapes/line.ts +1 -1
- package/src/shapes/rectAndEllipse.ts +10 -3
- package/src/tables/index.ts +1 -0
- package/src/tables/propPanel.ts +0 -1
- package/src/text/index.ts +7 -2
- package/src/text/propPanel.ts +0 -1
package/src/graphics/svg.ts
CHANGED
@@ -73,13 +73,13 @@ const svgSchema: Plugin<SVGSchema> = {
|
|
73
73
|
schema: {},
|
74
74
|
defaultSchema: {
|
75
75
|
type: 'svg',
|
76
|
-
icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-route"><circle cx="6" cy="19" r="3"/><path d="M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15"/><circle cx="18" cy="5" r="3"/></svg>',
|
77
76
|
content: defaultValue,
|
78
77
|
position: { x: 0, y: 0 },
|
79
78
|
width: 40,
|
80
79
|
height: 40,
|
81
80
|
},
|
82
81
|
},
|
82
|
+
icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-route"><circle cx="6" cy="19" r="3"/><path d="M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15"/><circle cx="18" cy="5" r="3"/></svg>',
|
83
83
|
};
|
84
84
|
|
85
85
|
export default svgSchema;
|
@@ -92,8 +92,8 @@ export const readOnlySvg: Plugin<SVGSchema> = {
|
|
92
92
|
defaultSchema: {
|
93
93
|
...svgSchema.propPanel.defaultSchema,
|
94
94
|
type: 'readOnlySvg',
|
95
|
-
icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-route-off"><circle cx="6" cy="19" r="3"/><path d="M9 19h8.5c.4 0 .9-.1 1.3-.2"/><path d="M5.2 5.2A3.5 3.53 0 0 0 6.5 12H12"/><path d="m2 2 20 20"/><path d="M21 15.3a3.5 3.5 0 0 0-3.3-3.3"/><path d="M15 5h-4.3"/><circle cx="18" cy="5" r="3"/></svg>',
|
96
95
|
readOnly: true,
|
97
96
|
},
|
98
97
|
},
|
98
|
+
icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-route-off"><circle cx="6" cy="19" r="3"/><path d="M9 19h8.5c.4 0 .9-.1 1.3-.2"/><path d="M5.2 5.2A3.5 3.53 0 0 0 6.5 12H12"/><path d="m2 2 20 20"/><path d="M21 15.3a3.5 3.5 0 0 0-3.3-3.3"/><path d="M15 5h-4.3"/><circle cx="18" cy="5" r="3"/></svg>',
|
99
99
|
};
|
@@ -4,5 +4,11 @@ import { propPanel } from './propPanel.js';
|
|
4
4
|
import { uiRender } from './uiRender.js';
|
5
5
|
import type { MultiVariableTextSchema } from './types';
|
6
6
|
|
7
|
-
const schema: Plugin<MultiVariableTextSchema> = {
|
7
|
+
const schema: Plugin<MultiVariableTextSchema> = {
|
8
|
+
pdf: pdfRender,
|
9
|
+
ui: uiRender,
|
10
|
+
propPanel,
|
11
|
+
icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-type"><polyline points="4 7 4 4 20 4 20 7"/><line x1="9" x2="15" y1="20" y2="20"/><line x1="12" x2="12" y1="4" y2="20"/></svg>',
|
12
|
+
uninterruptedEditMode: true
|
13
|
+
};
|
8
14
|
export default schema;
|
@@ -97,7 +97,6 @@ export const propPanel: PropPanel<MultiVariableTextSchema> = {
|
|
97
97
|
defaultSchema: {
|
98
98
|
...parentPropPanel.defaultSchema,
|
99
99
|
type: 'multiVariableText',
|
100
|
-
icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-type"><polyline points="4 7 4 4 20 4 20 7"/><line x1="9" x2="15" y1="20" y2="20"/><line x1="12" x2="12" y1="4" y2="20"/></svg>',
|
101
100
|
text: 'Type something...',
|
102
101
|
content: '{}',
|
103
102
|
variables: [],
|
package/src/shapes/line.ts
CHANGED
@@ -50,7 +50,6 @@ const lineSchema: Plugin<LineSchema> = {
|
|
50
50
|
}),
|
51
51
|
defaultSchema: {
|
52
52
|
type: 'line',
|
53
|
-
icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-minus"><path d="M5 12h14"/></svg>',
|
54
53
|
position: { x: 0, y: 0 },
|
55
54
|
width: 50,
|
56
55
|
height: 1,
|
@@ -60,5 +59,6 @@ const lineSchema: Plugin<LineSchema> = {
|
|
60
59
|
color: DEFAULT_LINE_COLOR,
|
61
60
|
},
|
62
61
|
},
|
62
|
+
icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-minus"><path d="M5 12h14"/></svg>',
|
63
63
|
};
|
64
64
|
export default lineSchema;
|
@@ -111,10 +111,17 @@ const getPropPanelSchema = (type: 'rectangle' | 'ellipse') => ({
|
|
111
111
|
defaultSchema: {
|
112
112
|
...shape.propPanel.defaultSchema,
|
113
113
|
type,
|
114
|
-
icon: type === 'rectangle' ? rectangleIcon : ellipseIcon,
|
115
114
|
},
|
116
115
|
});
|
117
116
|
|
118
|
-
export const rectangle = {
|
117
|
+
export const rectangle = {
|
118
|
+
...shape,
|
119
|
+
propPanel: getPropPanelSchema('rectangle'),
|
120
|
+
icon: rectangleIcon
|
121
|
+
};
|
119
122
|
|
120
|
-
export const ellipse = {
|
123
|
+
export const ellipse = {
|
124
|
+
...shape,
|
125
|
+
propPanel: getPropPanelSchema('ellipse'),
|
126
|
+
icon: ellipseIcon
|
127
|
+
};
|
package/src/tables/index.ts
CHANGED
@@ -8,5 +8,6 @@ const tableSchema: Plugin<TableSchema> = {
|
|
8
8
|
pdf: pdfRender,
|
9
9
|
ui: uiRender,
|
10
10
|
propPanel,
|
11
|
+
icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-table"><path d="M12 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M3 9h18"/><path d="M3 15h18"/></svg>',
|
11
12
|
};
|
12
13
|
export default tableSchema;
|
package/src/tables/propPanel.ts
CHANGED
@@ -62,7 +62,6 @@ export const propPanel: PropPanel<TableSchema> = {
|
|
62
62
|
},
|
63
63
|
defaultSchema: {
|
64
64
|
type: 'table',
|
65
|
-
icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-table"><path d="M12 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M3 9h18"/><path d="M3 15h18"/></svg>',
|
66
65
|
position: { x: 0, y: 0 },
|
67
66
|
width: 150,
|
68
67
|
height: 20,
|
package/src/text/index.ts
CHANGED
@@ -4,7 +4,12 @@ import { propPanel } from './propPanel.js';
|
|
4
4
|
import { uiRender } from './uiRender.js';
|
5
5
|
import type { TextSchema } from './types';
|
6
6
|
|
7
|
-
const textSchema: Plugin<TextSchema> = {
|
7
|
+
const textSchema: Plugin<TextSchema> = {
|
8
|
+
pdf: pdfRender,
|
9
|
+
ui: uiRender,
|
10
|
+
propPanel,
|
11
|
+
icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-text-cursor-input"><path d="M5 4h1a3 3 0 0 1 3 3 3 3 0 0 1 3-3h1"/><path d="M13 20h-1a3 3 0 0 1-3-3 3 3 0 0 1-3 3H5"/><path d="M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1"/><path d="M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7"/><path d="M9 7v10"/></svg>',
|
12
|
+
};
|
8
13
|
|
9
14
|
export default textSchema;
|
10
15
|
|
@@ -16,8 +21,8 @@ export const readOnlyText: Plugin<TextSchema> = {
|
|
16
21
|
defaultSchema: {
|
17
22
|
...textSchema.propPanel.defaultSchema,
|
18
23
|
type: 'readOnlyText',
|
19
|
-
icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-type"><polyline points="4 7 4 4 20 4 20 7"/><line x1="9" x2="15" y1="20" y2="20"/><line x1="12" x2="12" y1="4" y2="20"/></svg>',
|
20
24
|
readOnly: true,
|
21
25
|
},
|
22
26
|
},
|
27
|
+
icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-type"><polyline points="4 7 4 4 20 4 20 7"/><line x1="9" x2="15" y1="20" y2="20"/><line x1="12" x2="12" y1="4" y2="20"/></svg>',
|
23
28
|
};
|
package/src/text/propPanel.ts
CHANGED
@@ -148,7 +148,6 @@ export const propPanel: PropPanel<TextSchema> = {
|
|
148
148
|
widgets: { UseDynamicFontSize },
|
149
149
|
defaultSchema: {
|
150
150
|
type: 'text',
|
151
|
-
icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-text-cursor-input"><path d="M5 4h1a3 3 0 0 1 3 3 3 3 0 0 1 3-3h1"/><path d="M13 20h-1a3 3 0 0 1-3-3 3 3 0 0 1-3 3H5"/><path d="M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1"/><path d="M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7"/><path d="M9 7v10"/></svg>',
|
152
151
|
content: 'Type Something...',
|
153
152
|
position: { x: 0, y: 0 },
|
154
153
|
width: 45,
|