import type { Paper, Surface } from "@visuallyjs/browser-ui"; import { BrowserUISvelteModel } from "./index"; /** * Key for the surface context * @internal */ export declare const STORE_KEY: unique symbol; export interface ComponentRef { set: (o: T) => void; listen: (l: (o: T) => any) => void; } /** * Handle for a surface - use `set` to set the surface and `listen` to register a listener. * @internal */ export interface SurfaceRef { set: (surface: Surface) => void; listen: (l: (s: Surface) => any) => void; } /** * Handle for a paper - use `set` to set the paper and `listen` to register a listener. * @internal */ export interface PaperRef { set: (paper: Paper) => void; listen: (l: (s: Paper) => any) => void; } /** * Create a surface context, and set it on Svelte via `setContext`. * @internal */ export declare function internal_createSurfaceContext(): SurfaceRef; /** * Create a paper context, and set it on Svelte via `setContext`. * @internal */ export declare function internal_createPaperContext(): PaperRef; /** * Gets the current surface context from Svelte, optionally creating it if it does not exist. The Surface and the SurfaceProvider both set `doNotCreate` to false; other components such as miniview/controls must set it to true. * This method is NOT to be invoked by users of the API. Use {@link useSurface} to access the current Surface. * @param doNotCreate * @internal */ export declare function internal_getSurfaceContext(doNotCreate: boolean): SurfaceRef; /** * Gets the current paper context from Svelte, optionally creating it if it does not exist. The Paper and the PaperProvider both set `doNotCreate` to false; other components such as miniview/controls must set it to true. * This method is NOT to be invoked by users of the API. Use {@link usePaper} to access the current Paper. * @param doNotCreate * @internal */ export declare function internal_getPaperContext(doNotCreate: boolean): PaperRef; /** * Hook to expose the current model. This hook is asynchronous and returns a Promise. * @group Hooks */ export declare function useVisuallyJsModel(): Promise;