import { z } from "zod"; export type EditOperation = "replace" | "insert" | "append"; export interface CodeEditParams { operation: EditOperation; search?: string | undefined; replaceWith?: string | undefined; content?: string | undefined; position?: "before" | "after" | undefined; all?: boolean | undefined; } export interface CodeEditResult { changed: boolean; newBody: string; occurrences: number; reason?: string; } /** * Pure section-editor: applies a surgical edit to a widget code section * (html/css/js) in memory. All matching is literal (no regex). Returns * `changed: false` (with a reason) when the edit is a no-op or its anchor / * search text is absent — the caller then skips the write. */ export declare function applyCodeEdit(current: string, params: CodeEditParams): CodeEditResult; declare const paramsSchema: z.ZodObject<{ siteId: z.ZodNumber; identifier: z.ZodUnion; section: z.ZodEnum<{ html: "html"; css: "css"; js: "js"; }>; operation: z.ZodEnum<{ replace: "replace"; append: "append"; insert: "insert"; }>; search: z.ZodOptional; replaceWith: z.ZodOptional; content: z.ZodOptional; position: z.ZodDefault>; all: z.ZodDefault; preview: z.ZodDefault; }, z.core.$strip>; export type ParamsSchema = z.infer; export declare const WidgetCodeEdit: Tool; export {}; //# sourceMappingURL=WidgetCodeEdit.d.ts.map