Something went wrong. Try again.
[mirror] A local-first desktop markdown writer with grammar checking, at proto integration, and more github.com/stormlightlabs/writer/releases
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071import type { RenderedFontFamily } from "$types";
export type Orientation = "portrait" | "landscape";
export type StandardPageSize = "A4" | "A3" | "A5" | "LETTER" | "LEGAL" | "TABLOID" | "EXECUTIVE" | "FOLIO";
export type CustomPageSize = { width: number; height: number };
export type PageSize = StandardPageSize | CustomPageSize;
export type MarginSide = "top" | "right" | "bottom" | "left";
export type Margins = Record<MarginSide, number>;
export type PdfExportOptions = { pageSize: PageSize; orientation: Orientation; margins: Margins; fontSize?: number; lineHeight?: number; includeTitle?: boolean; includeHeader?: boolean; includeFooter?: boolean;};
export type MarkdownListItem = { content: MarkdownNode[] };
export type MarkdownNode = | { type: "heading"; level: number; content: string } | { type: "paragraph"; content: string } | { type: "code"; content: string; language?: string } | { type: "list"; items: MarkdownListItem[]; ordered: boolean } | { type: "blockquote"; content: string } | { type: "footnote"; id: string; content: string } | { type: "image"; src: string; alt: string };
export type PdfRenderResult = { nodes: MarkdownNode[]; title?: string; word_count: number };
export type FontName = RenderedFontFamily;
export type FontPayloadFormat = "woff" | "ttf" | "otf";
export type PdfFontSourceDescriptor = { file: string; src: string; fontWeight?: FontWeight; fontStyle?: FontStyle };
export type PdfFontResolution = { fontName: FontName; strategy: FontStrategy; family: string; sources: PdfFontSourceDescriptor[];};
export type FontWeight = | number | "thin" | "ultralight" | "light" | "normal" | "medium" | "semibold" | "bold" | "ultrabold" | "heavy";
export type FontStyle = "normal" | "italic";
export type FontStrategy = "custom" | "builtin";
export type FontFile = { file: string; fontWeight?: FontWeight; fontStyle?: FontStyle };
export type FontConfig = { family: string; files: FontFile[] };