@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,109 +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 direction: {
50
- readonly type: "string";
51
- readonly enum: readonly ["horizontal", "vertical"];
52
- readonly title: "Direction";
53
- readonly description: "Flip direction";
54
- };
55
- };
56
- readonly required: readonly ["image", "direction"];
57
- readonly additionalProperties: false;
58
- };
59
- declare const outputSchema: {
60
- readonly type: "object";
61
- readonly properties: {
62
- readonly image: {
63
- readonly type: "object";
64
- readonly properties: {
65
- readonly data: {
66
- readonly type: "array";
67
- readonly items: {
68
- readonly type: "number";
69
- readonly format: "Uint8Clamped";
70
- };
71
- readonly format: "Uint8ClampedArray";
72
- readonly title: "Data";
73
- readonly description: "Pixel data of the image";
74
- };
75
- readonly width: {
76
- readonly type: "integer";
77
- readonly minimum: 1;
78
- readonly title: "Width";
79
- readonly description: "Width in pixels";
80
- };
81
- readonly height: {
82
- readonly type: "integer";
83
- readonly minimum: 1;
84
- readonly title: "Height";
85
- readonly description: "Height in pixels";
86
- };
87
- readonly channels: {
88
- readonly type: "integer";
89
- readonly enum: readonly [1, 3, 4];
90
- readonly title: "Channels";
91
- readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
92
- };
93
- };
94
- readonly additionalProperties: false;
95
- readonly required: readonly ["data", "width", "height", "channels"];
96
- readonly format: "image:ImageBinary";
97
- readonly title: "Image";
98
- readonly description: "Raw pixel image data";
99
- };
100
- };
101
- readonly required: readonly ["image"];
102
- readonly additionalProperties: false;
103
- };
104
- export type ImageFlipTaskInput = ImageFromSchema<typeof inputSchema>;
105
- export type ImageFlipTaskOutput = ImageFromSchema<typeof outputSchema>;
106
- export declare class ImageFlipTask<Input extends ImageFlipTaskInput = ImageFlipTaskInput, Output extends ImageFlipTaskOutput = ImageFlipTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
107
- static readonly type = "ImageFlipTask";
108
- static readonly category = "Image";
109
- static title: string;
110
- static description: string;
111
- static inputSchema(): {
112
- readonly type: "object";
113
- readonly properties: {
114
- readonly image: {
12
+ readonly oneOf: readonly [{
115
13
  readonly type: "object";
116
14
  readonly properties: {
117
15
  readonly data: {
@@ -148,21 +46,28 @@ export declare class ImageFlipTask<Input extends ImageFlipTaskInput = ImageFlipT
148
46
  readonly format: "image:ImageBinary";
149
47
  readonly title: "Image";
150
48
  readonly description: "Raw pixel image data";
151
- };
152
- readonly direction: {
49
+ }, {
153
50
  readonly type: "string";
154
- readonly enum: readonly ["horizontal", "vertical"];
155
- readonly title: "Direction";
156
- readonly description: "Flip direction";
157
- };
51
+ readonly format: "image:data-uri";
52
+ readonly title: string;
53
+ readonly description: string;
54
+ }];
55
+ };
56
+ readonly direction: {
57
+ readonly type: "string";
58
+ readonly enum: readonly ["horizontal", "vertical"];
59
+ readonly title: "Direction";
60
+ readonly description: "Flip direction";
158
61
  };
159
- readonly required: readonly ["image", "direction"];
160
- readonly additionalProperties: false;
161
62
  };
162
- static outputSchema(): {
163
- readonly type: "object";
164
- readonly properties: {
165
- readonly image: {
63
+ readonly required: readonly ["image", "direction"];
64
+ readonly additionalProperties: false;
65
+ };
66
+ declare const outputSchema: {
67
+ readonly type: "object";
68
+ readonly properties: {
69
+ readonly image: {
70
+ readonly oneOf: readonly [{
166
71
  readonly type: "object";
167
72
  readonly properties: {
168
73
  readonly data: {
@@ -199,6 +104,129 @@ export declare class ImageFlipTask<Input extends ImageFlipTaskInput = ImageFlipT
199
104
  readonly format: "image:ImageBinary";
200
105
  readonly title: "Image";
201
106
  readonly description: "Raw pixel image data";
107
+ }, {
108
+ readonly type: "string";
109
+ readonly format: "image:data-uri";
110
+ readonly title: string;
111
+ readonly description: string;
112
+ }];
113
+ };
114
+ };
115
+ readonly required: readonly ["image"];
116
+ readonly additionalProperties: false;
117
+ };
118
+ export type ImageFlipTaskInput = ImageFromSchema<typeof inputSchema>;
119
+ export type ImageFlipTaskOutput = ImageFromSchema<typeof outputSchema>;
120
+ export declare class ImageFlipTask<Input extends ImageFlipTaskInput = ImageFlipTaskInput, Output extends ImageFlipTaskOutput = ImageFlipTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
121
+ static readonly type = "ImageFlipTask";
122
+ static readonly category = "Image";
123
+ static title: string;
124
+ static description: string;
125
+ static inputSchema(): {
126
+ readonly type: "object";
127
+ readonly properties: {
128
+ readonly image: {
129
+ readonly oneOf: readonly [{
130
+ readonly type: "object";
131
+ readonly properties: {
132
+ readonly data: {
133
+ readonly type: "array";
134
+ readonly items: {
135
+ readonly type: "number";
136
+ readonly format: "Uint8Clamped";
137
+ };
138
+ readonly format: "Uint8ClampedArray";
139
+ readonly title: "Data";
140
+ readonly description: "Pixel data of the image";
141
+ };
142
+ readonly width: {
143
+ readonly type: "integer";
144
+ readonly minimum: 1;
145
+ readonly title: "Width";
146
+ readonly description: "Width in pixels";
147
+ };
148
+ readonly height: {
149
+ readonly type: "integer";
150
+ readonly minimum: 1;
151
+ readonly title: "Height";
152
+ readonly description: "Height in pixels";
153
+ };
154
+ readonly channels: {
155
+ readonly type: "integer";
156
+ readonly enum: readonly [1, 3, 4];
157
+ readonly title: "Channels";
158
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
159
+ };
160
+ };
161
+ readonly additionalProperties: false;
162
+ readonly required: readonly ["data", "width", "height", "channels"];
163
+ readonly format: "image:ImageBinary";
164
+ readonly title: "Image";
165
+ readonly description: "Raw pixel image data";
166
+ }, {
167
+ readonly type: "string";
168
+ readonly format: "image:data-uri";
169
+ readonly title: string;
170
+ readonly description: string;
171
+ }];
172
+ };
173
+ readonly direction: {
174
+ readonly type: "string";
175
+ readonly enum: readonly ["horizontal", "vertical"];
176
+ readonly title: "Direction";
177
+ readonly description: "Flip direction";
178
+ };
179
+ };
180
+ readonly required: readonly ["image", "direction"];
181
+ readonly additionalProperties: false;
182
+ };
183
+ static outputSchema(): {
184
+ readonly type: "object";
185
+ readonly properties: {
186
+ readonly image: {
187
+ readonly oneOf: readonly [{
188
+ readonly type: "object";
189
+ readonly properties: {
190
+ readonly data: {
191
+ readonly type: "array";
192
+ readonly items: {
193
+ readonly type: "number";
194
+ readonly format: "Uint8Clamped";
195
+ };
196
+ readonly format: "Uint8ClampedArray";
197
+ readonly title: "Data";
198
+ readonly description: "Pixel data of the image";
199
+ };
200
+ readonly width: {
201
+ readonly type: "integer";
202
+ readonly minimum: 1;
203
+ readonly title: "Width";
204
+ readonly description: "Width in pixels";
205
+ };
206
+ readonly height: {
207
+ readonly type: "integer";
208
+ readonly minimum: 1;
209
+ readonly title: "Height";
210
+ readonly description: "Height in pixels";
211
+ };
212
+ readonly channels: {
213
+ readonly type: "integer";
214
+ readonly enum: readonly [1, 3, 4];
215
+ readonly title: "Channels";
216
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
217
+ };
218
+ };
219
+ readonly additionalProperties: false;
220
+ readonly required: readonly ["data", "width", "height", "channels"];
221
+ readonly format: "image:ImageBinary";
222
+ readonly title: "Image";
223
+ readonly description: "Raw pixel image data";
224
+ }, {
225
+ readonly type: "string";
226
+ readonly format: "image:data-uri";
227
+ readonly title: string;
228
+ readonly description: string;
229
+ }];
202
230
  };
203
231
  };
204
232
  readonly required: readonly ["image"];
@@ -1 +1 @@
1
- {"version":3,"file":"ImageFlipTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImageFlipTask.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,QAAQ;qBACd,IAAI;qBACJ,KAAK,EAAE,WAAW;qBAClB,WAAW,EAAE,gBAAgB;;;;;CAKA,CAAC;AAEpC,QAAA,MAAM,YAAY;mBACV,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI0B,CAAC;AAEpC,MAAM,MAAM,k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M,EACf,QAAQ,EAAE,uBAAuB,GAChC,OAAO,CAAC,MAAM,CAAC,CA4BjB;CACF;AAED,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,SAAS,EAAE,cAAc,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,CAAC,CAAC;KAChF;CACF"}
@@ -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 ImageGrayscaleTaskInput = ImageFromSchema<typeof inputSchema>;
99
- export type ImageGrayscaleTaskOutput = ImageFromSchema<typeof outputSchema>;
100
- export declare class ImageGrayscaleTask<Input extends ImageGrayscaleTaskInput = ImageGrayscaleTaskInput, Output extends ImageGrayscaleTaskOutput = ImageGrayscaleTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
101
- static readonly type = "ImageGrayscaleTask";
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 ImageGrayscaleTask<Input extends ImageGrayscaleTaskInput =
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 ImageGrayscaleTask<Input extends ImageGrayscaleTaskInput =
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 ImageGrayscaleTaskInput = ImageFromSchema<typeof inputSchema>;
113
+ export type ImageGrayscaleTaskOutput = ImageFromSchema<typeof outputSchema>;
114
+ export declare class ImageGrayscaleTask<Input extends ImageGrayscaleTaskInput = ImageGrayscaleTaskInput, Output extends ImageGrayscaleTaskOutput = ImageGrayscaleTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
115
+ static readonly type = "ImageGrayscaleTask";
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
- {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