n8n-nodes-sudomock 0.15.0 → 0.16.0

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.
@@ -705,6 +705,13 @@ class SudoMock {
705
705
  default: 0,
706
706
  description: 'Artwork rotation in degrees',
707
707
  },
708
+ {
709
+ displayName: 'Tile',
710
+ name: 'tile',
711
+ type: 'boolean',
712
+ default: false,
713
+ description: 'Whether to repeat the artwork as a pattern across the whole target. The sizing answer (coverage, fit, or width and height) is one tile, and position with offset_x and offset_y sets where the grid starts. Requires a sizing answer.',
714
+ },
708
715
  {
709
716
  displayName: 'Width',
710
717
  name: 'width',
@@ -803,6 +810,13 @@ class SudoMock {
803
810
  default: 0,
804
811
  description: 'Artwork rotation in degrees',
805
812
  },
813
+ {
814
+ displayName: 'Tile',
815
+ name: 'tile',
816
+ type: 'boolean',
817
+ default: false,
818
+ description: 'Whether to repeat the artwork as a pattern across the whole target. The sizing answer (coverage, fit, or width and height) is one tile, and position with offset_x and offset_y sets where the grid starts. Requires a sizing answer.',
819
+ },
806
820
  {
807
821
  displayName: 'Width',
808
822
  name: 'width',
@@ -1153,15 +1167,15 @@ class SudoMock {
1153
1167
  displayName: 'Position Left',
1154
1168
  name: 'positionLeft',
1155
1169
  type: 'number',
1156
- default: 0,
1157
- description: 'Custom position left offset in pixels',
1170
+ default: null,
1171
+ description: 'Custom position left offset in pixels. Leave empty for the default placement; 0 is the left edge.',
1158
1172
  },
1159
1173
  {
1160
1174
  displayName: 'Position Top',
1161
1175
  name: 'positionTop',
1162
1176
  type: 'number',
1163
- default: 0,
1164
- description: 'Custom position top offset in pixels',
1177
+ default: null,
1178
+ description: 'Custom position top offset in pixels. Leave empty for the default placement; 0 is the top edge.',
1165
1179
  },
1166
1180
  {
1167
1181
  displayName: 'Remove Background',
@@ -1192,6 +1206,13 @@ class SudoMock {
1192
1206
  default: 0,
1193
1207
  description: 'Saturation adjustment (-100 to 100). 0=no change, -100=grayscale.',
1194
1208
  },
1209
+ {
1210
+ displayName: 'Tile',
1211
+ name: 'tile',
1212
+ type: 'boolean',
1213
+ default: false,
1214
+ description: 'Whether to repeat the artwork as a pattern across the whole smart object. size is one tile, fit places the artwork inside each tile, and position sets where the grid starts. Requires size.',
1215
+ },
1195
1216
  {
1196
1217
  displayName: 'Vibrance',
1197
1218
  name: 'vibrance',
@@ -2369,6 +2390,10 @@ class SudoMock {
2369
2390
  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'A surface takes either Coverage or an explicit Width and Height pair, not both. Remove one of them.');
2370
2391
  }
2371
2392
  }
2393
+ // Tile is sent only when it is on.
2394
+ if (placement.tile !== true) {
2395
+ delete placement.tile;
2396
+ }
2372
2397
  if (Object.keys(placement).length > 0) {
2373
2398
  printArea.placement = placement;
2374
2399
  }
@@ -2578,17 +2603,23 @@ class SudoMock {
2578
2603
  if (Object.keys(size).length > 0) {
2579
2604
  asset.size = size;
2580
2605
  }
2581
- // Custom position override (top/left, DynamicMockups compatible)
2606
+ // Custom position override (top/left, DynamicMockups compatible).
2607
+ // An empty field holds null and is not sent, so the default
2608
+ // placement stays. 0 is sent: it puts the artwork against that edge.
2582
2609
  const position = {};
2583
- if (opts.positionTop !== undefined && opts.positionTop !== 0) {
2610
+ if (opts.positionTop !== undefined && opts.positionTop !== null) {
2584
2611
  position.top = opts.positionTop;
2585
2612
  }
2586
- if (opts.positionLeft !== undefined && opts.positionLeft !== 0) {
2613
+ if (opts.positionLeft !== undefined && opts.positionLeft !== null) {
2587
2614
  position.left = opts.positionLeft;
2588
2615
  }
2589
2616
  if (Object.keys(position).length > 0) {
2590
2617
  asset.position = position;
2591
2618
  }
2619
+ // Repeat the artwork as a pattern; asset.size is one tile
2620
+ if (opts.tile) {
2621
+ asset.tile = true;
2622
+ }
2592
2623
  // Color overlay
2593
2624
  if (opts.colorHex) {
2594
2625
  smartObject.color = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-sudomock",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "n8n community node for SudoMock mockup rendering API - POD automation",
5
5
  "license": "MIT",
6
6
  "homepage": "https://sudomock.com",