@stacksjs/stx
Version:
A performant UI Framework. Powered by Bun.
34 lines • 965 B
TypeScript
import type { ServerStoryFile, StoryContext } from './types';
/**
* Check if desktop preview is available
*/
export declare function isDesktopPreviewAvailable(): Promise<boolean>;
/**
* Open a story in a native desktop window
*/
export declare function openDesktopPreview(ctx: StoryContext, story: ServerStoryFile, variantId: string, options?: DesktopPreviewOptions): Promise<DesktopPreviewInstance | null>;
/**
* Get desktop preview button HTML
*/
export declare function getDesktopPreviewButton(storyId: string, variantId: string): string;
/**
* Get desktop preview styles
*/
export declare function getDesktopPreviewStyles(): string;
/**
* Desktop preview options
*/
export declare interface DesktopPreviewOptions {
width?: number
height?: number
title?: string
devTools?: boolean
}
/**
* Desktop preview instance
*/
export declare interface DesktopPreviewInstance {
close: () => void
reload: () => void
update: (html: string) => void
}