@workglow/tasks 0.2.14 → 0.2.15

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 (49) hide show
  1. package/dist/browser.js +189 -166
  2. package/dist/browser.js.map +22 -23
  3. package/dist/bun.js +189 -166
  4. package/dist/bun.js.map +22 -23
  5. package/dist/common.d.ts +0 -1
  6. package/dist/common.d.ts.map +1 -1
  7. package/dist/electron.js +189 -166
  8. package/dist/electron.js.map +22 -23
  9. package/dist/node.js +189 -166
  10. package/dist/node.js.map +22 -23
  11. package/dist/task/image/ImageBorderTask.d.ts +76 -58
  12. package/dist/task/image/ImageBorderTask.d.ts.map +1 -1
  13. package/dist/task/image/ImageSchemas.d.ts +66 -1
  14. package/dist/task/image/ImageSchemas.d.ts.map +1 -1
  15. package/dist/task/image/ImageTextTask.d.ts +91 -254
  16. package/dist/task/image/ImageTextTask.d.ts.map +1 -1
  17. package/dist/task/image/ImageTintTask.d.ts +76 -58
  18. package/dist/task/image/ImageTintTask.d.ts.map +1 -1
  19. package/dist/task/image/imageRasterCodecBrowser.d.ts +1 -1
  20. package/dist/task/image/imageRasterCodecBrowser.d.ts.map +1 -1
  21. package/dist/task/image/imageRasterCodecNode.d.ts +1 -1
  22. package/dist/task/image/imageRasterCodecNode.d.ts.map +1 -1
  23. package/dist/task/image/imageRasterCodecRegistry.d.ts +7 -7
  24. package/dist/task/image/imageRasterCodecRegistry.d.ts.map +1 -1
  25. package/dist/task/image/imageTaskIo.d.ts +11 -3
  26. package/dist/task/image/imageTaskIo.d.ts.map +1 -1
  27. package/dist/task/string/StringConcatTask.d.ts +6 -6
  28. package/dist/task/string/StringConcatTask.d.ts.map +1 -1
  29. package/dist/task/string/StringIncludesTask.d.ts +12 -12
  30. package/dist/task/string/StringIncludesTask.d.ts.map +1 -1
  31. package/dist/task/string/StringJoinTask.d.ts +12 -12
  32. package/dist/task/string/StringJoinTask.d.ts.map +1 -1
  33. package/dist/task/string/StringLengthTask.d.ts +12 -12
  34. package/dist/task/string/StringLengthTask.d.ts.map +1 -1
  35. package/dist/task/string/StringLowerCaseTask.d.ts +12 -12
  36. package/dist/task/string/StringLowerCaseTask.d.ts.map +1 -1
  37. package/dist/task/string/StringReplaceTask.d.ts +12 -12
  38. package/dist/task/string/StringReplaceTask.d.ts.map +1 -1
  39. package/dist/task/string/StringSliceTask.d.ts +12 -12
  40. package/dist/task/string/StringSliceTask.d.ts.map +1 -1
  41. package/dist/task/string/StringTemplateTask.d.ts +6 -6
  42. package/dist/task/string/StringTemplateTask.d.ts.map +1 -1
  43. package/dist/task/string/StringTrimTask.d.ts +12 -12
  44. package/dist/task/string/StringTrimTask.d.ts.map +1 -1
  45. package/dist/task/string/StringUpperCaseTask.d.ts +12 -12
  46. package/dist/task/string/StringUpperCaseTask.d.ts.map +1 -1
  47. package/package.json +9 -9
  48. package/dist/task/image/imageTaskTransport.d.ts +0 -21
  49. package/dist/task/image/imageTaskTransport.d.ts.map +0 -1
package/dist/node.js CHANGED
@@ -1,6 +1,9 @@
1
1
  import { createRequire } from "node:module";
2
2
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
3
3
 
4
+ // src/task/image/registerImageRasterCodec.node.ts
5
+ import { registerImageRasterCodec } from "@workglow/util/media";
6
+
4
7
  // src/task/image/imageRasterCodecNode.ts
5
8
  import { parseDataUri } from "@workglow/util/media";
6
9
 
@@ -140,18 +143,6 @@ function createNodeImageRasterCodec() {
140
143
  return { decodeDataUri, encodeDataUri };
141
144
  }
142
145
 
143
- // src/task/image/imageRasterCodecRegistry.ts
144
- var codec = null;
145
- function registerImageRasterCodec(next) {
146
- codec = next;
147
- }
148
- function getImageRasterCodec() {
149
- if (!codec) {
150
- throw new Error("Image raster codec is not registered. Ensure you import @workglow/tasks from the browser or Node entry (dist/browser.js or dist/node.js), or call registerImageRasterCodec() during startup.");
151
- }
152
- return codec;
153
- }
154
-
155
146
  // src/task/image/registerImageRasterCodec.node.ts
