n8n-nodes-sudomock 0.14.0 → 0.15.1
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/README.md +1 -0
- package/dist/nodes/SudoMock/SudoMock.node.js +20 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -293,6 +293,7 @@ Generate a mockup by filling smart objects with your designs.
|
|
|
293
293
|
- **Export Options** (optional):
|
|
294
294
|
- Image Format: WebP (recommended), PNG, or JPEG
|
|
295
295
|
- Image Size: Width in pixels (100-10000, default 2048)
|
|
296
|
+
- PSD's Own Size and Resolution: render at the template's own width, with the resolution the PSD was saved with unless DPI is set
|
|
296
297
|
- Quality: 1-100 for JPG/WebP
|
|
297
298
|
- Export Label: Custom label for file naming
|
|
298
299
|
|
|
@@ -1153,15 +1153,15 @@ class SudoMock {
|
|
|
1153
1153
|
displayName: 'Position Left',
|
|
1154
1154
|
name: 'positionLeft',
|
|
1155
1155
|
type: 'number',
|
|
1156
|
-
default:
|
|
1157
|
-
description: 'Custom position left offset in pixels',
|
|
1156
|
+
default: null,
|
|
1157
|
+
description: 'Custom position left offset in pixels. Leave empty for the default placement; 0 is the left edge.',
|
|
1158
1158
|
},
|
|
1159
1159
|
{
|
|
1160
1160
|
displayName: 'Position Top',
|
|
1161
1161
|
name: 'positionTop',
|
|
1162
1162
|
type: 'number',
|
|
1163
|
-
default:
|
|
1164
|
-
description: 'Custom position top offset in pixels',
|
|
1163
|
+
default: null,
|
|
1164
|
+
description: 'Custom position top offset in pixels. Leave empty for the default placement; 0 is the top edge.',
|
|
1165
1165
|
},
|
|
1166
1166
|
{
|
|
1167
1167
|
displayName: 'Remove Background',
|
|
@@ -1289,6 +1289,13 @@ class SudoMock {
|
|
|
1289
1289
|
default: 2048,
|
|
1290
1290
|
description: 'Output width in pixels (100-10000). Height scales proportionally. Powers of 2 (1024, 2048, 4096) recommended.',
|
|
1291
1291
|
},
|
|
1292
|
+
{
|
|
1293
|
+
displayName: "PSD's Own Size and Resolution",
|
|
1294
|
+
name: 'originalSize',
|
|
1295
|
+
type: 'boolean',
|
|
1296
|
+
default: false,
|
|
1297
|
+
description: "Whether to render at the PSD's own size and resolution: its own width, and the resolution it was saved with unless DPI is set. Image Size (Width) is not used when this is on.",
|
|
1298
|
+
},
|
|
1292
1299
|
{
|
|
1293
1300
|
displayName: 'Quality',
|
|
1294
1301
|
name: 'quality',
|
|
@@ -2571,12 +2578,14 @@ class SudoMock {
|
|
|
2571
2578
|
if (Object.keys(size).length > 0) {
|
|
2572
2579
|
asset.size = size;
|
|
2573
2580
|
}
|
|
2574
|
-
// Custom position override (top/left, DynamicMockups compatible)
|
|
2581
|
+
// Custom position override (top/left, DynamicMockups compatible).
|
|
2582
|
+
// An empty field holds null and is not sent, so the default
|
|
2583
|
+
// placement stays. 0 is sent: it puts the artwork against that edge.
|
|
2575
2584
|
const position = {};
|
|
2576
|
-
if (opts.positionTop !== undefined && opts.positionTop !==
|
|
2585
|
+
if (opts.positionTop !== undefined && opts.positionTop !== null) {
|
|
2577
2586
|
position.top = opts.positionTop;
|
|
2578
2587
|
}
|
|
2579
|
-
if (opts.positionLeft !== undefined && opts.positionLeft !==
|
|
2588
|
+
if (opts.positionLeft !== undefined && opts.positionLeft !== null) {
|
|
2580
2589
|
position.left = opts.positionLeft;
|
|
2581
2590
|
}
|
|
2582
2591
|
if (Object.keys(position).length > 0) {
|
|
@@ -2639,7 +2648,10 @@ class SudoMock {
|
|
|
2639
2648
|
if (exportOptions.imageFormat) {
|
|
2640
2649
|
expOpts.image_format = exportOptions.imageFormat;
|
|
2641
2650
|
}
|
|
2642
|
-
if (exportOptions.
|
|
2651
|
+
if (exportOptions.originalSize) {
|
|
2652
|
+
expOpts.image_size = 'original';
|
|
2653
|
+
}
|
|
2654
|
+
else if (exportOptions.imageSize) {
|
|
2643
2655
|
expOpts.image_size = exportOptions.imageSize;
|
|
2644
2656
|
}
|
|
2645
2657
|
if (exportOptions.quality) {
|