import { Context, ContextManager } from '../context'; import { Observable } from '../observable'; /** * Context containing snapshot information. * @zcontext * */ export declare class SnapshotContext extends Context { /** * Observable holding the current canvas image data URL. * @zui */ readonly canvasImage: Observable; /** * Observable indicating whether the Share API is supported in the current environment. * @zui */ readonly shareAPISupported: Observable; /** * Observable determining if the current canvas content can be shared. * @zui */ readonly canShare: Observable; /** * Observable containing the canvas image as a File object. */ readonly canvasFile: Observable; /** * Observable storing the file name for the snapshot. * Updates the file upon change. */ readonly fileName: Observable; /** * Observable holding the text content to be shared with the snapshot. */ readonly text: Observable; /** * Observable containing the title for the snapshot. */ readonly title: Observable; /** * Observable storing the file type for the snapshot (e.g., 'image/png'). * Updates the file upon change. */ readonly fileType: Observable; /** * Observable representing the quality setting of the snapshot image. */ readonly quality: Observable; /** * Creates an instance of SnapshotContext. * @param contextManager - The current ContextManager */ constructor(contextManager: ContextManager); /** * Converts the canvas image to a file. */ updateFile: () => Promise; } /** * Retrieves the current canvas image as a data URL. * @param ctx The ContextManager instance to access the SnapshotContext. * @returns An Observable containing the canvas image data URL. */ export declare function useCanvasImage(ctx: ContextManager): Observable; /** * Checks if the Share API is supported in the current environment. * @param ctx The ContextManager instance to access the SnapshotContext. * @returns An Observable indicating whether the Share API is supported. */ export declare function useShareAPISupported(ctx: ContextManager): Observable; /** * Determines if the current canvas content can be shared via the Share API. * @param ctx The ContextManager instance to access the SnapshotContext. * @returns An Observable indicating whether the canvas can be shared. */ export declare function useCanShare(ctx: ContextManager): Observable; /** * Retrieves the file representation of the canvas image. * @param ctx The ContextManager instance to access the SnapshotContext. * @returns An Observable containing the canvas image as a File object. */ export declare function useCanvasFile(ctx: ContextManager): Observable; /** * Retrieves the file name for the snapshot to be shared. * @param ctx The ContextManager instance to access the SnapshotContext. * @returns An Observable containing the file name. */ export declare function useFileName(ctx: ContextManager): Observable; /** * Retrieves the text content to be shared along with the snapshot. * @param ctx The ContextManager instance to access the SnapshotContext. * @returns An Observable containing the share text. */ export declare function useText(ctx: ContextManager): Observable; /** * Retrieves the title for the snapshot to be shared. * @param ctx The ContextManager instance to access the SnapshotContext. * @returns An Observable containing the share title. */ export declare function useTitle(ctx: ContextManager): Observable; /** * Retrieves the file type for the snapshot to be shared. * @param ctx The ContextManager instance to access the SnapshotContext. * @returns An Observable containing the file type (e.g., 'image/png'). */ export declare function useFileType(ctx: ContextManager): Observable; /** * Retrieves the quality setting for the snapshot image. * @param ctx The ContextManager instance to access the SnapshotContext. * @returns An Observable containing the image quality value. */ export declare function useQuality(ctx: ContextManager): Observable;