@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.
Files changed (62) hide show
  1. package/dist/cjs/src/barcodes/index.js +8 -1
  2. package/dist/cjs/src/barcodes/index.js.map +1 -1
  3. package/dist/cjs/src/barcodes/propPanel.js +0 -12
  4. package/dist/cjs/src/barcodes/propPanel.js.map +1 -1
  5. package/dist/cjs/src/graphics/image.js +2 -2
  6. package/dist/cjs/src/graphics/image.js.map +1 -1
  7. package/dist/cjs/src/graphics/svg.js +2 -2
  8. package/dist/cjs/src/graphics/svg.js.map +1 -1
  9. package/dist/cjs/src/multiVariableText/index.js +7 -1
  10. package/dist/cjs/src/multiVariableText/index.js.map +1 -1
  11. package/dist/cjs/src/multiVariableText/propPanel.js +0 -1
  12. package/dist/cjs/src/multiVariableText/propPanel.js.map +1 -1
  13. package/dist/cjs/src/shapes/line.js +1 -1
  14. package/dist/cjs/src/shapes/line.js.map +1 -1
  15. package/dist/cjs/src/shapes/rectAndEllipse.js +10 -3
  16. package/dist/cjs/src/shapes/rectAndEllipse.js.map +1 -1
  17. package/dist/cjs/src/tables/index.js +1 -0
  18. package/dist/cjs/src/tables/index.js.map +1 -1
  19. package/dist/cjs/src/tables/propPanel.js +0 -1
  20. package/dist/cjs/src/tables/propPanel.js.map +1 -1
  21. package/dist/cjs/src/text/index.js +7 -2
  22. package/dist/cjs/src/text/index.js.map +1 -1
  23. package/dist/cjs/src/text/propPanel.js +0 -1
  24. package/dist/cjs/src/text/propPanel.js.map +1 -1
  25. package/dist/esm/src/barcodes/index.js +8 -1
  26. package/dist/esm/src/barcodes/index.js.map +1 -1
  27. package/dist/esm/src/barcodes/propPanel.js +0 -12
  28. package/dist/esm/src/barcodes/propPanel.js.map +1 -1
  29. package/dist/esm/src/graphics/image.js +2 -2
  30. package/dist/esm/src/graphics/image.js.map +1 -1
  31. package/dist/esm/src/graphics/svg.js +2 -2
  32. package/dist/esm/src/graphics/svg.js.map +1 -1
  33. package/dist/esm/src/multiVariableText/index.js +7 -1
  34. package/dist/esm/src/multiVariableText/index.js.map +1 -1
  35. package/dist/esm/src/multiVariableText/propPanel.js +0 -1
  36. package/dist/esm/src/multiVariableText/propPanel.js.map +1 -1
  37. package/dist/esm/src/shapes/line.js +1 -1
  38. package/dist/esm/src/shapes/line.js.map +1 -1
  39. package/dist/esm/src/shapes/rectAndEllipse.js +10 -3
  40. package/dist/esm/src/shapes/rectAndEllipse.js.map +1 -1
  41. package/dist/esm/src/tables/index.js +1 -0
  42. package/dist/esm/src/tables/index.js.map +1 -1
  43. package/dist/esm/src/tables/propPanel.js +0 -1
  44. package/dist/esm/src/tables/propPanel.js.map +1 -1
  45. package/dist/esm/src/text/index.js +7 -2
  46. package/dist/esm/src/text/index.js.map +1 -1
  47. package/dist/esm/src/text/propPanel.js +0 -1
  48. package/dist/esm/src/text/propPanel.js.map +1 -1
  49. package/dist/types/src/shapes/rectAndEllipse.d.ts +2 -6
  50. package/package.json +1 -1
  51. package/src/barcodes/index.ts +9 -1
  52. package/src/barcodes/propPanel.ts +0 -13
  53. package/src/graphics/image.ts +2 -2
  54. package/src/graphics/svg.ts +2 -2
  55. package/src/multiVariableText/index.ts +7 -1
  56. package/src/multiVariableText/propPanel.ts +0 -1
  57. package/src/shapes/line.ts +1 -1
  58. package/src/shapes/rectAndEllipse.ts +10 -3
  59. package/src/tables/index.ts +1 -0
  60. package/src/tables/propPanel.ts +0 -1
  61. package/src/text/index.ts +7 -2
  62. package/src/text/propPanel.ts +0 -1
@@ -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> = { pdf: pdfRender, ui: uiRender, propPanel, uninterruptedEditMode: true };
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: [],
@@ -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 = { ...shape, propPanel: getPropPanelSchema('rectangle') };
117
+ export const rectangle = {
118
+ ...shape,
119
+ propPanel: getPropPanelSchema('rectangle'),
120
+ icon: rectangleIcon
121
+ };
119
122
 
120
- export const ellipse = { ...shape, propPanel: getPropPanelSchema('ellipse') };
123
+ export const ellipse = {
124
+ ...shape,
125
+ propPanel: getPropPanelSchema('ellipse'),
126
+ icon: ellipseIcon
127
+ };
@@ -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;
@@ -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> = { pdf: pdfRender, ui: uiRender, propPanel };
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
  };
@@ -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,