@workglow/tasks 0.2.1 → 0.2.3

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 (78) hide show
  1. package/dist/browser.d.ts +4 -3
  2. package/dist/browser.d.ts.map +1 -1
  3. package/dist/browser.js +9764 -9174
  4. package/dist/browser.js.map +58 -50
  5. package/dist/bun.d.ts +5 -3
  6. package/dist/bun.d.ts.map +1 -1
  7. package/dist/bun.js +9893 -9204
  8. package/dist/bun.js.map +60 -51
  9. package/dist/common.d.ts +80 -74
  10. package/dist/common.d.ts.map +1 -1
  11. package/dist/node.d.ts +5 -3
  12. package/dist/node.d.ts.map +1 -1
  13. package/dist/node.js +9893 -9204
  14. package/dist/node.js.map +60 -51
  15. package/dist/task/FetchUrlTask.d.ts +13 -0
  16. package/dist/task/FetchUrlTask.d.ts.map +1 -1
  17. package/dist/task/FileLoaderTask.d.ts +2 -2
  18. package/dist/task/FileLoaderTask.d.ts.map +1 -1
  19. package/dist/task/FileLoaderTask.server.d.ts.map +1 -1
  20. package/dist/task/image/ImageBlurTask.d.ts +148 -120
  21. package/dist/task/image/ImageBlurTask.d.ts.map +1 -1
  22. package/dist/task/image/ImageBorderTask.d.ts +148 -120
  23. package/dist/task/image/ImageBorderTask.d.ts.map +1 -1
  24. package/dist/task/image/ImageBrightnessTask.d.ts +148 -120
  25. package/dist/task/image/ImageBrightnessTask.d.ts.map +1 -1
  26. package/dist/task/image/ImageContrastTask.d.ts +148 -120
  27. package/dist/task/image/ImageContrastTask.d.ts.map +1 -1
  28. package/dist/task/image/ImageCropTask.d.ts +148 -120
  29. package/dist/task/image/ImageCropTask.d.ts.map +1 -1
  30. package/dist/task/image/ImageFlipTask.d.ts +143 -115
  31. package/dist/task/image/ImageFlipTask.d.ts.map +1 -1
  32. package/dist/task/image/ImageGrayscaleTask.d.ts +132 -104
  33. package/dist/task/image/ImageGrayscaleTask.d.ts.map +1 -1
  34. package/dist/task/image/ImageInvertTask.d.ts +132 -104
  35. package/dist/task/image/ImageInvertTask.d.ts.map +1 -1
  36. package/dist/task/image/ImagePixelateTask.d.ts +146 -118
  37. package/dist/task/image/ImagePixelateTask.d.ts.map +1 -1
  38. package/dist/task/image/ImagePosterizeTask.d.ts +148 -120
  39. package/dist/task/image/ImagePosterizeTask.d.ts.map +1 -1
  40. package/dist/task/image/ImageResizeTask.d.ts +148 -120
  41. package/dist/task/image/ImageResizeTask.d.ts.map +1 -1
  42. package/dist/task/image/ImageRotateTask.d.ts +144 -116
  43. package/dist/task/image/ImageRotateTask.d.ts.map +1 -1
  44. package/dist/task/image/ImageSchemas.d.ts +46 -0
  45. package/dist/task/image/ImageSchemas.d.ts.map +1 -1
  46. package/dist/task/image/ImageSepiaTask.d.ts +132 -104
  47. package/dist/task/image/ImageSepiaTask.d.ts.map +1 -1
  48. package/dist/task/image/ImageThresholdTask.d.ts +148 -120
  49. package/dist/task/image/ImageThresholdTask.d.ts.map +1 -1
  50. package/dist/task/image/ImageTintTask.d.ts +148 -120
  51. package/dist/task/image/ImageTintTask.d.ts.map +1 -1
  52. package/dist/task/image/ImageTransparencyTask.d.ts +146 -118
  53. package/dist/task/image/ImageTransparencyTask.d.ts.map +1 -1
  54. package/dist/task/image/ImageWatermarkTask.d.ts +148 -120
  55. package/dist/task/image/ImageWatermarkTask.d.ts.map +1 -1
  56. package/dist/task/image/imageCodecLimits.d.ts +80 -0
  57. package/dist/task/image/imageCodecLimits.d.ts.map +1 -0
  58. package/dist/task/image/imageRasterCodecBrowser.d.ts +8 -0
  59. package/dist/task/image/imageRasterCodecBrowser.d.ts.map +1 -0
  60. package/dist/task/image/imageRasterCodecNode.d.ts +8 -0
  61. package/dist/task/image/imageRasterCodecNode.d.ts.map +1 -0
  62. package/dist/task/image/imageRasterCodecRegistry.d.ts +13 -0
  63. package/dist/task/image/imageRasterCodecRegistry.d.ts.map +1 -0
  64. package/dist/task/image/imageTaskIo.d.ts +12 -0
  65. package/dist/task/image/imageTaskIo.d.ts.map +1 -0
  66. package/dist/task/image/imageTaskTransport.d.ts +21 -0
  67. package/dist/task/image/imageTaskTransport.d.ts.map +1 -0
  68. package/dist/task/image/registerImageRasterCodec.browser.d.ts +7 -0
  69. package/dist/task/image/registerImageRasterCodec.browser.d.ts.map +1 -0
  70. package/dist/task/image/registerImageRasterCodec.node.d.ts +7 -0
  71. package/dist/task/image/registerImageRasterCodec.node.d.ts.map +1 -0
  72. package/dist/util/SafeFetch.d.ts +51 -0
  73. package/dist/util/SafeFetch.d.ts.map +1 -0
  74. package/dist/util/SafeFetch.server.d.ts +22 -0
  75. package/dist/util/SafeFetch.server.d.ts.map +1 -0
  76. package/dist/util/UrlClassifier.d.ts +64 -0
  77. package/dist/util/UrlClassifier.d.ts.map +1 -0
  78. package/package.json +18 -11
