feat: news

This commit is contained in:
Ivan Rezchikov
2026-06-20 18:30:39 +03:00
parent 674fd11aa9
commit 95fd6ae716
19 changed files with 886 additions and 159 deletions
+3 -8
View File
@@ -1,4 +1,4 @@
export const PAGE_TYPES = ["NEWS"] as const;
export const PAGE_TYPES = ["NEWS", "PAGE"] as const;
export type PageType = typeof PAGE_TYPES[number];
export const PAGE_STATUSES = ["DRAFT", "PUBLISHED", "ARCHIVED"] as const;
@@ -22,20 +22,15 @@ export type Page = {
createdBy: string;
}
export const BLOCK_TYPES = ["PARAGRAPH", "HEADING", "IMAGE", "FILE", "QUOTE", "DIVIDER", "TABLE", "CALLOUT", "LIST", "LINK"] as const;
export const BLOCK_TYPES = ["PARAGRAPH", "HEADING", "QUOTE", "DIVIDER", "CALLOUT"] as const;
export type BlockType = typeof BLOCK_TYPES[number];
export type BlockContent =
| { type: "PARAGRAPH"; text: string }
| { type: "HEADING"; text: string; level: 1 | 2 | 3 }
| { type: "IMAGE"; url: string; caption?: string }
| { type: "FILE"; url: string; name: string }
| { type: "QUOTE"; text: string; author?: string }
| { type: "DIVIDER" }
| { type: "TABLE"; headers: string[]; rows: string[][] }
| { type: "CALLOUT"; text: string; icon?: string; color?: string }
| { type: "LIST"; style: "BULLET" | "NUMBERED"; items: string[] }
| { type: "LINK"; text?: string; url: string };
| { type: "CALLOUT"; title: string; text: string }
export type Block = {
id: string;