UNPKG

histoire

Version:

A fast story book powered by Vite

34 lines • 1.41 kB
import type { HistoireGlobals } from '@histoire/protocol'; /** Document-only options with no source, secret or filesystem paths. */ export interface PreviewScriptOptions { /** Captured target and generation authority. */ authority: { origin: string; storyId: string; variantId: string; nonce: string; epoch: string; active: boolean; }; /** Same-origin sandbox URL using shared preview URL construction. */ sandboxUrl: string; /** Existing preview settings message payload. */ settings: { responsiveWidth: number; responsiveHeight: number; rotate: false; backgroundColor: string; checkerboard: false; textDirection: 'ltr' | 'rtl'; globals?: HistoireGlobals; }; /** Existing Histoire preference, written before sandbox creation. */ colorScheme?: 'light' | 'dark'; /** Complete isolated cell props; readiness includes their existing runtime acknowledgement. */ propsOverride?: Record<string, unknown>; } /** Escape JSON for executable script text rather than an HTML attribute. */ export declare function serializePreviewScriptData(value: unknown): string; /** Fixed trusted bootstrap; listener is installed before iframe insertion. */ export declare function renderPreviewScript(options: PreviewScriptOptions): string; //# sourceMappingURL=preview-script.d.ts.map