@workglow/tasks 0.2.0 → 0.2.2

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 (69) hide show
  1. package/dist/browser.d.ts +4 -3
  2. package/dist/browser.d.ts.map +1 -1
  3. package/dist/browser.js +9406 -7907
  4. package/dist/browser.js.map +55 -32
  5. package/dist/bun.d.ts +4 -3
  6. package/dist/bun.d.ts.map +1 -1
  7. package/dist/bun.js +9369 -7898
  8. package/dist/bun.js.map +56 -33
  9. package/dist/common.d.ts +77 -39
  10. package/dist/common.d.ts.map +1 -1
  11. package/dist/node.d.ts +4 -3
  12. package/dist/node.d.ts.map +1 -1
  13. package/dist/node.js +9369 -7898
  14. package/dist/node.js.map +56 -33
  15. package/dist/task/FetchUrlTask.d.ts.map +1 -1
  16. package/dist/task/FileLoaderTask.d.ts +2 -2
  17. package/dist/task/FileLoaderTask.d.ts.map +1 -1
  18. package/dist/task/FileLoaderTask.server.d.ts.map +1 -1
  19. package/dist/task/image/ImageBlurTask.d.ts +247 -0
  20. package/dist/task/image/ImageBlurTask.d.ts.map +1 -0
  21. package/dist/task/image/ImageBorderTask.d.ts +309 -0
  22. package/dist/task/image/ImageBorderTask.d.ts.map +1 -0
  23. package/dist/task/image/ImageBrightnessTask.d.ts +247 -0
  24. package/dist/task/image/ImageBrightnessTask.d.ts.map +1 -0
  25. package/dist/task/image/ImageContrastTask.d.ts +247 -0
  26. package/dist/task/image/ImageContrastTask.d.ts.map +1 -0
  27. package/dist/task/image/ImageCropTask.d.ts +279 -0
  28. package/dist/task/image/ImageCropTask.d.ts.map +1 -0
  29. package/dist/task/image/ImageFlipTask.d.ts +243 -0
  30. package/dist/task/image/ImageFlipTask.d.ts.map +1 -0
  31. package/dist/task/image/ImageGrayscaleTask.d.ts +231 -0
  32. package/dist/task/image/ImageGrayscaleTask.d.ts.map +1 -0
  33. package/dist/task/image/ImageInvertTask.d.ts +231 -0
  34. package/dist/task/image/ImageInvertTask.d.ts.map +1 -0
  35. package/dist/task/image/ImagePixelateTask.d.ts +245 -0
  36. package/dist/task/image/ImagePixelateTask.d.ts.map +1 -0
  37. package/dist/task/image/ImagePosterizeTask.d.ts +247 -0
  38. package/dist/task/image/ImagePosterizeTask.d.ts.map +1 -0
  39. package/dist/task/image/ImageResizeTask.d.ts +255 -0
  40. package/dist/task/image/ImageResizeTask.d.ts.map +1 -0
  41. package/dist/task/image/ImageRotateTask.d.ts +243 -0
  42. package/dist/task/image/ImageRotateTask.d.ts.map +1 -0
  43. package/dist/task/image/ImageSchemas.d.ts +140 -0
  44. package/dist/task/image/ImageSchemas.d.ts.map +1 -0
  45. package/dist/task/image/ImageSepiaTask.d.ts +231 -0
  46. package/dist/task/image/ImageSepiaTask.d.ts.map +1 -0
  47. package/dist/task/image/ImageThresholdTask.d.ts +247 -0
  48. package/dist/task/image/ImageThresholdTask.d.ts.map +1 -0
  49. package/dist/task/image/ImageTintTask.d.ts +311 -0
  50. package/dist/task/image/ImageTintTask.d.ts.map +1 -0
  51. package/dist/task/image/ImageTransparencyTask.d.ts +245 -0
  52. package/dist/task/image/ImageTransparencyTask.d.ts.map +1 -0
  53. package/dist/task/image/ImageWatermarkTask.d.ts +275 -0
  54. package/dist/task/image/ImageWatermarkTask.d.ts.map +1 -0
  55. package/dist/task/image/imageRasterCodecBrowser.d.ts +8 -0
  56. package/dist/task/image/imageRasterCodecBrowser.d.ts.map +1 -0
  57. package/dist/task/image/imageRasterCodecNode.d.ts +8 -0
  58. package/dist/task/image/imageRasterCodecNode.d.ts.map +1 -0
  59. package/dist/task/image/imageRasterCodecRegistry.d.ts +13 -0
  60. package/dist/task/image/imageRasterCodecRegistry.d.ts.map +1 -0
  61. package/dist/task/image/imageTaskIo.d.ts +12 -0
  62. package/dist/task/image/imageTaskIo.d.ts.map +1 -0
  63. package/dist/task/image/imageTaskTransport.d.ts +21 -0
  64. package/dist/task/image/imageTaskTransport.d.ts.map +1 -0
  65. package/dist/task/image/registerImageRasterCodec.browser.d.ts +7 -0
  66. package/dist/task/image/registerImageRasterCodec.browser.d.ts.map +1 -0
  67. package/dist/task/image/registerImageRasterCodec.node.d.ts +7 -0
  68. package/dist/task/image/registerImageRasterCodec.node.d.ts.map +1 -0
  69. package/package.json +12 -11
