import { BrowserUI, BrowserUIModel, Diagram, Paper, Surface } from "@visuallyjs/browser-ui"; import { BrowserUIVueModel } from "./browser-ui-vue"; import { ShallowRef, UnwrapRef } from "vue"; export declare const VisuallyJsServiceKey: unique symbol; /** * Provides access to Surface/Diagram/Paper ui components, as well as models. This service is provided in the root as an application-wide instance, but each of the providers also creates and provides an instance of this service. */ export declare class VisuallyJsService { context: string; _modelQueue: Array<(s: BrowserUIVueModel) => void>; _surfaceQueue: Array<(s: Surface) => void>; _diagramQueue: Array<(s: Diagram) => void>; _paperQueue: Array<(s: Paper) => void>; _model: BrowserUIVueModel; _surface: Surface; _diagram: Diagram; _paper: Paper; /** * The current surface in scope. May be null. */ surface: ShallowRef>; /** * The current model in scope. May be null. */ model: ShallowRef; /** * The current paper in scope. May be null. */ paper: ShallowRef>; /** * The current diagram in scope. May be null. */ diagram: ShallowRef>; /** * The current ui (a surface or paper) in scope. May be null. */ ui: ShallowRef>; constructor(context: string); getSurface(cb: (s: Surface) => any): void; getDiagram(cb: (s: Diagram) => any): void; getPaper(cb: (s: Paper) => any): void; getModel(cb: (s: BrowserUIVueModel) => any): void; /** * Direct access to the model. Used when a component wants to know if there is a model or not, and it will use the * existing model if found. * @internal */ getModelDirect(): BrowserUIVueModel; private _dispatchOrQueue; setSurface(s: Surface): void; setDiagram(s: Diagram): void; setPaper(s: Paper): void; private _setModel; private _flush; }