/** * @copyright * Copyright 2026 Steven Roussey * All Rights Reserved */ import { CreateWorkflow, type TaskConfig } from "@workglow/task-graph"; import { ImageFilterTask, type ImageFilterInput, type ImageFilterOutput } from "../ImageFilterTask"; import type { BorderParams } from "./border.cpu"; export interface ImageBorderTaskInput extends ImageFilterInput { borderWidth?: number; color: string | { r: number; g: number; b: number; a?: number; }; } export type ImageBorderTaskOutput = ImageFilterOutput & Record; export declare class ImageBorderTask extends ImageFilterTask, ImageBorderTaskOutput> { static readonly type = "ImageBorderTask"; static readonly category = "Image"; static title: string; static description: string; static inputSchema(): { readonly type: "object"; readonly properties: { readonly image: { readonly oneOf: readonly [{ readonly type: "string"; readonly format: "image:data-uri"; }, { readonly type: "object"; readonly format: "image"; }]; readonly title: "Image"; readonly description: "Image"; readonly format: "image"; }; readonly borderWidth: { readonly type: "integer"; readonly title: "Border Width"; readonly description: "Border width in pixels"; readonly minimum: 1; readonly default: 10; }; readonly color: { readonly oneOf: readonly [{ readonly type: "string"; readonly pattern: "^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"; }, { readonly type: "object"; readonly properties: { readonly r: { readonly type: "integer"; readonly minimum: 0; readonly maximum: 255; }; readonly g: { readonly type: "integer"; readonly minimum: 0; readonly maximum: 255; }; readonly b: { readonly type: "integer"; readonly minimum: 0; readonly maximum: 255; }; readonly a: { readonly type: "integer"; readonly minimum: 0; readonly maximum: 255; }; }; readonly required: readonly ["r", "g", "b"]; readonly additionalProperties: false; }]; readonly title: "Color"; readonly description: "Border color"; readonly default: "#000000"; }; }; readonly required: readonly ["image", "color"]; readonly additionalProperties: false; }; static outputSchema(): { readonly type: "object"; readonly properties: { readonly image: { readonly oneOf: readonly [{ readonly type: "string"; readonly format: "image:data-uri"; }, { readonly type: "object"; readonly format: "image"; }]; readonly title: "Image"; readonly description: "Image"; readonly format: "image"; }; }; readonly required: readonly ["image"]; readonly additionalProperties: false; }; protected readonly filterName = "border"; protected opParams(input: ImageBorderTaskInput & Record): BorderParams; protected scalePreviewParams({ borderWidth, color }: BorderParams, s: number): BorderParams; } declare module "@workglow/task-graph" { interface Workflow { imageBorder: CreateWorkflow, ImageBorderTaskOutput, TaskConfig>; } }