import * as React from 'react'; import type Reconciler from '../../react-reconciler/index.js'; import { type AppliedConfiguration, type RenderProps } from "./configuration.js"; import { type TrackedPromise } from "./promise.js"; import { type RootStore } from "./store.js"; interface OffscreenCanvas extends EventTarget { } export interface Root { fiber: Reconciler.FiberRoot; store: RootStore; state: RootStateMachine; /** Settles once all accepted configuration has been applied */ ready: TrackedPromise; configuration: AppliedConfiguration; /** Whether R3F built `gl` (from defaults, props or a factory) and so disposes it on unmount */ ownsRenderer: boolean; } export declare const _roots: Map; export type RootStateMachine = { status: 'open'; } | { status: 'closing'; token: symbol; } | { status: 'disposed'; }; export interface ReconcilerRoot { ready: TrackedPromise; configure: (config?: RenderProps) => TrackedPromise>; render: (element: React.ReactNode) => RootStore; unmount: () => void; } export declare function createRoot(canvas: TCanvas): ReconcilerRoot; export declare function unmountComponentAtNode(canvas: TCanvas, callback?: (canvas: TCanvas) => void): void; export {};