import { PaintDirector, PaintEditorController, PaintPresence, type PaintDirectorOptions, type PaintEditorOptions, type PaintEditorState, type PaintEffectsToolProviderOptions } from '@pixerate/editor/paint-editor'; import type { EffectProvider } from '@pixerate/editor/effects'; import type { ToolRegistry } from '@pixerate/editor/tools'; /** * A `PaintEditorController` (created from `options`, or the one given) with its state as a * rune: `editor.state` updates after every change. Call `destroy()` to unsubscribe. */ export declare function createReactivePaintEditor(options?: PaintEditorOptions | PaintEditorController): { readonly controller: PaintEditorController; readonly state: PaintEditorState; editorDocument: import("@pixerate/editor/persistence").EditorDocument; destroy(): void; }; /** The controller's state as a rune, for components (subscribe in an effect, see GOTCHAS). */ export declare function paintEditorState(controller: () => PaintEditorController): { readonly current: PaintEditorState; }; /** * A `PaintPresence` and `PaintDirector` for a paint editor: pass `presence` to `PaintEditor` (or * `PaintCanvas`) and `director` to `createPaintEditorToolProvider`, so agent strokes are painted * live by a cursor on the canvas. */ export declare function createPaintDirector(controller: PaintEditorController, options?: Omit): { presence: PaintPresence; director: PaintDirector; }; export { button, chip } from '../brushes/styles.js'; export declare const panel = "flex flex-col gap-2 text-xs text-slate-200"; /** Runs `fn` and returns the error message it threw (or a rejected promise's, through `onAsync`). */ export declare function attempt(fn: () => unknown, onError: (msg: string | null) => void): void; /** * The effects the panel offers as a rune: the controller's provider with the painting's authored * effects (`controller.effectsCatalog`), following `setEffectsProvider` and saved or removed * authored effects. */ export declare function paintEffectsProvider(controller: () => PaintEditorController): { readonly current: EffectProvider | null; }; /** * Registers the paint editor's provider-effect tools (`set_paper_effect`, `add_effect_layer`, * `fill_layer_with_effect`, `apply_effect`, …) for the lifetime of the calling component. Before * an effects provider is registered the read tools say so and the write tools refuse. Also * registers the effect authoring tools (`open_effect_authoring`, `save_authored_effect`, …). */ export declare function usePaintEffectsTools(registry: ToolRegistry | null | undefined | (() => ToolRegistry | null | undefined), controller: PaintEditorController, options?: PaintEffectsToolProviderOptions): void;