import * as THREE from 'three'; import * as React from 'react'; import Reconciler from '../../react-reconciler/index.js'; import { IsAllOptional } from "./utils.js"; import type { RootStore } from "./store.js"; import { type EventHandlers } from "./events.js"; import type { ThreeElement } from "../three-types.js"; export type AttachFnType = (parent: any, self: O) => () => void; export type AttachType = string | AttachFnType; export type ConstructorRepresentation = new (...args: any[]) => T; export interface Catalogue { [name: string]: ConstructorRepresentation; } export type Args = T extends ConstructorRepresentation ? T extends typeof THREE.Color ? [r: number, g: number, b: number] | [color: THREE.ColorRepresentation] : ConstructorParameters : any[]; type ArgsProp

= P extends ConstructorRepresentation ? IsAllOptional> extends true ? { args?: Args

; } : { args: Args

; } : { args: unknown[]; }; export type InstanceProps = ArgsProp

& { object?: T; dispose?: null; attach?: AttachType; onUpdate?: (self: T) => void; }; export interface Instance { root: RootStore; type: string; parent: Instance | null; children: Instance[]; props: InstanceProps & Record; object: O & { __r3f?: Instance; }; eventCount: number; handlers: Partial; attach?: AttachType; previousAttach?: any; previousVisible: boolean | undefined; isHidden: boolean; } export declare function extend(objects: T): React.ExoticComponent>; export declare function extend(objects: T): void; export declare const reconciler: Reconciler.Reconciler, void, Instance, never, any>; /** * Force React to flush any updates inside the provided callback synchronously and immediately. * All the same caveats documented for react-dom's `flushSync` apply here (see https://react.dev/reference/react-dom/flushSync). * Nevertheless, sometimes one needs to render synchronously, for example to keep DOM and 3D changes in lock-step without * having to revert to a non-React solution. Note: this will only flush updates within the `Canvas` root. */ export declare function flushSync(fn: () => R): R; export {};