@workglow/tasks 0.2.0 → 0.2.1

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 (51) hide show
  1. package/dist/browser.d.ts +1 -1
  2. package/dist/browser.d.ts.map +1 -1
  3. package/dist/browser.js +1265 -11
  4. package/dist/browser.js.map +22 -4
  5. package/dist/bun.d.ts +1 -1
  6. package/dist/bun.d.ts.map +1 -1
  7. package/dist/bun.js +1268 -14
  8. package/dist/bun.js.map +22 -4
  9. package/dist/common.d.ts +36 -1
  10. package/dist/common.d.ts.map +1 -1
  11. package/dist/node.d.ts +1 -1
  12. package/dist/node.d.ts.map +1 -1
  13. package/dist/node.js +1268 -14
  14. package/dist/node.js.map +22 -4
  15. package/dist/task/image/ImageBlurTask.d.ts +219 -0
  16. package/dist/task/image/ImageBlurTask.d.ts.map +1 -0
  17. package/dist/task/image/ImageBorderTask.d.ts +281 -0
  18. package/dist/task/image/ImageBorderTask.d.ts.map +1 -0
  19. package/dist/task/image/ImageBrightnessTask.d.ts +219 -0
  20. package/dist/task/image/ImageBrightnessTask.d.ts.map +1 -0
  21. package/dist/task/image/ImageContrastTask.d.ts +219 -0
  22. package/dist/task/image/ImageContrastTask.d.ts.map +1 -0
  23. package/dist/task/image/ImageCropTask.d.ts +251 -0
  24. package/dist/task/image/ImageCropTask.d.ts.map +1 -0
  25. package/dist/task/image/ImageFlipTask.d.ts +215 -0
  26. package/dist/task/image/ImageFlipTask.d.ts.map +1 -0
  27. package/dist/task/image/ImageGrayscaleTask.d.ts +203 -0
  28. package/dist/task/image/ImageGrayscaleTask.d.ts.map +1 -0
  29. package/dist/task/image/ImageInvertTask.d.ts +203 -0
  30. package/dist/task/image/ImageInvertTask.d.ts.map +1 -0
  31. package/dist/task/image/ImagePixelateTask.d.ts +217 -0
  32. package/dist/task/image/ImagePixelateTask.d.ts.map +1 -0
  33. package/dist/task/image/ImagePosterizeTask.d.ts +219 -0
  34. package/dist/task/image/ImagePosterizeTask.d.ts.map +1 -0
  35. package/dist/task/image/ImageResizeTask.d.ts +227 -0
  36. package/dist/task/image/ImageResizeTask.d.ts.map +1 -0
  37. package/dist/task/image/ImageRotateTask.d.ts +215 -0
  38. package/dist/task/image/ImageRotateTask.d.ts.map +1 -0
  39. package/dist/task/image/ImageSchemas.d.ts +94 -0
  40. package/dist/task/image/ImageSchemas.d.ts.map +1 -0
  41. package/dist/task/image/ImageSepiaTask.d.ts +203 -0
  42. package/dist/task/image/ImageSepiaTask.d.ts.map +1 -0
  43. package/dist/task/image/ImageThresholdTask.d.ts +219 -0
  44. package/dist/task/image/ImageThresholdTask.d.ts.map +1 -0
  45. package/dist/task/image/ImageTintTask.d.ts +283 -0
  46. package/dist/task/image/ImageTintTask.d.ts.map +1 -0
  47. package/dist/task/image/ImageTransparencyTask.d.ts +217 -0
  48. package/dist/task/image/ImageTransparencyTask.d.ts.map +1 -0
  49. package/dist/task/image/ImageWatermarkTask.d.ts +247 -0
  50. package/dist/task/image/ImageWatermarkTask.d.ts.map +1 -0
  51. package/package.json +9 -9
