videx-3d
Version:
React 3D component library designed for sub surface visualizations in the browser
35 lines (34 loc) • 1.15 kB
TypeScript
import { Remote } from 'comlink';
import { ReactNode } from 'react';
import { GeneratorRegistry } from '../sdk/data/GeneratorRegistry';
/**
* GeneratorsProvider props
* @expand
*/
export type GeneratorsProviderProps = {
registry: GeneratorRegistry | Remote<GeneratorRegistry>;
concurrency?: number;
signal?: AbortSignal;
children: ReactNode;
};
/**
* Provides sub components with the `GeneratorRegistry`, which allow access to the
* registered _generator_ functions. You can create your own provider if needed, but it will need to
* provide an implementation of the `GeneratorsContext`.
*
* @example
* <GeneratorsProvider registry={registry}>
* { ... }
* </GeneratorsProvider>
*
* @remarks
* Components should use the `useGenerator` hook to access generator functions.
*
* @see {@link GeneratorRegistry}
* @see {@link GeneratorsContext}
* @see {@link useGenerator}
* @see [Generators](/videx-3d/docs/documents/generators.html)
*
* @group Components
*/
export declare const GeneratorsProvider: ({ registry, concurrency, signal, children }: GeneratorsProviderProps) => import("react/jsx-runtime").JSX.Element;