@@ -0,0 +1,275 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { CreateWorkflow, IExecuteReactiveContext, Task, TaskConfig } from "@workglow/task-graph";
7
+ import { ImageFromSchema } from "./ImageSchemas";
8
+ declare const inputSchema: {
9
+ readonly type: "object";
10
+ readonly properties: {
11
+ readonly image: {
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)";
42
+ };
43
+ };
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
+ }];
55
+ };
56
+ readonly spacing: {
57
+ readonly type: "integer";
58
+ readonly title: "Spacing";
59
+ readonly description: "Pattern spacing in pixels";
60
+ readonly minimum: 8;
61
+ readonly default: 64;
62
+ };
63
+ readonly opacity: {
64
+ readonly type: "number";
65
+ readonly title: "Opacity";
66
+ readonly description: "Watermark opacity (0.0-1.0)";
67
+ readonly minimum: 0;
68
+ readonly maximum: 1;
69
+ readonly default: 0.3;
70
+ };
71
+ readonly pattern: {
72
+ readonly type: "string";
73
+ readonly enum: readonly ["diagonal-lines", "grid", "dots"];
74
+ readonly title: "Pattern";
75
+ readonly description: "Watermark pattern type";
76
+ readonly default: "diagonal-lines";
77
+ };
78
+ };
79
+ readonly required: readonly ["image"];
80
+ readonly additionalProperties: false;
81
+ };
82
+ declare const outputSchema: {
83
+ readonly type: "object";
84
+ readonly properties: {
85
+ readonly image: {
86
+ readonly oneOf: readonly [{
87
+ readonly type: "object";
88
+ readonly properties: {
89
+ readonly data: {
90
+ readonly type: "array";
91
+ readonly items: {
92
+ readonly type: "number";
93
+ readonly format: "Uint8Clamped";
94
+ };
95
+ readonly format: "Uint8ClampedArray";
96
+ readonly title: "Data";
97
+ readonly description: "Pixel data of the image";
98
+ };
99
+ readonly width: {
100
+ readonly type: "integer";
101
+ readonly minimum: 1;
102
+ readonly title: "Width";
103
+ readonly description: "Width in pixels";
104
+ };
105
+ readonly height: {
106
+ readonly type: "integer";
107
+ readonly minimum: 1;
108
+ readonly title: "Height";
109
+ readonly description: "Height in pixels";
110
+ };
111
+ readonly channels: {
112
+ readonly type: "integer";
113
+ readonly enum: readonly [1, 3, 4];
114
+ readonly title: "Channels";
115
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
116
+ };
117
+ };
118
+ readonly additionalProperties: false;
119
+ readonly required: readonly ["data", "width", "height", "channels"];
120
+ readonly format: "image:ImageBinary";
121
+ readonly title: "Image";
122
+ readonly description: "Raw pixel image data";
123
+ }, {
124
+ readonly type: "string";
125
+ readonly format: "image:data-uri";
126
+ readonly title: string;
127
+ readonly description: string;
128
+ }];
129
+ };
130
+ };
131
+ readonly required: readonly ["image"];
132
+ readonly additionalProperties: false;
133
+ };
134
+ export type ImageWatermarkTaskInput = ImageFromSchema<typeof inputSchema>;
135
+ export type ImageWatermarkTaskOutput = ImageFromSchema<typeof outputSchema>;
136
+ export declare class ImageWatermarkTask<Input extends ImageWatermarkTaskInput = ImageWatermarkTaskInput, Output extends ImageWatermarkTaskOutput = ImageWatermarkTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
137
+ static readonly type = "ImageWatermarkTask";
138
+ static readonly category = "Image";
139
+ static title: string;
140
+ static description: string;
141
+ static inputSchema(): {
142
+ readonly type: "object";
143
+ readonly properties: {
144
+ readonly image: {
145
+ readonly oneOf: readonly [{
146
+ readonly type: "object";
147
+ readonly properties: {
148
+ readonly data: {
149
+ readonly type: "array";
150
+ readonly items: {
151
+ readonly type: "number";
152
+ readonly format: "Uint8Clamped";
153
+ };
154
+ readonly format: "Uint8ClampedArray";
155
+ readonly title: "Data";
156
+ readonly description: "Pixel data of the image";
157
+ };
158
+ readonly width: {
159
+ readonly type: "integer";
160
+ readonly minimum: 1;
161
+ readonly title: "Width";
162
+ readonly description: "Width in pixels";
163
+ };
164
+ readonly height: {
165
+ readonly type: "integer";
166
+ readonly minimum: 1;
167
+ readonly title: "Height";
168
+ readonly description: "Height in pixels";
169
+ };
170
+ readonly channels: {
171
+ readonly type: "integer";
172
+ readonly enum: readonly [1, 3, 4];
173
+ readonly title: "Channels";
174
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
175
+ };
176
+ };
177
+ readonly additionalProperties: false;
178
+ readonly required: readonly ["data", "width", "height", "channels"];
179
+ readonly format: "image:ImageBinary";
180
+ readonly title: "Image";
181
+ readonly description: "Raw pixel image data";
182
+ }, {
183
+ readonly type: "string";
184
+ readonly format: "image:data-uri";
185
+ readonly title: string;
186
+ readonly description: string;
187
+ }];
188
+ };
189
+ readonly spacing: {
190
+ readonly type: "integer";
191
+ readonly title: "Spacing";
192
+ readonly description: "Pattern spacing in pixels";
193
+ readonly minimum: 8;
194
+ readonly default: 64;
195
+ };
196
+ readonly opacity: {
197
+ readonly type: "number";
198
+ readonly title: "Opacity";
199
+ readonly description: "Watermark opacity (0.0-1.0)";
200
+ readonly minimum: 0;
201
+ readonly maximum: 1;
202
+ readonly default: 0.3;
203
+ };
204
+ readonly pattern: {
205
+ readonly type: "string";
206
+ readonly enum: readonly ["diagonal-lines", "grid", "dots"];
207
+ readonly title: "Pattern";
208
+ readonly description: "Watermark pattern type";
209
+ readonly default: "diagonal-lines";
210
+ };
211
+ };
212
+ readonly required: readonly ["image"];
213
+ readonly additionalProperties: false;
214
+ };
215
+ static outputSchema(): {
216
+ readonly type: "object";
217
+ readonly properties: {
218
+ readonly image: {
219
+ readonly oneOf: readonly [{
220
+ readonly type: "object";
221
+ readonly properties: {
222
+ readonly data: {
223
+ readonly type: "array";
224
+ readonly items: {
225
+ readonly type: "number";
226
+ readonly format: "Uint8Clamped";
227
+ };
228
+ readonly format: "Uint8ClampedArray";
229
+ readonly title: "Data";
230
+ readonly description: "Pixel data of the image";
231
+ };
232
+ readonly width: {
233
+ readonly type: "integer";
234
+ readonly minimum: 1;
235
+ readonly title: "Width";
236
+ readonly description: "Width in pixels";
237
+ };
238
+ readonly height: {
239
+ readonly type: "integer";
240
+ readonly minimum: 1;
241
+ readonly title: "Height";
242
+ readonly description: "Height in pixels";
243
+ };
244
+ readonly channels: {
245
+ readonly type: "integer";
246
+ readonly enum: readonly [1, 3, 4];
247
+ readonly title: "Channels";
248
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
249
+ };
250
+ };
251
+ readonly additionalProperties: false;
252
+ readonly required: readonly ["data", "width", "height", "channels"];
253
+ readonly format: "image:ImageBinary";
254
+ readonly title: "Image";
255
+ readonly description: "Raw pixel image data";
256
+ }, {
257
+ readonly type: "string";
258
+ readonly format: "image:data-uri";
259
+ readonly title: string;
260
+ readonly description: string;
261
+ }];
262
+ };
263
+ };
264
+ readonly required: readonly ["image"];
265
+ readonly additionalProperties: false;
266
+ };
267
+ executeReactive(input: Input, _output: Output, _context: IExecuteReactiveContext): Promise<Output>;
268
+ }
269
+ declare module "@workglow/task-graph" {
270
+ interface Workflow {
271
+ imageWatermark: CreateWorkflow<ImageWatermarkTaskInput, ImageWatermarkTaskOutput, TaskConfig>;
272
+ }
273
+ }
274
+ export {};
275
+ //# sourceMappingURL=ImageWatermarkTask.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageWatermarkTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImageWatermarkTask.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,OAAO;qBACL,IAAI,EAAE,SAAS;qBACf,KAAK,EAAE,SAAS;qBAChB,WAAW,EAAE,2BAA2B;qBACxC,OAAO,EAAE,CAAC;qBACV,OAAO,EAAE,EAAE;;iBAEb,OAAO;qBACL,IAAI,EAAE,QAAQ;qBACd,KAAK,EAAE,SAAS;qBAChB,WAAW,EAAE,6BAA6B;qBAC1C,OAAO,EAAE,CAAC;qBACV,OAAO,EAAE,CAAC;qBACV,OAAO,EAAE,GAAG;;iBAEd,OAAO;qBACL,IAAI,EAAE,QAAQ;qBACd,IAAI;qBACJ,KAAK,EAAE,SAAS;qBAChB,WAAW,EAAE,wBAAwB;qBACrC,OAAO,EAAE,gBAAgB;;;;;CAKI,CAAC;AAEpC,QAAA,MAAM,YAAY;mBACV,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI0B,CAAC;AAEpC,MAAM,MAAM,uBAAuB,GAAG,eAAe,CAAC,OAAO,WAAW,CAAC,CAAC;AAC1E,MAAM,MAAM,wBAAwB,GAAG,eAAe,CAAC,OAAO,YAAY,CAAC,CAAC;AAE5E,qBAAa,kBAAkB,CAC7B,KAAK,SAAS,uBAAuB,GAAG,uBAAuB,EAC/D,MAAM,SAAS,wBAAwB,GAAG,wBAAwB,EAClE,MAAM,SAAS,UAAU,GAAG,UAAU,CACtC,SAAQ,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IACnC,gBAAyB,IAAI,wBAAwB;IACrD,gBAAyB,QAAQ,WAAW;IAC5C,OAAuB,KAAK,SAAmB;IAC/C,OAAuB,WAAW,SAAoD;IAEtF,OAAgB,WAAW;uBApDrB,QAAQ;;qBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBACL,OAAO;yBACL,IAAI,EAAE,SAAS;yBACf,KAAK,EAAE,SAAS;yBAChB,WAAW,EAAE,2BAA2B;yBACxC,OAAO,EAAE,CAAC;yBACV,OAAO,EAAE,EAAE;;qBAEb,OAAO;yBACL,IAAI,EAAE,QAAQ;yBACd,KAAK,EAAE,SAAS;yBAChB,WAAW,EAAE,6BAA6B;yBAC1C,OAAO,EAAE,CAAC;yBACV,OAAO,EAAE,CAAC;yBACV,OAAO,EAAE,GAAG;;qBAEd,OAAO;yBACL,IAAI,EAAE,QAAQ;yBACd,IAAI;yBACJ,KAAK,EAAE,SAAS;yBAChB,WAAW,EAAE,wBAAwB;yBACrC,OAAO,EAAE,gBAAgB;;;;;MA+B5B;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,CAuDjB;CACF;AAED,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,cAAc,EAAE,cAAc,CAAC,uBAAuB,EAAE,wBAAwB,EAAE,UAAU,CAAC,CAAC;KAC/F;CACF"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { ImageRasterCodec } from "./imageRasterCodecRegistry";
7
+ export declare function createBrowserImageRasterCodec(): ImageRasterCodec;
8
+ //# sourceMappingURL=imageRasterCodecBrowser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imageRasterCodecBrowser.d.ts","sourceRoot":"","sources":["../../../src/task/image/imageRasterCodecBrowser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAiHnE,wBAAgB,6BAA6B,IAAI,gBAAgB,CAEhE"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { ImageRasterCodec } from "./imageRasterCodecRegistry";
7
+ export declare function createNodeImageRasterCodec(): ImageRasterCodec;
8
+ //# sourceMappingURL=imageRasterCodecNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imageRasterCodecNode.d.ts","sourceRoot":"","sources":["../../../src/task/image/imageRasterCodecNode.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAuFnE,wBAAgB,0BAA0B,IAAI,gBAAgB,CAE7D"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { ImageBinary } from "@workglow/util/media";
7
+ export interface ImageRasterCodec {
8
+ decodeDataUri(dataUri: string): Promise<ImageBinary>;
9
+ encodeDataUri(image: ImageBinary, mimeType: string): Promise<string>;
10
+ }
11
+ export declare function registerImageRasterCodec(next: ImageRasterCodec): void;
12
+ export declare function getImageRasterCodec(): ImageRasterCodec;
13
+ //# sourceMappingURL=imageRasterCodecRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imageRasterCodecRegistry.d.ts","sourceRoot":"","sources":["../../../src/task/image/imageRasterCodecRegistry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACrD,aAAa,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACtE;AAID,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAErE;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,CAOtD"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { ImageBinary } from "@workglow/util/media";
7
+ /**
8
+ * Decode {@link ImageBinary} or data URI to a raster, run pixel work, then re-encode to a data URI
9
+ * when the input was a data URI (same MIME as the input, when supported).
10
+ */
11
+ export declare function produceImageOutput(inputImage: ImageBinary | string, run: (image: ImageBinary) => ImageBinary | Promise<ImageBinary>): Promise<ImageBinary | string>;
12
+ //# sourceMappingURL=imageTaskIo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imageTaskIo.d.ts","sourceRoot":"","sources":["../../../src/task/image/imageTaskIo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,WAAW,GAAG,MAAM,EAChC,GAAG,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,GAC9D,OAAO,CAAC,WAAW,GAAG,MAAM,CAAC,CAI/B"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { ImageBinary } from "@workglow/util/media";
7
+ export type ImageTransportKind = "binary" | "dataUri";
8
+ export interface ImageTransport {
9
+ readonly kind: ImageTransportKind;
10
+ /** Present when kind === "dataUri"; used to encode the result. */
11
+ readonly mimeType: string;
12
+ }
13
+ /** String that begins with `data:` (narrowed by {@link isDataUriImage}). */
14
+ export type DataUriString = `data:${string}`;
15
+ export declare function isDataUriImage(value: unknown): value is DataUriString;
16
+ export declare function resolveImageInput(value: ImageBinary | string): Promise<{
17
+ readonly raster: ImageBinary;
18
+ readonly transport: ImageTransport;
19
+ }>;
20
+ export declare function formatImageOutput(raster: ImageBinary, transport: ImageTransport): Promise<ImageBinary | string>;
21
+ //# sourceMappingURL=imageTaskTransport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imageTaskTransport.d.ts","sourceRoot":"","sources":["../../../src/task/image/imageTaskTransport.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEtD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,4EAA4E;AAC5E,MAAM,MAAM,aAAa,GAAG,QAAQ,MAAM,EAAE,CAAC;AAE7C,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAErE;AAWD,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,WAAW,GAAG,MAAM,GAC1B,OAAO,CAAC;IAAE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAA;CAAE,CAAC,CAY/E;AAED,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,WAAW,GAAG,MAAM,CAAC,CAK/B"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=registerImageRasterCodec.browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerImageRasterCodec.browser.d.ts","sourceRoot":"","sources":["../../../src/task/image/registerImageRasterCodec.browser.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=registerImageRasterCodec.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerImageRasterCodec.node.d.ts","sourceRoot":"","sources":["../../../src/task/image/registerImageRasterCodec.node.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@workglow/tasks",
3
3
  "type": "module",
