Files
t3code/apps/web/src/components/preview/previewEmptyStateLogic.ts
T
Julius Marminge dd739c880d Port browser preview annotations to desktop
- Add IPC and runtime plumbing for preview annotation theming
- Generate and ship annotation CSS for the desktop overlay
- Add pointer and artifact handling for browser preview interactions
2026-06-13 22:18:37 -07:00

12 lines
464 B
TypeScript

import type { PreviewSessionSnapshot, ProjectScript } from "@t3tools/contracts";
export function shouldShowPreviewEmptyState(snapshot: PreviewSessionSnapshot | null): boolean {
return snapshot === null || snapshot.navStatus._tag === "Idle";
}
export function getConfiguredPreviewUrls(
scripts: ReadonlyArray<ProjectScript> | undefined,
): ReadonlyArray<string> {
return scripts?.flatMap((script) => (script.previewUrl ? [script.previewUrl] : [])) ?? [];
}