@@ -9,103 +9,7 @@ declare const inputSchema: {
9
9
  readonly type: "object";
10
10
  readonly properties: {
11
11
  readonly image: {
12
- readonly type: "object";
13
- readonly properties: {
14
- readonly data: {
15
- readonly type: "array";
16
- readonly items: {
17
- readonly type: "number";
18
- readonly format: "Uint8Clamped";
19
- };
20
- readonly format: "Uint8ClampedArray";
21
- readonly title: "Data";
22
- readonly description: "Pixel data of the image";
23
- };
24
- readonly width: {
25
- readonly type: "integer";
26
- readonly minimum: 1;
27
- readonly title: "Width";
28
- readonly description: "Width in pixels";
29
- };
30
- readonly height: {
31
- readonly type: "integer";
32
- readonly minimum: 1;
33
- readonly title: "Height";
34
- readonly description: "Height in pixels";
35
- };
36
- readonly channels: {
37
- readonly type: "integer";
38
- readonly enum: readonly [1, 3, 4];
39
- readonly title: "Channels";
40
- readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
41
- };
42
- };
43
- readonly additionalProperties: false;
44
- readonly required: readonly ["data", "width", "height", "channels"];
45
- readonly format: "image:ImageBinary";
46
- readonly title: "Image";
47
- readonly description: "Raw pixel image data";
48
- };
49
- };
50
- readonly required: readonly ["image"];
51
- readonly additionalProperties: false;
52
- };
53
- declare const outputSchema: {
54
- readonly type: "object";
55
- readonly properties: {
56
- readonly image: {
57
- readonly type: "object";
58
- readonly properties: {
59
- readonly data: {
60
- readonly type: "array";
61
- readonly items: {
62
- readonly type: "number";
63
- readonly format: "Uint8Clamped";
64
- };
65
- readonly format: "Uint8ClampedArray";
66
- readonly title: "Data";
67
- readonly description: "Pixel data of the image";
68
- };
69
- readonly width: {
70
- readonly type: "integer";
71
- readonly minimum: 1;
72
- readonly title: "Width";
73
- readonly description: "Width in pixels";
74
- };
75
- readonly height: {
76
- readonly type: "integer";
77
- readonly minimum: 1;
78
- readonly title: "Height";
79
- readonly description: "Height in pixels";
80
- };
81
- readonly channels: {
82
- readonly type: "integer";
83
- readonly enum: readonly [1, 3, 4];
84
- readonly title: "Channels";
85
- readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
86
- };
87
- };
88
- readonly additionalProperties: false;
89
- readonly required: readonly ["data", "width", "height", "channels"];
90
- readonly format: "image:ImageBinary";
91
- readonly title: "Image";
92
- readonly description: "Raw pixel image data";
93
- };
94
- };
95
- readonly required: readonly ["image"];
96
- readonly additionalProperties: false;
97
- };
98
- export type ImageInvertTaskInput = ImageFromSchema<typeof inputSchema>;
99
- export type ImageInvertTaskOutput = ImageFromSchema<typeof outputSchema>;
100
- export declare class ImageInvertTask<Input extends ImageInvertTaskInput = ImageInvertTaskInput, Output extends ImageInvertTaskOutput = ImageInvertTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
101
- static readonly type = "ImageInvertTask";
102
- static readonly category = "Image";
103
- static title: string;
104
- static description: string;
105
- static inputSchema(): {
106
- readonly type: "object";
107
- readonly properties: {
108
- readonly image: {
12
+ readonly oneOf: readonly [{
109
13
  readonly type: "object";
110
14
  readonly properties: {
111
15
  readonly data: {
@@ -142,15 +46,22 @@ export declare class ImageInvertTask<Input extends ImageInvertTaskInput = ImageI
142
46
  readonly format: "image:ImageBinary";
143
47
  readonly title: "Image";
144
48
  readonly description: "Raw pixel image data";
145
- };
49
+ }, {
50
+ readonly type: "string";
51
+ readonly format: "image:data-uri";
52
+ readonly title: string;
53
+ readonly description: string;
54
+ }];
146
55
  };
147
- readonly required: readonly ["image"];
148
- readonly additionalProperties: false;
149
56
  };
150
- static outputSchema(): {
151
- readonly type: "object";
152
- readonly properties: {
153
- readonly image: {
57
+ readonly required: readonly ["image"];
58
+ readonly additionalProperties: false;
59
+ };
60
+ declare const outputSchema: {
61
+ readonly type: "object";
62
+ readonly properties: {
63
+ readonly image: {
64
+ readonly oneOf: readonly [{
154
65
  readonly type: "object";
155
66
  readonly properties: {
156
67
  readonly data: {
@@ -187,6 +98,123 @@ export declare class ImageInvertTask<Input extends ImageInvertTaskInput = ImageI
187
98
  readonly format: "image:ImageBinary";
188
99
  readonly title: "Image";
189
100
  readonly description: "Raw pixel image data";
101
+ }, {
102
+ readonly type: "string";
103
+ readonly format: "image:data-uri";
104
+ readonly title: string;
105
+ readonly description: string;
106
+ }];
107
+ };
108
+ };
109
+ readonly required: readonly ["image"];
110
+ readonly additionalProperties: false;
111
+ };
112
+ export type ImageInvertTaskInput = ImageFromSchema<typeof inputSchema>;
113
+ export type ImageInvertTaskOutput = ImageFromSchema<typeof outputSchema>;
114
+ export declare class ImageInvertTask<Input extends ImageInvertTaskInput = ImageInvertTaskInput, Output extends ImageInvertTaskOutput = ImageInvertTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
115
+ static readonly type = "ImageInvertTask";
116
+ static readonly category = "Image";
117
+ static title: string;
118
+ static description: string;
119
+ static inputSchema(): {
120
+ readonly type: "object";
121
+ readonly properties: {
122
+ readonly image: {
123
+ readonly oneOf: readonly [{
124
+ readonly type: "object";
125
+ readonly properties: {
126
+ readonly data: {
127
+ readonly type: "array";
128
+ readonly items: {
129
+ readonly type: "number";
130
+ readonly format: "Uint8Clamped";
131
+ };
132
+ readonly format: "Uint8ClampedArray";
133
+ readonly title: "Data";
134
+ readonly description: "Pixel data of the image";
135
+ };
136
+ readonly width: {
137
+ readonly type: "integer";
138
+ readonly minimum: 1;
139
+ readonly title: "Width";
140
+ readonly description: "Width in pixels";
141
+ };
142
+ readonly height: {
143
+ readonly type: "integer";
144
+ readonly minimum: 1;
145
+ readonly title: "Height";
146
+ readonly description: "Height in pixels";
147
+ };
148
+ readonly channels: {
149
+ readonly type: "integer";
150
+ readonly enum: readonly [1, 3, 4];
151
+ readonly title: "Channels";
152
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
153
+ };
154
+ };
155
+ readonly additionalProperties: false;
156
+ readonly required: readonly ["data", "width", "height", "channels"];
157
+ readonly format: "image:ImageBinary";
158
+ readonly title: "Image";
159
+ readonly description: "Raw pixel image data";
160
+ }, {
161
+ readonly type: "string";
162
+ readonly format: "image:data-uri";
163
+ readonly title: string;
164
+ readonly description: string;
165
+ }];
166
+ };
167
+ };
168
+ readonly required: readonly ["image"];
169
+ readonly additionalProperties: false;
170
+ };
171
+ static outputSchema(): {
172
+ readonly type: "object";
173
+ readonly properties: {
174
+ readonly image: {
175
+ readonly oneOf: readonly [{
176
+ readonly type: "object";
177
+ readonly properties: {
178
+ readonly data: {
179
+ readonly type: "array";
180
+ readonly items: {
181
+ readonly type: "number";
182
+ readonly format: "Uint8Clamped";
183
+ };
184
+ readonly format: "Uint8ClampedArray";
185
+ readonly title: "Data";
186
+ readonly description: "Pixel data of the image";
187
+ };
188
+ readonly width: {
189
+ readonly type: "integer";
190
+ readonly minimum: 1;
191
+ readonly title: "Width";
192
+ readonly description: "Width in pixels";
193
+ };
194
+ readonly height: {
195
+ readonly type: "integer";
196
+ readonly minimum: 1;
197
+ readonly title: "Height";
198
+ readonly description: "Height in pixels";
199
+ };
200
+ readonly channels: {
201
+ readonly type: "integer";
202
+ readonly enum: readonly [1, 3, 4];
203
+ readonly title: "Channels";
204
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
205
+ };
206
+ };
207
+ readonly additionalProperties: false;
208
+ readonly required: readonly ["data", "width", "height", "channels"];
209
+ readonly format: "image:ImageBinary";
210
+ readonly title: "Image";
211
+ readonly description: "Raw pixel image data";
212
+ }, {
213
+ readonly type: "string";
214
+ readonly format: "image:data-uri";
215
+ readonly title: string;
216
+ readonly description: string;
217
+ }];
190
218
  };
191
219
  };
192
220
  readonly required: readonly ["image"];
@@ -1 +1 @@
1
- {"version":3,"file":"ImageInvertTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImageInvertTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,IAAI,EACJ,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAqB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEpE,QAAA,MAAM,WAAW;mBACT,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI0B,CAAC;AAEpC,QAAA,MAAM,YAAY;mBACV,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI0B,CAAC;AAEpC,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAAC,OAAO,WAAW,CAAC,CAAC;AACvE,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC,OAAO,YAAY,CAAC,CAAC;AAEzE,qBAAa,eAAe,CAC1B,KAAK,SAAS,oBAAoB,GAAG,oBAAoB,EACzD,MAAM,SAAS,qBAAqB,GAAG,qBAAqB,EAC5D,MAAM,SAAS,UAAU,GAAG,UAAU,CACtC,SAAQ,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IACnC,gBAAyB,IAAI,qBAAqB;IAClD,gBAAyB,QAAQ,WAAW;IAC5C,OAAuB,KAAK,SAAmB;IAC/C,OAAuB,WAAW,SAAoC;IAEtE,OAAgB,WAAW;uBA9BrB,QAAQ;;qBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;M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AAyB,IAAI,qBAAqB;IAClD,gBAAyB,QAAQ,WAAW;IAC5C,OAAuB,KAAK,SAAmB;IAC/C,OAAuB,WAAW,SAAoC;IAEtE,OAAgB,WAAW;uBA9BrB,QAAQ;;qBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA8BN;IAED,OAAgB,YAAY;uBAzBtB,QAAQ;;qBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyBN;IAEc,eAAe,CAC5B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,uBAAuB,GAChC,OAAO,CAAC,MAAM,CAAC,CAqBjB;CACF;AAED,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,WAAW,EAAE,cAAc,CAAC,oBAAoB,EAAE,qBAAqB,EAAE,UAAU,CAAC,CAAC;KACtF;CACF"}
@@ -9,110 +9,7 @@ declare const inputSchema: {
9
9
  readonly type: "object";
10
10
  readonly properties: {
11
11
  readonly image: {
12
- readonly type: "object";
13
- readonly properties: {
14
- readonly data: {
15
- readonly type: "array";
16
- readonly items: {
17
- readonly type: "number";
18
- readonly format: "Uint8Clamped";
19
- };
20
- readonly format: "Uint8ClampedArray";
21
- readonly title: "Data";
22
- readonly description: "Pixel data of the image";
23
- };
24
- readonly width: {
25
- readonly type: "integer";
26
- readonly minimum: 1;
27
- readonly title: "Width";
28
- readonly description: "Width in pixels";
29
- };
30
- readonly height: {
31
- readonly type: "integer";
32
- readonly minimum: 1;
33
- readonly title: "Height";
34
- readonly description: "Height in pixels";
35
- };
36
- readonly channels: {
37
- readonly type: "integer";
38
- readonly enum: readonly [1, 3, 4];
39
- readonly title: "Channels";
40
- readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
41
- };
42
- };
43
- readonly additionalProperties: false;
44
- readonly required: readonly ["data", "width", "height", "channels"];
45
- readonly format: "image:ImageBinary";
46
- readonly title: "Image";
47
- readonly description: "Raw pixel image data";
48
- };
49
- readonly blockSize: {
50
- readonly type: "integer";
51
- readonly title: "Block Size";
52
- readonly description: "Size of each pixelation block";
53
- readonly minimum: 2;
54
- readonly default: 8;
55
- };
56
- };
57
- readonly required: readonly ["image"];
58
- readonly additionalProperties: false;
59
- };
60
- declare const outputSchema: {
61
- readonly type: "object";
62
- readonly properties: {
63
- readonly image: {
64
- readonly type: "object";
65
- readonly properties: {
66
- readonly data: {
67
- readonly type: "array";
68
- readonly items: {
69
- readonly type: "number";
70
- readonly format: "Uint8Clamped";
71
- };
72
- readonly format: "Uint8ClampedArray";
73
- readonly title: "Data";
74
- readonly description: "Pixel data of the image";
75
- };
76
- readonly width: {
77
- readonly type: "integer";
78
- readonly minimum: 1;
79
- readonly title: "Width";
80
- readonly description: "Width in pixels";
81
- };
82
- readonly height: {
83
- readonly type: "integer";
84
- readonly minimum: 1;
85
- readonly title: "Height";
86
- readonly description: "Height in pixels";
87
- };
88
- readonly channels: {
89
- readonly type: "integer";
90
- readonly enum: readonly [1, 3, 4];
91
- readonly title: "Channels";
92
- readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
93
- };
94
- };
95
- readonly additionalProperties: false;
96
- readonly required: readonly ["data", "width", "height", "channels"];
97
- readonly format: "image:ImageBinary";
98
- readonly title: "Image";
99
- readonly description: "Raw pixel image data";
100
- };
101
- };
102
- readonly required: readonly ["image"];
103
- readonly additionalProperties: false;
104
- };
105
- export type ImagePixelateTaskInput = ImageFromSchema<typeof inputSchema>;
106
- export type ImagePixelateTaskOutput = ImageFromSchema<typeof outputSchema>;
107
- export declare class ImagePixelateTask<Input extends ImagePixelateTaskInput = ImagePixelateTaskInput, Output extends ImagePixelateTaskOutput = ImagePixelateTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
108
- static readonly type = "ImagePixelateTask";
109
- static readonly category = "Image";
110
- static title: string;
111
- static description: string;
112
- static inputSchema(): {
113
- readonly type: "object";
114
- readonly properties: {
115
- readonly image: {
12
+ readonly oneOf: readonly [{
116
13
  readonly type: "object";
117
14
  readonly properties: {
118
15
  readonly data: {
@@ -149,22 +46,29 @@ export declare class ImagePixelateTask<Input extends ImagePixelateTaskInput = Im
149
46
  readonly format: "image:ImageBinary";
150
47
  readonly title: "Image";
151
48
  readonly description: "Raw pixel image data";
152
- };
153
- readonly blockSize: {
154
- readonly type: "integer";
155
- readonly title: "Block Size";
156
- readonly description: "Size of each pixelation block";
157
- readonly minimum: 2;
158
- readonly default: 8;
159
- };
49
+ }, {
50
+ readonly type: "string";
51
+ readonly format: "image:data-uri";
52
+ readonly title: string;
53
+ readonly description: string;
54
+ }];
55
+ };
56
+ readonly blockSize: {
57
+ readonly type: "integer";
58
+ readonly title: "Block Size";
59
+ readonly description: "Size of each pixelation block";
60
+ readonly minimum: 2;
61
+ readonly default: 8;
160
62
  };
161
- readonly required: readonly ["image"];
162
- readonly additionalProperties: false;
163
63
  };
164
- static outputSchema(): {
165
- readonly type: "object";
166
- readonly properties: {
167
- readonly image: {
64
+ readonly required: readonly ["image"];
65
+ readonly additionalProperties: false;
66
+ };
67
+ declare const outputSchema: {
68
+ readonly type: "object";
69
+ readonly properties: {
70
+ readonly image: {
71
+ readonly oneOf: readonly [{
168
72
  readonly type: "object";
169
73
  readonly properties: {
170
74
  readonly data: {
@@ -201,6 +105,130 @@ export declare class ImagePixelateTask<Input extends ImagePixelateTaskInput = Im
201
105
  readonly format: "image:ImageBinary";
202
106
  readonly title: "Image";
203
107
  readonly description: "Raw pixel image data";
108
+ }, {
109
+ readonly type: "string";
110
+ readonly format: "image:data-uri";
111
+ readonly title: string;
112
+ readonly description: string;
113
+ }];
114
+ };
115
+ };
116
+ readonly required: readonly ["image"];
117
+ readonly additionalProperties: false;
118
+ };
119
+ export type ImagePixelateTaskInput = ImageFromSchema<typeof inputSchema>;
120
+ export type ImagePixelateTaskOutput = ImageFromSchema<typeof outputSchema>;
121
+ export declare class ImagePixelateTask<Input extends ImagePixelateTaskInput = ImagePixelateTaskInput, Output extends ImagePixelateTaskOutput = ImagePixelateTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
122
+ static readonly type = "ImagePixelateTask";
123
+ static readonly category = "Image";
124
+ static title: string;
125
+ static description: string;
126
+ static inputSchema(): {
127
+ readonly type: "object";
128
+ readonly properties: {
129
+ readonly image: {
130
+ readonly oneOf: readonly [{
131
+ readonly type: "object";
132
+ readonly properties: {
133
+ readonly data: {
134
+ readonly type: "array";
135
+ readonly items: {
136
+ readonly type: "number";
137
+ readonly format: "Uint8Clamped";
138
+ };
139
+ readonly format: "Uint8ClampedArray";
140
+ readonly title: "Data";
141
+ readonly description: "Pixel data of the image";
142
+ };
143
+ readonly width: {
144
+ readonly type: "integer";
145
+ readonly minimum: 1;
146
+ readonly title: "Width";
147
+ readonly description: "Width in pixels";
148
+ };
149
+ readonly height: {
150
+ readonly type: "integer";
151
+ readonly minimum: 1;
152
+ readonly title: "Height";
153
+ readonly description: "Height in pixels";
154
+ };
155
+ readonly channels: {
156
+ readonly type: "integer";
157
+ readonly enum: readonly [1, 3, 4];
158
+ readonly title: "Channels";
159
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
160
+ };
161
+ };
162
+ readonly additionalProperties: false;
163
+ readonly required: readonly ["data", "width", "height", "channels"];
164
+ readonly format: "image:ImageBinary";
165
+ readonly title: "Image";
166
+ readonly description: "Raw pixel image data";
167
+ }, {
168
+ readonly type: "string";
169
+ readonly format: "image:data-uri";
170
+ readonly title: string;
171
+ readonly description: string;
172
+ }];
173
+ };
174
+ readonly blockSize: {
175
+ readonly type: "integer";
176
+ readonly title: "Block Size";
177
+ readonly description: "Size of each pixelation block";
178
+ readonly minimum: 2;
179
+ readonly default: 8;
180
+ };
181
+ };
182
+ readonly required: readonly ["image"];
183
+ readonly additionalProperties: false;
184
+ };
185
+ static outputSchema(): {
186
+ readonly type: "object";
187
+ readonly properties: {
188
+ readonly image: {
189
+ readonly oneOf: readonly [{
190
+ readonly type: "object";
191
+ readonly properties: {
192
+ readonly data: {
193
+ readonly type: "array";
194
+ readonly items: {
195
+ readonly type: "number";
196
+ readonly format: "Uint8Clamped";
197
+ };
198
+ readonly format: "Uint8ClampedArray";
199
+ readonly title: "Data";
200
+ readonly description: "Pixel data of the image";
201
+ };
202
+ readonly width: {
203
+ readonly type: "integer";
204
+ readonly minimum: 1;
205
+ readonly title: "Width";
206
+ readonly description: "Width in pixels";
207
+ };
208
+ readonly height: {
209
+ readonly type: "integer";
210
+ readonly minimum: 1;
211
+ readonly title: "Height";
212
+ readonly description: "Height in pixels";
213
+ };
214
+ readonly channels: {
215
+ readonly type: "integer";
216
+ readonly enum: readonly [1, 3, 4];
217
+ readonly title: "Channels";
218
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
219
+ };
220
+ };
221
+ readonly additionalProperties: false;
222
+ readonly required: readonly ["data", "width", "height", "channels"];
223
+ readonly format: "image:ImageBinary";
224
+ readonly title: "Image";
225
+ readonly description: "Raw pixel image data";
226
+ }, {
227
+ readonly type: "string";
228
+ readonly format: "image:data-uri";
229
+ readonly title: string;
230
+ readonly description: string;
231
+ }];
204
232
  };
205
233
  };
206
234
  readonly required: readonly ["image"];
@@ -1 +1 @@
1
- {"version":3,"file":"ImagePixelateTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImagePixelateTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,IAAI,EACJ,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAqB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEpE,QAAA,MAAM,WAAW;mBACT,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBACL,SAAS;qBACP,IAAI,EAAE,SAAS;qBACf,KAAK,EAAE,YAAY;qBACnB,WAAW,EAAE,+BA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