4
- "version": "0.2.0",
4
+ "version": "0.2.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/workglow-dev/workglow.git",
@@ -52,10 +52,10 @@
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@modelcontextprotocol/sdk": "^1.29.0",
55
- "@workglow/task-graph": "0.2.0",
56
- "@workglow/util": "0.2.0",
57
- "@workglow/job-queue": "0.2.0",
58
- "@workglow/storage": "0.2.0"
55
+ "@workglow/task-graph": "0.2.2",
56
+ "@workglow/util": "0.2.2",
57
+ "@workglow/job-queue": "0.2.2",
58
+ "@workglow/storage": "0.2.2"
59
59
  },
60
60
  "peerDependenciesMeta": {
61
61
  "@modelcontextprotocol/sdk": {
@@ -77,12 +77,13 @@
77
77
  "devDependencies": {
78
78
  "@modelcontextprotocol/sdk": "^1.29.0",
79
79
  "@types/papaparse": "^5.5.2",
80
- "@workglow/job-queue": "0.2.0",
81
- "@workglow/storage": "0.2.0",
82
- "@workglow/task-graph": "0.2.0",
83
- "@workglow/util": "0.2.0"
80
+ "@workglow/job-queue": "0.2.2",
81
+ "@workglow/storage": "0.2.2",
82
+ "@workglow/task-graph": "0.2.2",
83
+ "@workglow/util": "0.2.2"
84
84
  },
85
- "dependencies": {
86
- "papaparse": "^5.5.3"
85
+ "optionalDependencies": {
86
+ "papaparse": "^5.5.3",
87
+ "sharp": "^0.34.5"
87
88
  }
88
89
  }