@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.
- package/dist/browser.d.ts +4 -3
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +9764 -9174
- package/dist/browser.js.map +58 -50
- package/dist/bun.d.ts +5 -3
- package/dist/bun.d.ts.map +1 -1
- package/dist/bun.js +9893 -9204
- package/dist/bun.js.map +60 -51
- package/dist/common.d.ts +80 -74
- package/dist/common.d.ts.map +1 -1
- package/dist/node.d.ts +5 -3
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +9893 -9204
- package/dist/node.js.map +60 -51
- package/dist/task/FetchUrlTask.d.ts +13 -0
- package/dist/task/FetchUrlTask.d.ts.map +1 -1
- package/dist/task/FileLoaderTask.d.ts +2 -2
- package/dist/task/FileLoaderTask.d.ts.map +1 -1
- package/dist/task/FileLoaderTask.server.d.ts.map +1 -1
- package/dist/task/image/ImageBlurTask.d.ts +148 -120
- package/dist/task/image/ImageBlurTask.d.ts.map +1 -1
- package/dist/task/image/ImageBorderTask.d.ts +148 -120
- package/dist/task/image/ImageBorderTask.d.ts.map +1 -1
- package/dist/task/image/ImageBrightnessTask.d.ts +148 -120
- package/dist/task/image/ImageBrightnessTask.d.ts.map +1 -1
- package/dist/task/image/ImageContrastTask.d.ts +148 -120
- package/dist/task/image/ImageContrastTask.d.ts.map +1 -1
- package/dist/task/image/ImageCropTask.d.ts +148 -120
- package/dist/task/image/ImageCropTask.d.ts.map +1 -1
- package/dist/task/image/ImageFlipTask.d.ts +143 -115
- package/dist/task/image/ImageFlipTask.d.ts.map +1 -1
- package/dist/task/image/ImageGrayscaleTask.d.ts +132 -104
- package/dist/task/image/ImageGrayscaleTask.d.ts.map +1 -1
- package/dist/task/image/ImageInvertTask.d.ts +132 -104
- package/dist/task/image/ImageInvertTask.d.ts.map +1 -1
- package/dist/task/image/ImagePixelateTask.d.ts +146 -118
- package/dist/task/image/ImagePixelateTask.d.ts.map +1 -1
- package/dist/task/image/ImagePosterizeTask.d.ts +148 -120
- package/dist/task/image/ImagePosterizeTask.d.ts.map +1 -1
- package/dist/task/image/ImageResizeTask.d.ts +148 -120
- package/dist/task/image/ImageResizeTask.d.ts.map +1 -1
- package/dist/task/image/ImageRotateTask.d.ts +144 -116
- package/dist/task/image/ImageRotateTask.d.ts.map +1 -1
- package/dist/task/image/ImageSchemas.d.ts +46 -0
- package/dist/task/image/ImageSchemas.d.ts.map +1 -1
- package/dist/task/image/ImageSepiaTask.d.ts +132 -104
- package/dist/task/image/ImageSepiaTask.d.ts.map +1 -1
- package/dist/task/image/ImageThresholdTask.d.ts +148 -120
- package/dist/task/image/ImageThresholdTask.d.ts.map +1 -1
- package/dist/task/image/ImageTintTask.d.ts +148 -120
- package/dist/task/image/ImageTintTask.d.ts.map +1 -1
- package/dist/task/image/ImageTransparencyTask.d.ts +146 -118
- package/dist/task/image/ImageTransparencyTask.d.ts.map +1 -1
- package/dist/task/image/ImageWatermarkTask.d.ts +148 -120
- package/dist/task/image/ImageWatermarkTask.d.ts.map +1 -1
- package/dist/task/image/imageCodecLimits.d.ts +80 -0
- package/dist/task/image/imageCodecLimits.d.ts.map +1 -0
- package/dist/task/image/imageRasterCodecBrowser.d.ts +8 -0
- package/dist/task/image/imageRasterCodecBrowser.d.ts.map +1 -0
- package/dist/task/image/imageRasterCodecNode.d.ts +8 -0
- package/dist/task/image/imageRasterCodecNode.d.ts.map +1 -0
- package/dist/task/image/imageRasterCodecRegistry.d.ts +13 -0
- package/dist/task/image/imageRasterCodecRegistry.d.ts.map +1 -0
- package/dist/task/image/imageTaskIo.d.ts +12 -0
- package/dist/task/image/imageTaskIo.d.ts.map +1 -0
- package/dist/task/image/imageTaskTransport.d.ts +21 -0
- package/dist/task/image/imageTaskTransport.d.ts.map +1 -0
- package/dist/task/image/registerImageRasterCodec.browser.d.ts +7 -0
- package/dist/task/image/registerImageRasterCodec.browser.d.ts.map +1 -0
- package/dist/task/image/registerImageRasterCodec.node.d.ts +7 -0
- package/dist/task/image/registerImageRasterCodec.node.d.ts.map +1 -0
- package/dist/util/SafeFetch.d.ts +51 -0
- package/dist/util/SafeFetch.d.ts.map +1 -0
- package/dist/util/SafeFetch.server.d.ts +22 -0
- package/dist/util/SafeFetch.server.d.ts.map +1 -0
- package/dist/util/UrlClassifier.d.ts +64 -0
- package/dist/util/UrlClassifier.d.ts.map +1 -0
- package/package.json +18 -11
|
@@ -9,111 +9,7 @@ declare const inputSchema: {
|
|
|
9
9
|
readonly type: "object";
|
|
10
10
|
readonly properties: {
|
|
11
11
|
readonly image: {
|
|
12
|
-
readonly
|
|
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 amount: {
|
|
50
|
-
readonly type: "number";
|
|
51
|
-
readonly title: "Amount";
|
|
52
|
-
readonly description: "Contrast adjustment (-100 to 100)";
|
|
53
|
-
readonly minimum: -100;
|
|
54
|
-
readonly maximum: 100;
|
|
55
|
-
readonly default: 0;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
readonly required: readonly ["image"];
|
|
59
|
-
readonly additionalProperties: false;
|
|
60
|
-
};
|
|
61
|
-
declare const outputSchema: {
|
|
62
|
-
readonly type: "object";
|
|
63
|
-
readonly properties: {
|
|
64
|
-
readonly image: {
|
|
65
|
-
readonly type: "object";
|
|
66
|
-
readonly properties: {
|
|
67
|
-
readonly data: {
|
|
68
|
-
readonly type: "array";
|
|
69
|
-
readonly items: {
|
|
70
|
-
readonly type: "number";
|
|
71
|
-
readonly format: "Uint8Clamped";
|
|
72
|
-
};
|
|
73
|
-
readonly format: "Uint8ClampedArray";
|
|
74
|
-
readonly title: "Data";
|
|
75
|
-
readonly description: "Pixel data of the image";
|
|
76
|
-
};
|
|
77
|
-
readonly width: {
|
|
78
|
-
readonly type: "integer";
|
|
79
|
-
readonly minimum: 1;
|
|
80
|
-
readonly title: "Width";
|
|
81
|
-
readonly description: "Width in pixels";
|
|
82
|
-
};
|
|
83
|
-
readonly height: {
|
|
84
|
-
readonly type: "integer";
|
|
85
|
-
readonly minimum: 1;
|
|
86
|
-
readonly title: "Height";
|
|
87
|
-
readonly description: "Height in pixels";
|
|
88
|
-
};
|
|
89
|
-
readonly channels: {
|
|
90
|
-
readonly type: "integer";
|
|
91
|
-
readonly enum: readonly [1, 3, 4];
|
|
92
|
-
readonly title: "Channels";
|
|
93
|
-
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
readonly additionalProperties: false;
|
|
97
|
-
readonly required: readonly ["data", "width", "height", "channels"];
|
|
98
|
-
readonly format: "image:ImageBinary";
|
|
99
|
-
readonly title: "Image";
|
|
100
|
-
readonly description: "Raw pixel image data";
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
readonly required: readonly ["image"];
|
|
104
|
-
readonly additionalProperties: false;
|
|
105
|
-
};
|
|
106
|
-
export type ImageContrastTaskInput = ImageFromSchema<typeof inputSchema>;
|
|
107
|
-
export type ImageContrastTaskOutput = ImageFromSchema<typeof outputSchema>;
|
|
108
|
-
export declare class ImageContrastTask<Input extends ImageContrastTaskInput = ImageContrastTaskInput, Output extends ImageContrastTaskOutput = ImageContrastTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
|
|
109
|
-
static readonly type = "ImageContrastTask";
|
|
110
|
-
static readonly category = "Image";
|
|
111
|
-
static title: string;
|
|
112
|
-
static description: string;
|
|
113
|
-
static inputSchema(): {
|
|
114
|
-
readonly type: "object";
|
|
115
|
-
readonly properties: {
|
|
116
|
-
readonly image: {
|
|
12
|
+
readonly oneOf: readonly [{
|
|
117
13
|
readonly type: "object";
|
|
118
14
|
readonly properties: {
|
|
119
15
|
readonly data: {
|
|
@@ -150,23 +46,30 @@ export declare class ImageContrastTask<Input extends ImageContrastTaskInput = Im
|
|
|
150
46
|
readonly format: "image:ImageBinary";
|
|
151
47
|
readonly title: "Image";
|
|
152
48
|
readonly description: "Raw pixel image data";
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
readonly
|
|
156
|
-
readonly title:
|
|
157
|
-
readonly description:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
49
|
+
}, {
|
|
50
|
+
readonly type: "string";
|
|
51
|
+
readonly format: "image:data-uri";
|
|
52
|
+
readonly title: string;
|
|
53
|
+
readonly description: string;
|
|
54
|
+
}];
|
|
55
|
+
};
|
|
56
|
+
readonly amount: {
|
|
57
|
+
readonly type: "number";
|
|
58
|
+
readonly title: "Amount";
|
|
59
|
+
readonly description: "Contrast adjustment (-100 to 100)";
|
|
60
|
+
readonly minimum: -100;
|
|
61
|
+
readonly maximum: 100;
|
|
62
|
+
readonly default: 0;
|
|
162
63
|
};
|
|
163
|
-
readonly required: readonly ["image"];
|
|
164
|
-
readonly additionalProperties: false;
|
|
165
64
|
};
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
65
|
+
readonly required: readonly ["image"];
|
|
66
|
+
readonly additionalProperties: false;
|
|
67
|
+
};
|
|
68
|
+
declare const outputSchema: {
|
|
69
|
+
readonly type: "object";
|
|
70
|
+
readonly properties: {
|
|
71
|
+
readonly image: {
|
|
72
|
+
readonly oneOf: readonly [{
|
|
170
73
|
readonly type: "object";
|
|
171
74
|
readonly properties: {
|
|
172
75
|
readonly data: {
|
|
@@ -203,6 +106,131 @@ export declare class ImageContrastTask<Input extends ImageContrastTaskInput = Im
|
|
|
203
106
|
readonly format: "image:ImageBinary";
|
|
204
107
|
readonly title: "Image";
|
|
205
108
|
readonly description: "Raw pixel image data";
|
|
109
|
+
}, {
|
|
110
|
+
readonly type: "string";
|
|
111
|
+
readonly format: "image:data-uri";
|
|
112
|
+
readonly title: string;
|
|
113
|
+
readonly description: string;
|
|
114
|
+
}];
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
readonly required: readonly ["image"];
|
|
118
|
+
readonly additionalProperties: false;
|
|
119
|
+
};
|
|
120
|
+
export type ImageContrastTaskInput = ImageFromSchema<typeof inputSchema>;
|
|
121
|
+
export type ImageContrastTaskOutput = ImageFromSchema<typeof outputSchema>;
|
|
122
|
+
export declare class ImageContrastTask<Input extends ImageContrastTaskInput = ImageContrastTaskInput, Output extends ImageContrastTaskOutput = ImageContrastTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
|
|
123
|
+
static readonly type = "ImageContrastTask";
|
|
124
|
+
static readonly category = "Image";
|
|
125
|
+
static title: string;
|
|
126
|
+
static description: string;
|
|
127
|
+
static inputSchema(): {
|
|
128
|
+
readonly type: "object";
|
|
129
|
+
readonly properties: {
|
|
130
|
+
readonly image: {
|
|
131
|
+
readonly oneOf: readonly [{
|
|
132
|
+
readonly type: "object";
|
|
133
|
+
readonly properties: {
|
|
134
|
+
readonly data: {
|
|
135
|
+
readonly type: "array";
|
|
136
|
+
readonly items: {
|
|
137
|
+
readonly type: "number";
|
|
138
|
+
readonly format: "Uint8Clamped";
|
|
139
|
+
};
|
|
140
|
+
readonly format: "Uint8ClampedArray";
|
|
141
|
+
readonly title: "Data";
|
|
142
|
+
readonly description: "Pixel data of the image";
|
|
143
|
+
};
|
|
144
|
+
readonly width: {
|
|
145
|
+
readonly type: "integer";
|
|
146
|
+
readonly minimum: 1;
|
|
147
|
+
readonly title: "Width";
|
|
148
|
+
readonly description: "Width in pixels";
|
|
149
|
+
};
|
|
150
|
+
readonly height: {
|
|
151
|
+
readonly type: "integer";
|
|
152
|
+
readonly minimum: 1;
|
|
153
|
+
readonly title: "Height";
|
|
154
|
+
readonly description: "Height in pixels";
|
|
155
|
+
};
|
|
156
|
+
readonly channels: {
|
|
157
|
+
readonly type: "integer";
|
|
158
|
+
readonly enum: readonly [1, 3, 4];
|
|
159
|
+
readonly title: "Channels";
|
|
160
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
readonly additionalProperties: false;
|
|
164
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
165
|
+
readonly format: "image:ImageBinary";
|
|
166
|
+
readonly title: "Image";
|
|
167
|
+
readonly description: "Raw pixel image data";
|
|
168
|
+
}, {
|
|
169
|
+
readonly type: "string";
|
|
170
|
+
readonly format: "image:data-uri";
|
|
171
|
+
readonly title: string;
|
|
172
|
+
readonly description: string;
|
|
173
|
+
}];
|
|
174
|
+
};
|
|
175
|
+
readonly amount: {
|
|
176
|
+
readonly type: "number";
|
|
177
|
+
readonly title: "Amount";
|
|
178
|
+
readonly description: "Contrast adjustment (-100 to 100)";
|
|
179
|
+
readonly minimum: -100;
|
|
180
|
+
readonly maximum: 100;
|
|
181
|
+
readonly default: 0;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
readonly required: readonly ["image"];
|
|
185
|
+
readonly additionalProperties: false;
|
|
186
|
+
};
|
|
187
|
+
static outputSchema(): {
|
|
188
|
+
readonly type: "object";
|
|
189
|
+
readonly properties: {
|
|
190
|
+
readonly image: {
|
|
191
|
+
readonly oneOf: readonly [{
|
|
192
|
+
readonly type: "object";
|
|
193
|
+
readonly properties: {
|
|
194
|
+
readonly data: {
|
|
195
|
+
readonly type: "array";
|
|
196
|
+
readonly items: {
|
|
197
|
+
readonly type: "number";
|
|
198
|
+
readonly format: "Uint8Clamped";
|
|
199
|
+
};
|
|
200
|
+
readonly format: "Uint8ClampedArray";
|
|
201
|
+
readonly title: "Data";
|
|
202
|
+
readonly description: "Pixel data of the image";
|
|
203
|
+
};
|
|
204
|
+
readonly width: {
|
|
205
|
+
readonly type: "integer";
|
|
206
|
+
readonly minimum: 1;
|
|
207
|
+
readonly title: "Width";
|
|
208
|
+
readonly description: "Width in pixels";
|
|
209
|
+
};
|
|
210
|
+
readonly height: {
|
|
211
|
+
readonly type: "integer";
|
|
212
|
+
readonly minimum: 1;
|
|
213
|
+
readonly title: "Height";
|
|
214
|
+
readonly description: "Height in pixels";
|
|
215
|
+
};
|
|
216
|
+
readonly channels: {
|
|
217
|
+
readonly type: "integer";
|
|
218
|
+
readonly enum: readonly [1, 3, 4];
|
|
219
|
+
readonly title: "Channels";
|
|
220
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
readonly additionalProperties: false;
|
|
224
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
225
|
+
readonly format: "image:ImageBinary";
|
|
226
|
+
readonly title: "Image";
|
|
227
|
+
readonly description: "Raw pixel image data";
|
|
228
|
+
}, {
|
|
229
|
+
readonly type: "string";
|
|
230
|
+
readonly format: "image:data-uri";
|
|
231
|
+
readonly title: string;
|
|
232
|
+
readonly description: string;
|
|
233
|
+
}];
|
|
206
234
|
};
|
|
207
235
|
};
|
|
208
236
|
readonly required: readonly ["image"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageContrastTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImageContrastTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,IAAI,EACJ,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,
|
|
1
|
+
{"version":3,"file":"ImageContrastTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImageContrastTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,IAAI,EACJ,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAA8B,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAG7E,QAAA,MAAM,WAAW;mBACT,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBACL,MAAM;qBACJ,IAAI,EAAE,QAAQ;qBACd,KAAK,EAAE,QAAQ;qBACf,WAAW,EAAE,mCAAmC;qBAChD,OAAO,EAAE,CAAC,GAAG;qBACb,OAAO,EAAE,GAAG;qBACZ,OAAO,EAAE,CAAC;;;;;CAKmB,CAAC;AAEpC,QAAA,MAAM,YAAY;mBACV,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI0B,CAAC;AAEpC,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC,OAAO,WAAW,CAAC,CAAC;AACzE,MAAM,MAAM,uBAAuB,GAAG,eAAe,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3E,qBAAa,iBAAiB,CAC5B,KAAK,SAAS,sBAAsB,GAAG,sBAAsB,EAC7D,MAAM,SAAS,uBAAuB,GAAG,uBAAuB,EAChE,MAAM,SAAS,UAAU,GAAG,UAAU,CACtC,SAAQ,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IACnC,gBAAyB,IAAI,uBAAuB;IACpD,gBAAyB,QAAQ,WAAW;IAC5C,OAAuB,KAAK,SAAqB;IACjD,OAAuB,WAAW,SAAsC;IAExE,OAAgB,WAAW;uBAtCrB,QAAQ;;qBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBACL,MAAM;yBACJ,IAAI,EAAE,QAAQ;yBACd,KAAK,EAAE,QAAQ;yBACf,WAAW,EAAE,mCAAmC;yBAChD,OAAO,EAAE,CAAC,GAAG;yBACb,OAAO,EAAE,GAAG;yBACZ,OAAO,EAAE,CAAC;;;;;MA+Bb;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,CA8BjB;CACF;AAED,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,aAAa,EAAE,cAAc,CAAC,sBAAsB,EAAE,uBAAuB,EAAE,UAAU,CAAC,CAAC;KAC5F;CACF"}
|
|
@@ -9,42 +9,49 @@ declare const inputSchema: {
|
|
|
9
9
|
readonly type: "object";
|
|
10
10
|
readonly properties: {
|
|
11
11
|
readonly image: {
|
|
12
|
-
readonly
|
|
13
|
-
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
|
|
17
|
-
readonly
|
|
18
|
-
|
|
12
|
+
readonly oneOf: readonly [{
|
|
13
|
+
readonly type: "object";
|
|
14
|
+
readonly properties: {
|
|
15
|
+
readonly data: {
|
|
16
|
+
readonly type: "array";
|
|
17
|
+
readonly items: {
|
|
18
|
+
readonly type: "number";
|
|
19
|
+
readonly format: "Uint8Clamped";
|
|
20
|
+
};
|
|
21
|
+
readonly format: "Uint8ClampedArray";
|
|
22
|
+
readonly title: "Data";
|
|
23
|
+
readonly description: "Pixel data of the image";
|
|
24
|
+
};
|
|
25
|
+
readonly width: {
|
|
26
|
+
readonly type: "integer";
|
|
27
|
+
readonly minimum: 1;
|
|
28
|
+
readonly title: "Width";
|
|
29
|
+
readonly description: "Width in pixels";
|
|
30
|
+
};
|
|
31
|
+
readonly height: {
|
|
32
|
+
readonly type: "integer";
|
|
33
|
+
readonly minimum: 1;
|
|
34
|
+
readonly title: "Height";
|
|
35
|
+
readonly description: "Height in pixels";
|
|
36
|
+
};
|
|
37
|
+
readonly channels: {
|
|
38
|
+
readonly type: "integer";
|
|
39
|
+
readonly enum: readonly [1, 3, 4];
|
|
40
|
+
readonly title: "Channels";
|
|
41
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
19
42
|
};
|
|
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
43
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
readonly additionalProperties: false;
|
|
45
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
46
|
+
readonly format: "image:ImageBinary";
|
|
47
|
+
readonly title: "Image";
|
|
48
|
+
readonly description: "Raw pixel image data";
|
|
49
|
+
}, {
|
|
50
|
+
readonly type: "string";
|
|
51
|
+
readonly format: "image:data-uri";
|
|
52
|
+
readonly title: string;
|
|
53
|
+
readonly description: string;
|
|
54
|
+
}];
|
|
48
55
|
};
|
|
49
56
|
readonly x: {
|
|
50
57
|
readonly type: "integer";
|
|
@@ -78,58 +85,7 @@ declare const outputSchema: {
|
|
|
78
85
|
readonly type: "object";
|
|
79
86
|
readonly properties: {
|
|
80
87
|
readonly image: {
|
|
81
|
-
readonly
|
|
82
|
-
readonly properties: {
|
|
83
|
-
readonly data: {
|
|
84
|
-
readonly type: "array";
|
|
85
|
-
readonly items: {
|
|
86
|
-
readonly type: "number";
|
|
87
|
-
readonly format: "Uint8Clamped";
|
|
88
|
-
};
|
|
89
|
-
readonly format: "Uint8ClampedArray";
|
|
90
|
-
readonly title: "Data";
|
|
91
|
-
readonly description: "Pixel data of the image";
|
|
92
|
-
};
|
|
93
|
-
readonly width: {
|
|
94
|
-
readonly type: "integer";
|
|
95
|
-
readonly minimum: 1;
|
|
96
|
-
readonly title: "Width";
|
|
97
|
-
readonly description: "Width in pixels";
|
|
98
|
-
};
|
|
99
|
-
readonly height: {
|
|
100
|
-
readonly type: "integer";
|
|
101
|
-
readonly minimum: 1;
|
|
102
|
-
readonly title: "Height";
|
|
103
|
-
readonly description: "Height in pixels";
|
|
104
|
-
};
|
|
105
|
-
readonly channels: {
|
|
106
|
-
readonly type: "integer";
|
|
107
|
-
readonly enum: readonly [1, 3, 4];
|
|
108
|
-
readonly title: "Channels";
|
|
109
|
-
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
readonly additionalProperties: false;
|
|
113
|
-
readonly required: readonly ["data", "width", "height", "channels"];
|
|
114
|
-
readonly format: "image:ImageBinary";
|
|
115
|
-
readonly title: "Image";
|
|
116
|
-
readonly description: "Raw pixel image data";
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
readonly required: readonly ["image"];
|
|
120
|
-
readonly additionalProperties: false;
|
|
121
|
-
};
|
|
122
|
-
export type ImageCropTaskInput = ImageFromSchema<typeof inputSchema>;
|
|
123
|
-
export type ImageCropTaskOutput = ImageFromSchema<typeof outputSchema>;
|
|
124
|
-
export declare class ImageCropTask<Input extends ImageCropTaskInput = ImageCropTaskInput, Output extends ImageCropTaskOutput = ImageCropTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
|
|
125
|
-
static readonly type = "ImageCropTask";
|
|
126
|
-
static readonly category = "Image";
|
|
127
|
-
static title: string;
|
|
128
|
-
static description: string;
|
|
129
|
-
static inputSchema(): {
|
|
130
|
-
readonly type: "object";
|
|
131
|
-
readonly properties: {
|
|
132
|
-
readonly image: {
|
|
88
|
+
readonly oneOf: readonly [{
|
|
133
89
|
readonly type: "object";
|
|
134
90
|
readonly properties: {
|
|
135
91
|
readonly data: {
|
|
@@ -166,6 +122,71 @@ export declare class ImageCropTask<Input extends ImageCropTaskInput = ImageCropT
|
|
|
166
122
|
readonly format: "image:ImageBinary";
|
|
167
123
|
readonly title: "Image";
|
|
168
124
|
readonly description: "Raw pixel image data";
|
|
125
|
+
}, {
|
|
126
|
+
readonly type: "string";
|
|
127
|
+
readonly format: "image:data-uri";
|
|
128
|
+
readonly title: string;
|
|
129
|
+
readonly description: string;
|
|
130
|
+
}];
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
readonly required: readonly ["image"];
|
|
134
|
+
readonly additionalProperties: false;
|
|
135
|
+
};
|
|
136
|
+
export type ImageCropTaskInput = ImageFromSchema<typeof inputSchema>;
|
|
137
|
+
export type ImageCropTaskOutput = ImageFromSchema<typeof outputSchema>;
|
|
138
|
+
export declare class ImageCropTask<Input extends ImageCropTaskInput = ImageCropTaskInput, Output extends ImageCropTaskOutput = ImageCropTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
|
|
139
|
+
static readonly type = "ImageCropTask";
|
|
140
|
+
static readonly category = "Image";
|
|
141
|
+
static title: string;
|
|
142
|
+
static description: string;
|
|
143
|
+
static inputSchema(): {
|
|
144
|
+
readonly type: "object";
|
|
145
|
+
readonly properties: {
|
|
146
|
+
readonly image: {
|
|
147
|
+
readonly oneOf: readonly [{
|
|
148
|
+
readonly type: "object";
|
|
149
|
+
readonly properties: {
|
|
150
|
+
readonly data: {
|
|
151
|
+
readonly type: "array";
|
|
152
|
+
readonly items: {
|
|
153
|
+
readonly type: "number";
|
|
154
|
+
readonly format: "Uint8Clamped";
|
|
155
|
+
};
|
|
156
|
+
readonly format: "Uint8ClampedArray";
|
|
157
|
+
readonly title: "Data";
|
|
158
|
+
readonly description: "Pixel data of the image";
|
|
159
|
+
};
|
|
160
|
+
readonly width: {
|
|
161
|
+
readonly type: "integer";
|
|
162
|
+
readonly minimum: 1;
|
|
163
|
+
readonly title: "Width";
|
|
164
|
+
readonly description: "Width in pixels";
|
|
165
|
+
};
|
|
166
|
+
readonly height: {
|
|
167
|
+
readonly type: "integer";
|
|
168
|
+
readonly minimum: 1;
|
|
169
|
+
readonly title: "Height";
|
|
170
|
+
readonly description: "Height in pixels";
|
|
171
|
+
};
|
|
172
|
+
readonly channels: {
|
|
173
|
+
readonly type: "integer";
|
|
174
|
+
readonly enum: readonly [1, 3, 4];
|
|
175
|
+
readonly title: "Channels";
|
|
176
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
readonly additionalProperties: false;
|
|
180
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
181
|
+
readonly format: "image:ImageBinary";
|
|
182
|
+
readonly title: "Image";
|
|
183
|
+
readonly description: "Raw pixel image data";
|
|
184
|
+
}, {
|
|
185
|
+
readonly type: "string";
|
|
186
|
+
readonly format: "image:data-uri";
|
|
187
|
+
readonly title: string;
|
|
188
|
+
readonly description: string;
|
|
189
|
+
}];
|
|
169
190
|
};
|
|
170
191
|
readonly x: {
|
|
171
192
|
readonly type: "integer";
|
|
@@ -199,42 +220,49 @@ export declare class ImageCropTask<Input extends ImageCropTaskInput = ImageCropT
|
|
|
199
220
|
readonly type: "object";
|
|
200
221
|
readonly properties: {
|
|
201
222
|
readonly image: {
|
|
202
|
-
readonly
|
|
203
|
-
|
|
204
|
-
readonly
|
|
205
|
-
readonly
|
|
206
|
-
|
|
207
|
-
readonly
|
|
208
|
-
|
|
223
|
+
readonly oneOf: readonly [{
|
|
224
|
+
readonly type: "object";
|
|
225
|
+
readonly properties: {
|
|
226
|
+
readonly data: {
|
|
227
|
+
readonly type: "array";
|
|
228
|
+
readonly items: {
|
|
229
|
+
readonly type: "number";
|
|
230
|
+
readonly format: "Uint8Clamped";
|
|
231
|
+
};
|
|
232
|
+
readonly format: "Uint8ClampedArray";
|
|
233
|
+
readonly title: "Data";
|
|
234
|
+
readonly description: "Pixel data of the image";
|
|
235
|
+
};
|
|
236
|
+
readonly width: {
|
|
237
|
+
readonly type: "integer";
|
|
238
|
+
readonly minimum: 1;
|
|
239
|
+
readonly title: "Width";
|
|
240
|
+
readonly description: "Width in pixels";
|
|
241
|
+
};
|
|
242
|
+
readonly height: {
|
|
243
|
+
readonly type: "integer";
|
|
244
|
+
readonly minimum: 1;
|
|
245
|
+
readonly title: "Height";
|
|
246
|
+
readonly description: "Height in pixels";
|
|
247
|
+
};
|
|
248
|
+
readonly channels: {
|
|
249
|
+
readonly type: "integer";
|
|
250
|
+
readonly enum: readonly [1, 3, 4];
|
|
251
|
+
readonly title: "Channels";
|
|
252
|
+
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
209
253
|
};
|
|
210
|
-
readonly format: "Uint8ClampedArray";
|
|
211
|
-
readonly title: "Data";
|
|
212
|
-
readonly description: "Pixel data of the image";
|
|
213
|
-
};
|
|
214
|
-
readonly width: {
|
|
215
|
-
readonly type: "integer";
|
|
216
|
-
readonly minimum: 1;
|
|
217
|
-
readonly title: "Width";
|
|
218
|
-
readonly description: "Width in pixels";
|
|
219
|
-
};
|
|
220
|
-
readonly height: {
|
|
221
|
-
readonly type: "integer";
|
|
222
|
-
readonly minimum: 1;
|
|
223
|
-
readonly title: "Height";
|
|
224
|
-
readonly description: "Height in pixels";
|
|
225
|
-
};
|
|
226
|
-
readonly channels: {
|
|
227
|
-
readonly type: "integer";
|
|
228
|
-
readonly enum: readonly [1, 3, 4];
|
|
229
|
-
readonly title: "Channels";
|
|
230
|
-
readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
|
|
231
254
|
};
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
255
|
+
readonly additionalProperties: false;
|
|
256
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
257
|
+
readonly format: "image:ImageBinary";
|
|
258
|
+
readonly title: "Image";
|
|
259
|
+
readonly description: "Raw pixel image data";
|
|
260
|
+
}, {
|
|
261
|
+
readonly type: "string";
|
|
262
|
+
readonly format: "image:data-uri";
|
|
263
|
+
readonly title: string;
|
|
264
|
+
readonly description: string;
|
|
265
|
+
}];
|
|
238
266
|
};
|
|
239
267
|
};
|
|
240
268
|
readonly required: readonly ["image"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageCropTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImageCropTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,IAAI,EACJ,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,
|
|
1
|
+
{"version":3,"file":"ImageCropT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