import { RUNTIME_BOOTSTRAP_ATTR } from "@hyperframes/core/compiler"; import { refusedPreviewMessage, STUDIO_PREVIEW_ERRORS, } from "@hyperframes/core/studio-preview-mark"; const htmlText = (text: string) => text.replace(/&/g, "&").replace(//g, ">"); export const previewRuntimeTag = (runtimeUrl: string) => ``; export function previewRefusalPage(message: string, runtimeUrl: string): string { const script = JSON.stringify(message).replace(/${previewRuntimeTag(runtimeUrl)}

${htmlText(message)}

`; } export function previewErrorPage(status: number, runtimeUrl: string): string { return previewRefusalPage(refusedPreviewMessage(status), runtimeUrl); }