156
147
  registerImageRasterCodec(createNodeImageRasterCodec());
157
148
 
@@ -5956,45 +5947,50 @@ var ColorSchema = (annotations = {}) => ({
5956
5947
  a: { type: "integer", minimum: 0, maximum: 255, title: "Alpha", default: 255 }
5957
5948
  },
5958
5949
  required: ["r", "g", "b"],
5950
+ format: "color",
5959
5951
  additionalProperties: false,
5960
5952
  ...annotations
5961
5953
  });
5962
-
5963
- // src/task/image/imageTaskTransport.ts
5964
- function isDataUriImage(value) {
5965
- return typeof value === "string" && value.startsWith("data:");
5966
- }
5967
- function parseDataUriMimeType(dataUri) {
5968
- const match = dataUri.match(/^data:([^;,]+)/);
5969
- const raw = match?.[1]?.trim();
5970
- if (!raw) {
5971
- return "image/png";
5972
- }
5973
- return raw.toLowerCase();
5974
- }
5975
- async function resolveImageInput(value) {
5976
- if (typeof value === "string") {
5977
- if (!isDataUriImage(value)) {
5978
- throw new Error(`resolveImageInput: unsupported string value – expected a data URI (data:image/...;base64,...) but received: "${value.slice(0, 80)}${value.length > 80 ? "…" : ""}"`);
5954
+ var HexColorSchema = (annotations = {}) => ({
5955
+ type: "string",
5956
+ format: "color",
5957
+ pattern: "^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
5958
+ title: "Color (hex)",
5959
+ description: "Color as a `#RRGGBB[AA]` or `#RGB[A]` hex string",
5960
+ ...annotations
5961
+ });
5962
+ var ColorValueSchema = (annotations = {}) => ({
5963
+ oneOf: [
5964
+ ColorSchema(),
5965
+ HexColorSchema({
5966
+ title: annotations.title ?? "Color",
5967
+ description: annotations.description ?? "Color as {r,g,b,a} object or `#RRGGBB[AA]` / `#RGB[A]` hex string"
5968
+ })
5969
+ ],
5970
+ ...annotations
5971
+ });
5972
+ var ColorObjectType = null;
5973
+ var ColorFromSchemaOptions = {
5974
+ ...FromSchemaDefaultOptions,
5975
+ deserialize: [
5976
+ {
5977
+ pattern: { type: "object", format: "color" },
5978
+ output: ColorObjectType
5979
5979
  }
5980
- const mimeType = parseDataUriMimeType(value);
5981
- const raster = await getImageRasterCodec().decodeDataUri(value);
5982
- return { raster, transport: { kind: "dataUri", mimeType } };
5983
- }
5984
- return { raster: value, transport: { kind: "binary", mimeType: "image/png" } };
5985
- }
5986
- async function formatImageOutput(raster, transport) {
5987
- if (transport.kind === "binary") {
5988
- return raster;
5989
- }
5990
- return getImageRasterCodec().encodeDataUri(raster, transport.mimeType);
5991
- }
5980
+ ]
5981
+ };
5992
5982
 
5993
5983
  // src/task/image/imageTaskIo.ts
5984
+ import { Image, getImageRasterCodec } from "@workglow/util/media";
5994
5985
  async function produceImageOutput(inputImage, run) {
5995
- const { raster, transport } = await resolveImageInput(inputImage);
5996
- const outRaster = await run(raster);
5997
- return formatImageOutput(outRaster, transport);
5986
+ const image = Image.is(inputImage) ? inputImage : Image.from(inputImage);
5987
+ const pixels = await image.getPixels();
5988
+ const out = await run(pixels);
5989
+ if (image.kind === "dataUri") {
5990
+ const mime = image.mimeType ?? "image/png";
5991
+ return getImageRasterCodec().encodeDataUri(out, mime);
5992
+ }
5993
+ return out;
5998
5994
  }
5999
5995
 
6000
5996
  // src/task/image/ImageBlurTask.ts
@@ -6085,6 +6081,7 @@ import {
6085
6081
  Task as Task43,
6086
6082
  Workflow as Workflow18
6087
6083
  } from "@workglow/task-graph";
6084
+ import { resolveColor } from "@workglow/util/media";
6088
6085
  var inputSchema42 = {
6089
6086
  type: "object",
6090
6087
  properties: {
@@ -6096,7 +6093,7 @@ var inputSchema42 = {
6096
6093
  minimum: 1,
6097
6094
  default: 1
6098
6095
  },
6099
- color: ColorSchema({ title: "Color", description: "Border color" })
6096
+ color: ColorValueSchema({ title: "Color", description: "Border color" })
6100
6097
  },
6101
6098
  required: ["image", "color"],
6102
6099
  additionalProperties: false
@@ -6122,7 +6119,8 @@ class ImageBorderTask extends Task43 {
6122
6119
  return outputSchema41;
6123
6120
  }
6124
6121
  async executeReactive(input, _output, _context) {
6125
- const { borderWidth: bw = 1, color } = input;
6122
+ const { borderWidth: bw = 1 } = input;
6123
+ const color = resolveColor(input.color);
6126
6124
  const image = await produceImageOutput(input.image, (img) => {
6127
6125
  const { data: src, width: srcW, height: srcH, channels: srcCh } = img;
6128
6126
  const outCh = 4;
@@ -6132,7 +6130,7 @@ class ImageBorderTask extends Task43 {
6132
6130
  const r = color.r;
6133
6131
  const g = color.g;
6134
6132
  const b = color.b;
6135
- const a = color.a ?? 255;
6133
+ const a = color.a;
6136
6134
  for (let i = 0;i < dst.length; i += outCh) {
6137
6135
  dst[i] = r;
6138
6136
  dst[i + 1] = g;
@@ -6679,6 +6677,8 @@ class ImagePosterizeTask extends Task51 {
6679
6677
  }
6680
6678
  }
6681
6679
  Workflow26.prototype.imagePosterize = CreateWorkflow25(ImagePosterizeTask);
6680
+ // src/task/image/imageRasterCodecRegistry.ts
6681
+ import { getImageRasterCodec as getImageRasterCodec2, registerImageRasterCodec as registerImageRasterCodec2 } from "@workglow/util/media";
6682
6682
  // src/task/image/ImageResizeTask.ts
6683
6683
  import {
6684
6684
  CreateWorkflow as CreateWorkflow26,
@@ -6884,6 +6884,7 @@ import {
6884
6884
  Task as Task55,
6885
6885
  Workflow as Workflow30
6886
6886
  } from "@workglow/task-graph";
6887
+ import { resolveColor as resolveColor2 } from "@workglow/util/media";
6887
6888
  function toRgbaImage(image) {
6888
6889
  const { data, width, height, channels } = image;
6889
6890
  const rgba = new Uint8ClampedArray(width * height * 4);
@@ -6947,16 +6948,6 @@ function compositeTextOverBackground(background, overlay) {
6947
6948
  }
6948
6949
  return { data: out, width: bg.width, height: bg.height, channels: 4 };
6949
6950
  }
6950
- function hasUsableBackgroundImage(value) {
6951
- if (typeof value === "string") {
6952
- return value.length > 0;
6953
- }
6954
- if (typeof value !== "object" || value === null) {
6955
- return false;
6956
- }
6957
- const candidate = value;
6958
- return typeof candidate.width === "number" && typeof candidate.height === "number" && typeof candidate.channels === "number" && candidate.data !== undefined;
6959
- }
6960
6951
  var IMAGE_TEXT_POSITION_LABELS = {
6961
6952
  "top-left": "Top left",
6962
6953
  "top-center": "Top center",
@@ -6968,17 +6959,18 @@ var IMAGE_TEXT_POSITION_LABELS = {
6968
6959
  "bottom-center": "Bottom center",
6969
6960
  "bottom-right": "Bottom right"
6970
6961
  };
6962
+ var backgroundImageProperty = ImageBinaryOrDataUriSchema({
6963
+ title: "Image",
6964
+ description: "Background image to render the text onto"
6965
+ });
6971
6966
  var inputSchema54 = {
6972
6967
  type: "object",
6973
6968
  properties: {
6974
- image: ImageBinaryOrDataUriSchema({
6975
- title: "Image",
6976
- description: "Optional background image to render the text onto"
6977
- }),
6978
6969
  text: {
6979
6970
  type: "string",
6980
6971
  title: "Text",
6981
- description: "Text to render (use \\n for line breaks)"
6972
+ description: "Text to render (use \\n for line breaks)",
6973
+ minLength: 1
6982
6974
  },
6983
6975
  font: {
6984
6976
  type: "string",
@@ -6995,7 +6987,16 @@ var inputSchema54 = {
6995
6987
  },
6996
6988
  bold: { type: "boolean", title: "Bold", default: false },
6997
6989
  italic: { type: "boolean", title: "Italic", default: false },
6998
- color: ColorSchema({ title: "Color", description: "Text color" }),
6990
+ color: ColorValueSchema({ title: "Color", description: "Text color" }),
6991
+ position: {
6992
+ type: "string",
6993
+ title: "Position",
6994
+ description: "Anchor position of the text block within the image",
6995
+ enum: [...IMAGE_TEXT_ANCHOR_POSITIONS],
6996
+ default: "middle-center",
6997
+ "x-ui-enum-labels": IMAGE_TEXT_POSITION_LABELS
6998
+ },
6999
+ image: backgroundImageProperty,
6999
7000
  width: {
7000
7001
  type: "integer",
7001
7002
  title: "Width",
@@ -7007,18 +7008,18 @@ var inputSchema54 = {
7007
7008
  title: "Height",
7008
7009
  description: "Output height in pixels",
7009
7010
  minimum: 1
7010
- },
7011
- position: {
7012
- type: "string",
7013
- title: "Position",
7014
- description: "Anchor position of the text block within the image",
7015
- enum: [...IMAGE_TEXT_ANCHOR_POSITIONS],
7016
- default: "middle-center",
7017
- "x-ui-enum-labels": IMAGE_TEXT_POSITION_LABELS
7018
7011
  }
7019
7012
  },
7020
- required: ["text", "color", "width", "height"],
7021
- additionalProperties: false
7013
+ required: ["text", "color"],
7014
+ additionalProperties: false,
7015
+ if: {
7016
+ not: {
7017
+ required: ["image"]
7018
+ }
7019
+ },
7020
+ then: {
7021
+ required: ["width", "height"]
7022
+ }
7022
7023
  };
7023
7024
  var outputSchema53 = {
7024
7025
  type: "object",
@@ -7028,6 +7029,16 @@ var outputSchema53 = {
7028
7029
  required: ["image"],
7029
7030
  additionalProperties: false
7030
7031
  };
7032
+ function hasUsableBackgroundImage(value) {
7033
+ if (typeof value === "string") {
7034
+ return value.length > 0;
7035
+ }
7036
+ if (typeof value !== "object" || value === null) {
7037
+ return false;
7038
+ }
7039
+ const candidate = value;
7040
+ return typeof candidate.width === "number" && typeof candidate.height === "number" && typeof candidate.channels === "number" && candidate.data !== undefined;
7041
+ }
7031
7042
 
7032
7043
  class ImageTextTask extends Task55 {
7033
7044
  static type = "ImageTextTask";
@@ -7043,38 +7054,49 @@ class ImageTextTask extends Task55 {
7043
7054
  getDefaultInputsFromStaticInputDefinitions() {
7044
7055
  const defaults = super.getDefaultInputsFromStaticInputDefinitions();
7045
7056
  delete defaults.image;
7057
+ delete defaults.width;
7058
+ delete defaults.height;
7046
7059
  return defaults;
7047
7060
  }
7048
7061
  async executeReactive(input, _output, _context) {
7062
+ const color = resolveColor2(input.color);
7049
7063
  const fontSize = input.fontSize ?? 24;
7050
7064
  const font = input.font ?? "sans-serif";
7051
7065
  const bold = input.bold ?? false;
7052
7066
  const italic = input.italic ?? false;
7053
7067
  const position = input.position ?? "middle-center";
7054
- const renderParams = {
7055
- text: input.text,
7056
- font,
7057
- fontSize,
7058
- bold,
7059
- italic,
7060
- color: input.color,
7061
- width: input.width,
7062
- height: input.height,
7063
- position
7064
- };
7065
- const backgroundImage = input.image;
7068
+ const backgroundImage = "image" in input ? input.image : undefined;
7066
7069
  let image;
7067
7070
  if (hasUsableBackgroundImage(backgroundImage)) {
7068
- const validatedBackgroundImage = backgroundImage;
7069
- image = await produceImageOutput(validatedBackgroundImage, async (background) => {
7070
- if (background.width !== input.width || background.height !== input.height) {
7071
- throw new Error(`ImageTextTask: background image dimensions (${background.width}x${background.height}) must match width/height (${input.width}x${input.height})`);
7072
- }
7073
- const overlay = await renderImageTextToRgba(renderParams);
7071
+ image = await produceImageOutput(backgroundImage, async (background) => {
7072
+ const overlay = await renderImageTextToRgba({
7073
+ text: input.text,
7074
+ font,
7075
+ fontSize,
7076
+ bold,
7077
+ italic,
7078
+ color,
7079
+ width: background.width,
7080
+ height: background.height,
7081
+ position
7082
+ });
7074
7083
  return compositeTextOverBackground(background, overlay);
7075
7084
  });
7076
7085
  } else {
7077
- image = await renderImageTextToRgba(renderParams);
7086
+ if (!("width" in input) || !("height" in input) || typeof input.width !== "number" || typeof input.height !== "number") {
7087
+ throw new Error("ImageTextTask: width and height are required when no background image is provided");
7088
+ }
7089
+ image = await renderImageTextToRgba({
7090
+ text: input.text,
7091
+ font,
7092
+ fontSize,
7093
+ bold,
7094
+ italic,
7095
+ color,
7096
+ width: input.width,
7097
+ height: input.height,
7098
+ position
7099
+ });
7078
7100
  }
7079
7101
  return { image };
7080
7102
  }
@@ -7150,11 +7172,12 @@ import {
7150
7172
  Task as Task57,
7151
7173
  Workflow as Workflow32
7152
7174
  } from "@workglow/task-graph";
7175
+ import { resolveColor as resolveColor3 } from "@workglow/util/media";
7153
7176
  var inputSchema56 = {
7154
7177
  type: "object",
7155
7178
  properties: {
7156
7179
  image: ImageBinaryOrDataUriSchema({ title: "Image", description: "Source image" }),
7157
- color: ColorSchema({ title: "Color", description: "Tint color" }),
7180
+ color: ColorValueSchema({ title: "Color", description: "Tint color" }),
7158
7181
  amount: {
7159
7182
  type: "number",
7160
7183
  title: "Amount",
@@ -7188,7 +7211,7 @@ class ImageTintTask extends Task57 {
7188
7211
  return outputSchema55;
7189
7212
  }
7190
7213
  async executeReactive(input, _output, _context) {
7191
- const { r: tr, g: tg, b: tb } = input.color;
7214
+ const { r: tr, g: tg, b: tb } = resolveColor3(input.color);
7192
7215
  const amount = input.amount ?? 0.5;
7193
7216
  const invAmount = 1 - amount;
7194
7217
  const tintR = tr * amount;
@@ -14038,13 +14061,13 @@ var inputSchema74 = {
14038
14061
  var outputSchema73 = {
14039
14062
  type: "object",
14040
14063
  properties: {
14041
- result: {
14064
+ text: {
14042
14065
  type: "string",
14043
- title: "Result",
14066
+ title: "Text",
14044
14067
  description: "Concatenation of all input strings"
14045
14068
  }
14046
14069
  },
14047
- required: ["result"],
14070
+ required: ["text"],
14048
14071
  additionalProperties: false
14049
14072
  };
14050
14073
 
@@ -14060,7 +14083,7 @@ class StringConcatTask extends Task80 {
14060
14083
  return outputSchema73;
14061
14084
  }
14062
14085
  async executeReactive(input2, _output, _context) {
14063
- return { result: Object.values(input2).join("") };
14086
+ return { text: Object.values(input2).join("") };
14064
14087
  }
14065
14088
  }
14066
14089
  Workflow56.prototype.stringConcat = CreateWorkflow55(StringConcatTask);
@@ -14073,9 +14096,9 @@ import {
14073
14096
  var inputSchema75 = {
14074
14097
  type: "object",
14075
14098
  properties: {
14076
- value: {
14099
+ text: {
14077
14100
  type: "string",
14078
- title: "Value",
14101
+ title: "Text",
14079
14102
  description: "Input string to search in"
14080
14103
  },
14081
14104
  search: {
@@ -14084,19 +14107,19 @@ var inputSchema75 = {
14084
14107
  description: "Substring to search for"
14085
14108
  }
14086
14109
  },
14087
- required: ["value", "search"],
14110
+ required: ["text", "search"],
14088
14111
  additionalProperties: false
14089
14112
  };
14090
14113
  var outputSchema74 = {
14091
14114
  type: "object",
14092
14115
  properties: {
14093
- result: {
14116
+ included: {
14094
14117
  type: "boolean",
14095
- title: "Result",
14118
+ title: "Included",
14096
14119
  description: "Whether the string contains the search substring"
14097
14120
  }
14098
14121
  },
14099
- required: ["result"],
14122
+ required: ["included"],
14100
14123
  additionalProperties: false
14101
14124
  };
14102
14125
 
@@ -14112,7 +14135,7 @@ class StringIncludesTask extends Task81 {
14112
14135
  return outputSchema74;
14113
14136
  }
14114
14137
  async executeReactive(input2, _output, _context) {
14115
- return { result: input2.value.includes(input2.search) };
14138
+ return { included: input2.text.includes(input2.search) };
14116
14139
  }
14117
14140
  }
14118
14141
  Workflow57.prototype.stringIncludes = CreateWorkflow56(StringIncludesTask);
@@ -14125,10 +14148,10 @@ import {
14125
14148
  var inputSchema76 = {
14126
14149
  type: "object",
14127
14150
  properties: {
14128
- values: {
14151
+ texts: {
14129
14152
  type: "array",
14130
14153
  items: { type: "string" },
14131
- title: "Values",
14154
+ title: "Texts",
14132
14155
  description: "Array of strings to join"
14133
14156
  },
14134
14157
  separator: {
@@ -14138,19 +14161,19 @@ var inputSchema76 = {
14138
14161
  default: ""
14139
14162
  }
14140
14163
  },
14141
- required: ["values"],
14164
+ required: ["texts"],
14142
14165
  additionalProperties: false
14143
14166
  };
14144
14167
  var outputSchema75 = {
14145
14168
  type: "object",
14146
14169
  properties: {
14147
- result: {
14170
+ text: {
14148
14171
  type: "string",
14149
- title: "Result",
14172
+ title: "Text",
14150
14173
  description: "Joined string"
14151
14174
  }
14152
14175
  },
14153
- required: ["result"],
14176
+ required: ["text"],
14154
14177
  additionalProperties: false
14155
14178
  };
14156
14179
 
@@ -14167,7 +14190,7 @@ class StringJoinTask extends Task82 {
14167
14190
  }
14168
14191
  async executeReactive(input2, _output, _context) {
14169
14192
  const separator = input2.separator ?? "";
14170
- return { result: input2.values.join(separator) };
14193
+ return { text: input2.texts.join(separator) };
14171
14194
  }
14172
14195
  }
14173
14196
  Workflow58.prototype.stringJoin = CreateWorkflow57(StringJoinTask);
@@ -14180,25 +14203,25 @@ import {
14180
14203
  var inputSchema77 = {
14181
14204
  type: "object",
14182
14205
  properties: {
14183
- value: {
14206
+ text: {
14184
14207
  type: "string",
14185
- title: "Value",
14208
+ title: "Text",
14186
14209
  description: "Input string"
14187
14210
  }
14188
14211
  },
14189
- required: ["value"],
14212
+ required: ["text"],
14190
14213
  additionalProperties: false
14191
14214
  };
14192
14215
  var outputSchema76 = {
14193
14216
  type: "object",
14194
14217
  properties: {
14195
- result: {
14218
+ length: {
14196
14219
  type: "integer",
14197
- title: "Result",
14220
+ title: "Length",
14198
14221
  description: "Length of the string"
14199
14222
  }
14200
14223
  },
14201
- required: ["result"],
14224
+ required: ["length"],
14202
14225
  additionalProperties: false
14203
14226
  };
14204
14227
 
@@ -14214,7 +14237,7 @@ class StringLengthTask extends Task83 {
14214
14237
  return outputSchema76;
14215
14238
  }
14216
14239
  async executeReactive(input2, _output, _context) {
14217
- return { result: input2.value.length };
14240
+ return { length: input2.text.length };
14218
14241
  }
14219
14242
  }
14220
14243
  Workflow59.prototype.stringLength = CreateWorkflow58(StringLengthTask);
@@ -14227,25 +14250,25 @@ import {
14227
14250
  var inputSchema78 = {
14228
14251
  type: "object",
14229
14252
  properties: {
14230
- value: {
14253
+ text: {
14231
14254
  type: "string",
14232
- title: "Value",
14255
+ title: "Text",
14233
14256
  description: "Input string"
14234
14257
  }
14235
14258
  },
14236
- required: ["value"],
14259
+ required: ["text"],
14237
14260
  additionalProperties: false
14238
14261
  };
14239
14262
  var outputSchema77 = {
14240
14263
  type: "object",
14241
14264
  properties: {
14242
- result: {
14265
+ text: {
14243
14266
  type: "string",
14244
- title: "Result",
14267
+ title: "Text",
14245
14268
  description: "Lowercased string"
14246
14269
  }
14247
14270
  },
14248
- required: ["result"],
14271
+ required: ["text"],
14249
14272
  additionalProperties: false
14250
14273
  };
14251
14274
 
@@ -14261,7 +14284,7 @@ class StringLowerCaseTask extends Task84 {
14261
14284
  return outputSchema77;
14262
14285
  }
14263
14286
  async executeReactive(input2, _output, _context) {
14264
- return { result: input2.value.toLowerCase() };
14287
+ return { text: input2.text.toLowerCase() };
14265
14288
  }
14266
14289
  }
14267
14290
  Workflow60.prototype.stringLowerCase = CreateWorkflow59(StringLowerCaseTask);
@@ -14274,9 +14297,9 @@ import {
14274
14297
  var inputSchema79 = {
14275
14298
  type: "object",
14276
14299
  properties: {
14277
- value: {
14300
+ text: {
14278
14301
  type: "string",
14279
- title: "Value",
14302
+ title: "Text",
14280
14303
  description: "Input string"
14281
14304
  },
14282
14305
  search: {
@@ -14290,19 +14313,19 @@ var inputSchema79 = {
14290
14313
  description: "Replacement string"
14291
14314
  }
14292
14315
  },
14293
- required: ["value", "search", "replace"],
14316
+ required: ["text", "search", "replace"],
14294
14317
  additionalProperties: false
14295
14318
  };
14296
14319
  var outputSchema78 = {
14297
14320
  type: "object",
14298
14321
  properties: {
14299
- result: {
14322
+ text: {
14300
14323
  type: "string",
14301
- title: "Result",
14324
+ title: "Text",
14302
14325
  description: "String with all occurrences replaced"
14303
14326
  }
14304
14327
  },
14305
- required: ["result"],
14328
+ required: ["text"],
14306
14329
  additionalProperties: false
14307
14330
  };
14308
14331
 
@@ -14318,7 +14341,7 @@ class StringReplaceTask extends Task85 {
14318
14341
  return outputSchema78;
14319
14342
  }
14320
14343
  async executeReactive(input2, _output, _context) {
14321
- return { result: input2.value.replaceAll(input2.search, input2.replace) };
14344
+ return { text: input2.text.replaceAll(input2.search, input2.replace) };
14322
14345
  }
14323
14346
  }
14324
14347
  Workflow61.prototype.stringReplace = CreateWorkflow60(StringReplaceTask);
@@ -14331,9 +14354,9 @@ import {
14331
14354
  var inputSchema80 = {
14332
14355
  type: "object",
14333
14356
  properties: {
14334
- value: {
14357
+ text: {
14335
14358
  type: "string",
14336
- title: "Value",
14359
+ title: "Text",
14337
14360
  description: "Input string"
14338
14361
  },
14339
14362
  start: {
@@ -14347,19 +14370,19 @@ var inputSchema80 = {
14347
14370
  description: "End index (exclusive, supports negative indexing)"
14348
14371
  }
14349
14372
  },
14350
- required: ["value", "start"],
14373
+ required: ["text", "start"],
14351
14374
  additionalProperties: false
14352
14375
  };
14353
14376
  var outputSchema79 = {
14354
14377
  type: "object",
14355
14378
  properties: {
14356
- result: {
14379
+ text: {
14357
14380
  type: "string",
14358
- title: "Result",
14381
+ title: "Text",
14359
14382
  description: "Extracted substring"
14360
14383
  }
14361
14384
  },
14362
- required: ["result"],
14385
+ required: ["text"],
14363
14386
  additionalProperties: false
14364
14387
  };
14365
14388
 
@@ -14375,7 +14398,7 @@ class StringSliceTask extends Task86 {
14375
14398
  return outputSchema79;
14376
14399
  }
14377
14400
  async executeReactive(input2, _output, _context) {
14378
- return { result: input2.value.slice(input2.start, input2.end) };
14401
+ return { text: input2.text.slice(input2.start, input2.end) };
14379
14402
  }
14380
14403
  }
14381
14404
  Workflow62.prototype.stringSlice = CreateWorkflow61(StringSliceTask);
@@ -14406,13 +14429,13 @@ var inputSchema81 = {
14406
14429
  var outputSchema80 = {
14407
14430
  type: "object",
14408
14431
  properties: {
14409
- result: {
14432
+ text: {
14410
14433
  type: "string",
14411
- title: "Result",
14434
+ title: "Text",
14412
14435
  description: "Template with placeholders replaced by values"
14413
14436
  }
14414
14437
  },
14415
- required: ["result"],
14438
+ required: ["text"],
14416
14439
  additionalProperties: false
14417
14440
  };
14418
14441
 
@@ -14428,11 +14451,11 @@ class StringTemplateTask extends Task87 {
14428
14451
  return outputSchema80;
14429
14452
  }
14430
14453
  async executeReactive(input2, _output, _context) {
14431
- let result = input2.template;
14454
+ let text = input2.template;
14432
14455
  for (const [key, value] of Object.entries(input2.values)) {
14433
- result = result.replaceAll(`{{${key}}}`, String(value));
14456
+ text = text.replaceAll(`{{${key}}}`, String(value));
14434
14457
  }
14435
- return { result };
14458
+ return { text };
14436
14459
  }
14437
14460
  }
14438
14461
  Workflow63.prototype.stringTemplate = CreateWorkflow62(StringTemplateTask);
@@ -14445,25 +14468,25 @@ import {
14445
14468
  var inputSchema82 = {
14446
14469
  type: "object",
14447
14470
  properties: {
14448
- value: {
14471
+ text: {
14449
14472
  type: "string",
14450
- title: "Value",
14473
+ title: "Text",
14451
14474
  description: "Input string"
14452
14475
  }
14453
14476
  },
14454
- required: ["value"],
14477
+ required: ["text"],
14455
14478
  additionalProperties: false
14456
14479
  };
14457
14480
  var outputSchema81 = {
14458
14481
  type: "object",
14459
14482
  properties: {
14460
- result: {
14483
+ text: {
14461
14484
  type: "string",
14462
- title: "Result",
14485
+ title: "Text",
14463
14486
  description: "Trimmed string"
14464
14487
  }
14465
14488
  },
14466
- required: ["result"],
14489
+ required: ["text"],
14467
14490
  additionalProperties: false
14468
14491
  };
14469
14492
 
@@ -14479,7 +14502,7 @@ class StringTrimTask extends Task88 {
14479
14502
  return outputSchema81;
14480
14503
  }
14481
14504
  async executeReactive(input2, _output, _context) {
14482
- return { result: input2.value.trim() };
14505
+ return { text: input2.text.trim() };
14483
14506
  }
14484
14507
  }
14485
14508
  Workflow64.prototype.stringTrim = CreateWorkflow63(StringTrimTask);
@@ -14492,25 +14515,25 @@ import {
14492
14515
  var inputSchema83 = {
14493
14516
  type: "object",
14494
14517
  properties: {
14495
- value: {
14518
+ text: {
14496
14519
  type: "string",
14497
- title: "Value",
14520
+ title: "Text",
14498
14521
  description: "Input string"
14499
14522
  }
14500
14523
  },
14501
- required: ["value"],
14524
+ required: ["text"],
14502
14525
  additionalProperties: false
14503
14526
  };
14504
14527
  var outputSchema82 = {
14505
14528
  type: "object",
14506
14529
  properties: {
14507
- result: {
14530
+ text: {
14508
14531
  type: "string",
14509
- title: "Result",
14532
+ title: "Text",
14510
14533
  description: "Uppercased string"
14511
14534
  }
14512
14535
  },
14513
- required: ["result"],
14536
+ required: ["text"],
14514
14537
  additionalProperties: false
14515
14538
  };
14516
14539
 
@@ -14526,7 +14549,7 @@ class StringUpperCaseTask extends Task89 {
14526
14549
  return outputSchema82;
14527
14550
  }
14528
14551
  async executeReactive(input2, _output, _context) {
14529
- return { result: input2.value.toUpperCase() };
14552
+ return { text: input2.text.toUpperCase() };
14530
14553
  }
14531
14554
  }
14532
14555
  Workflow65.prototype.stringUpperCase = CreateWorkflow64(StringUpperCaseTask);
@@ -16128,13 +16151,12 @@ export {
16128
16151
  searchMcpRegistryPage,
16129
16152
  searchMcpRegistry,
16130
16153
  safeFetch,
16131
- resolveImageInput,
16132
16154
  resolveAuthSecrets,
16133
16155
  resetSafeFetch,
16134
16156
  registerSafeFetch,
16135
16157
  registerMcpTaskDeps,
16136
16158
  registerMcpServer,
16137
- registerImageRasterCodec,
16159
+ registerImageRasterCodec2 as registerImageRasterCodec,
16138
16160
  registerCommonTasks2 as registerCommonTasks,
16139
16161
  registerBrowserDeps,
16140
16162
  produceImageOutput,
@@ -16155,16 +16177,14 @@ export {
16155
16177
  lambda,
16156
16178
  json,
16157
16179
  javaScript,
16158
- isDataUriImage,
16159
16180
  getSafeFetchImpl,
16160
16181
  getMcpTaskDeps,
16161
16182
  getMcpServerConfig,
16162
16183
  getMcpServer,
16163
- getImageRasterCodec,
16184
+ getImageRasterCodec2 as getImageRasterCodec,
16164
16185
  getGlobalMcpServers,
16165
16186
  getGlobalMcpServerRepository,
16166
16187
  getBrowserDeps,
16167
- formatImageOutput,
16168
16188
  fileLoader,
16169
16189
  fetchUrl,
16170
16190
  extractDataUriMimeType,
@@ -16262,6 +16282,7 @@ export {
16262
16282
  ImageBinaryOrDataUriSchema,
16263
16283
  HumanInputTask,
16264
16284
  HumanApprovalTask,
16285
+ HexColorSchema,
16265
16286
  FileLoaderTask2 as FileLoaderTask,
16266
16287
  FetchUrlTask,
16267
16288
  FetchUrlJob,
@@ -16269,7 +16290,9 @@ export {
16269
16290
  DebugLogTask,
16270
16291
  DateFormatTask,
16271
16292
  CredentialStoreOAuthProvider,
16293
+ ColorValueSchema,
16272
16294
  ColorSchema,
16295
+ ColorFromSchemaOptions,
16273
16296
  CDPBrowserBackend,
16274
16297
  BunWebViewBackend,
16275
16298
  BrowserWaitTask,
@@ -16303,4 +16326,4 @@ export {
16303
16326
  ArrayTask
16304
16327
  };
16305
16328
 
16306
- //# debugId=3F14772045E1F99364756E2164756E21
16329
+ //# debugId=0C340BEB980722A064756E2164756E21