import * as React from 'react'; import { DragDropManager, BackendFactory } from '@~sunsimiao/cj-dnd-core'; import { ContextComponent } from './interfaces'; /** * The React context type */ export interface DragDropContext { dragDropManager: DragDropManager | undefined; } /** * Create the React Context */ export declare const Consumer: React.ComponentType>>, Provider: React.ComponentType>>; /** * Creates the context object we're providing * @param backend * @param context */ export declare function createChildContext(backend: BackendFactory, context?: BackendContext): { dragDropManager: DragDropManager; }; export interface DragDropContextProviderProps { backend: BackendFactory; context?: BackendContext; } /** * A React component that provides the React-DnD context */ export declare const DragDropContextProvider: React.SFC>; /** * Wrap the root component of your application with DragDropContext decorator to set up React DnD. * This lets you specify the backend, and sets up the shared DnD state behind the scenes. * @param backendFactory The DnD backend factory * @param backendContext The backend context */ export declare function DragDropContext(backendFactory: BackendFactory, backendContext?: any): | React.StatelessComponent>(DecoratedComponent: TargetClass) => TargetClass & ContextComponent; export declare const manager: DragDropManager<{}>;