@@ -0,0 +1,247 @@
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 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 spacing: {
50
+ readonly type: "integer";
51
+ readonly title: "Spacing";
52
+ readonly description: "Pattern spacing in pixels";
53
+ readonly minimum: 8;
54
+ readonly default: 64;
55
+ };
56
+ readonly opacity: {
57
+ readonly type: "number";
58
+ readonly title: "Opacity";
59
+ readonly description: "Watermark opacity (0.0-1.0)";
60
+ readonly minimum: 0;
61
+ readonly maximum: 1;
62
+ readonly default: 0.3;
63
+ };
64
+ readonly pattern: {
65
+ readonly type: "string";
66
+ readonly enum: readonly ["diagonal-lines", "grid", "dots"];
67
+ readonly title: "Pattern";
68
+ readonly description: "Watermark pattern type";
69
+ readonly default: "diagonal-lines";
70
+ };
71
+ };
72
+ readonly required: readonly ["image"];
73
+ readonly additionalProperties: false;
74
+ };
75
+ declare const outputSchema: {
76
+ readonly type: "object";
77
+ readonly properties: {
78
+ readonly image: {
79
+ readonly type: "object";
80
+ readonly properties: {
81
+ readonly data: {
82
+ readonly type: "array";
83
+ readonly items: {
84
+ readonly type: "number";
85
+ readonly format: "Uint8Clamped";
86
+ };
87
+ readonly format: "Uint8ClampedArray";
88
+ readonly title: "Data";
89
+ readonly description: "Pixel data of the image";
90
+ };
91
+ readonly width: {
92
+ readonly type: "integer";
93
+ readonly minimum: 1;
94
+ readonly title: "Width";
95
+ readonly description: "Width in pixels";
96
+ };
97
+ readonly height: {
98
+ readonly type: "integer";
99
+ readonly minimum: 1;
100
+ readonly title: "Height";
101
+ readonly description: "Height in pixels";
102
+ };
103
+ readonly channels: {
104
+ readonly type: "integer";
105
+ readonly enum: readonly [1, 3, 4];
106
+ readonly title: "Channels";
107
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
108
+ };
109
+ };
110
+ readonly additionalProperties: false;
111
+ readonly required: readonly ["data", "width", "height", "channels"];
112
+ readonly format: "image:ImageBinary";
113
+ readonly title: "Image";
114
+ readonly description: "Raw pixel image data";
115
+ };
116
+ };
117
+ readonly required: readonly ["image"];
118
+ readonly additionalProperties: false;
119
+ };
120
+ export type ImageWatermarkTaskInput = ImageFromSchema<typeof inputSchema>;
121
+ export type ImageWatermarkTaskOutput = ImageFromSchema<typeof outputSchema>;
122
+ export declare class ImageWatermarkTask<Input extends ImageWatermarkTaskInput = ImageWatermarkTaskInput, Output extends ImageWatermarkTaskOutput = ImageWatermarkTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
123
+ static readonly type = "ImageWatermarkTask";
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 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 spacing: {
169
+ readonly type: "integer";
170
+ readonly title: "Spacing";
171
+ readonly description: "Pattern spacing in pixels";
172
+ readonly minimum: 8;
173
+ readonly default: 64;
174
+ };
175
+ readonly opacity: {
176
+ readonly type: "number";
177
+ readonly title: "Opacity";
178
+ readonly description: "Watermark opacity (0.0-1.0)";
179
+ readonly minimum: 0;
180
+ readonly maximum: 1;
181
+ readonly default: 0.3;
182
+ };
183
+ readonly pattern: {
184
+ readonly type: "string";
185
+ readonly enum: readonly ["diagonal-lines", "grid", "dots"];
186
+ readonly title: "Pattern";
187
+ readonly description: "Watermark pattern type";
188
+ readonly default: "diagonal-lines";
189
+ };
190
+ };
191
+ readonly required: readonly ["image"];
192
+ readonly additionalProperties: false;
193
+ };
194
+ static outputSchema(): {
195
+ readonly type: "object";
196
+ readonly properties: {
197
+ readonly image: {
198
+ readonly type: "object";
199
+ readonly properties: {
200
+ readonly data: {
201
+ readonly type: "array";
202
+ readonly items: {
203
+ readonly type: "number";
204
+ readonly format: "Uint8Clamped";
205
+ };
206
+ readonly format: "Uint8ClampedArray";
207
+ readonly title: "Data";
208
+ readonly description: "Pixel data of the image";
209
+ };
210
+ readonly width: {
211
+ readonly type: "integer";
212
+ readonly minimum: 1;
213
+ readonly title: "Width";
214
+ readonly description: "Width in pixels";
215
+ };
216
+ readonly height: {
217
+ readonly type: "integer";
218
+ readonly minimum: 1;
219
+ readonly title: "Height";
220
+ readonly description: "Height in pixels";
221
+ };
222
+ readonly channels: {
223
+ readonly type: "integer";
224
+ readonly enum: readonly [1, 3, 4];
225
+ readonly title: "Channels";
226
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
227
+ };
228
+ };
229
+ readonly additionalProperties: false;
230
+ readonly required: readonly ["data", "width", "height", "channels"];
231
+ readonly format: "image:ImageBinary";
232
+ readonly title: "Image";
233
+ readonly description: "Raw pixel image data";
234
+ };
235
+ };
236
+ readonly required: readonly ["image"];
237
+ readonly additionalProperties: false;
238
+ };
239
+ executeReactive(input: Input, _output: Output, _context: IExecuteReactiveContext): Promise<Output>;
240
+ }
241
+ declare module "@workglow/task-graph" {
242
+ interface Workflow {
243
+ imageWatermark: CreateWorkflow<ImageWatermarkTaskInput, ImageWatermarkTaskOutput, TaskConfig>;
244
+ }
245
+ }
246
+ export {};
247
+ //# 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,EAAqB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEpE,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;;;;;;;;;;;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AE,uBAAuB,GAChC,OAAO,CAAC,MAAM,CAAC,CAsDjB;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"}
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.1",
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.1",
56
+ "@workglow/util": "0.2.1",
57
+ "@workglow/job-queue": "0.2.1",
58
+ "@workglow/storage": "0.2.1"
59
59
  },
60
60
  "peerDependenciesMeta": {
61
61
  "@modelcontextprotocol/sdk": {
@@ -77,10 +77,10 @@
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.1",
81
+ "@workglow/storage": "0.2.1",
82
+ "@workglow/task-graph": "0.2.1",
83
+ "@workglow/util": "0.2.1"
84
84
  },
85
85
  "dependencies": {
86
86
  "papaparse": "^5.5.3"