import type { ImageAsset, FeatureImage } from './images'; export const layoutNames = ['edge', 'threshold', 'offset'] as const; export type ReadingLayoutName = (typeof layoutNames)[number]; export type Artwork = ImageAsset & { still: ImageAsset; exposure: number; focus: [number, number]; moonSway?: boolean; }; export type PageKind = 'page' | 'post' | 'author' | 'category'; export type CountedLink = { name: string; href: string; count: number }; export type PageMetadata = { authors?: CountedLink[]; date?: string; categories?: CountedLink[] }; export type PageLink = PageMetadata & { id: string; href: string; title: string; excerpt: string; kind: PageKind; featureImage?: FeatureImage; }; export type LinkGraphData = { nodes: PageLink[]; edges: [string, string][] }; export const jsonForHtml = (value: unknown) => JSON.stringify(value).replace(/