import type { Snippet } from 'svelte'; import { type Brush, type BrushHostProfile, type BrushSource } from '@pixerate/editor/brushes'; interface Props { /** The brush being edited, as facets. */ brush: Brush; /** * What the host renders (default the paint editor): only its sections, controls and options * are shown. Facets of the brush it can't use stay as they are, named in a note. */ profile?: BrushHostProfile; /** Called with the whole brush after each change (normalised). */ onchange: (brush: Brush) => void; /** A live preview stroke of `brush`: pixels (e.g. `controller.brushThumbnail`) or an image URL. */ preview?: { width: number; height: number; data: Uint8ClampedArray; } | string | null; /** The colour behind an image-URL preview, for transparent previews (see `brushPreviewColours`). */ previewBackground?: string; /** With it, a "Save" button (labelled `saveLabel`) saves the brush in place. */ onsave?: () => unknown; /** The Save button's label (default "Save"; e.g. "Save a copy" for a built-in). */ saveLabel?: string; /** With it, a name field and "Save brush" save the brush under that name. */ onsaveas?: (name: string) => unknown; /** Extra controls a host adds to a section (e.g. the sticker picker for stamps). */ extra?: Snippet<[string]>; /** The library's image sources, offered as stamps and as grain. */ sources?: ReadonlyArray>; /** * With it, "Add image…" buttons for an image tip and for grain: it stores the picked file as a * source (e.g. `addBrushSourceFromFile`) and returns its `source:` ref. */ onaddsource?: (file: File) => Promise; class?: string; } declare const BrushEditor: import("svelte").Component; type BrushEditor = ReturnType; export default BrushEditor;