import type { AdapterContext, CanvasTarget, CanvasWriteResult, CanvasWriter } from "@design-parity/core"; /** POST-capable fetch (the read client's `FetchLike` only models GETs). */ export type CanvasFetch = (input: string, init: { method: string; headers: Record; body: string; }) => Promise; export interface FigmaCanvasWriterOptions { /** * The Code-to-Canvas bridge endpoint (a Figma plugin / Dev Mode hook). Falls * back to `FIGMA_CANVAS_ENDPOINT` from the adapter context env. */ endpoint?: string; /** * Bearer token for the bridge. Falls back to `FIGMA_CANVAS_TOKEN`, then * `FIGMA_OAUTH_TOKEN`, from the adapter context env. */ token?: string; /** Injectable fetch. Defaults to `globalThis.fetch`. */ fetch?: CanvasFetch; } export declare class FigmaCanvasWriter implements CanvasWriter { #private; readonly source: "figma"; constructor(opts?: FigmaCanvasWriterOptions); write(target: CanvasTarget, ctx: AdapterContext): Promise; } /** Convenience factory. */ export declare function createFigmaCanvasWriter(opts?: FigmaCanvasWriterOptions): FigmaCanvasWriter; //# sourceMappingURL=canvas-writer.d.ts.map