feat: pages

This commit is contained in:
Ivan Rezchikov
2026-06-22 16:44:06 +03:00
parent 48656b562a
commit 64923cd1b2
20 changed files with 1038 additions and 283 deletions
+7 -2
View File
@@ -17,12 +17,13 @@ export type Page = {
status: PageStatus;
meta: PageMeta;
createdAt: Date;
updatedAt: Date;
updatedAt: Date | null;
publishedAt: Date | null;
createdBy: string;
updatedBy: string | null;
}
export const BLOCK_TYPES = ["PARAGRAPH", "HEADING", "QUOTE", "DIVIDER", "CALLOUT"] as const;
export const BLOCK_TYPES = ["PARAGRAPH", "HEADING", "QUOTE", "DIVIDER", "CALLOUT", "IMAGE", "LIST", "TABLE", "LINK"] as const;
export type BlockType = typeof BLOCK_TYPES[number];
export type BlockContent =
@@ -31,6 +32,10 @@ export type BlockContent =
| { type: "QUOTE"; text: string; author?: string }
| { type: "DIVIDER" }
| { type: "CALLOUT"; title: string; text: string }
| { type: "IMAGE"; url: string; caption?: string }
| { type: "LIST"; style: "BULLET" | "ORDERED"; items: string[] }
| { type: "TABLE"; headers: string[]; rows: string[][] }
| { type: "LINK"; label: string; href: string }
export type Block = {
id: string;