feat: json rich text editor, blocks, asides, general structure
This commit is contained in:
@@ -5,10 +5,12 @@ import type { PuffAside } from "./asides/puff"
|
||||
import type { Hero } from "./hero"
|
||||
import type { List } from "./blocks/list"
|
||||
import type { PuffBlock } from "./blocks/puff"
|
||||
import type { Preamble } from "./blocks/preamble"
|
||||
import type { Preamble } from "./preamble"
|
||||
import type { Text } from "./blocks/text"
|
||||
import type { AllRequestResponse } from "./utils/all"
|
||||
import type { AsideTypenameEnum, Typename } from "./utils/typename"
|
||||
import type { EmbedEnum } from "./utils/embeds"
|
||||
import type { Edges } from "./utils/edges"
|
||||
|
||||
export type Asides =
|
||||
| Typename<Contact, AsideTypenameEnum.CurrentBlocksPageAsideContact>
|
||||
@@ -16,14 +18,38 @@ export type Asides =
|
||||
|
||||
export type Blocks =
|
||||
| Typename<List, BlocksTypenameEnum.CurrentBlocksPageBlocksList>
|
||||
| Typename<Preamble, BlocksTypenameEnum.CurrentBlocksPageBlocksPreamble>
|
||||
| Typename<PuffBlock, BlocksTypenameEnum.CurrentBlocksPageBlocksPuffs>
|
||||
| Typename<Text, BlocksTypenameEnum.CurrentBlocksPageBlocksText>
|
||||
|
||||
interface SharedBreadcrumb {
|
||||
breadcrumbs: {
|
||||
title?: string
|
||||
} | null
|
||||
title: string
|
||||
url: string
|
||||
}
|
||||
|
||||
export interface CurrentBlocksPageBreadcrumb extends SharedBreadcrumb {
|
||||
__typename: EmbedEnum.CurrentBlocksPage
|
||||
}
|
||||
|
||||
export interface TempPageBreadcrumb extends SharedBreadcrumb {
|
||||
__typename: EmbedEnum.TempPage
|
||||
}
|
||||
|
||||
export type Breadcrumb = CurrentBlocksPageBreadcrumb | TempPageBreadcrumb
|
||||
|
||||
export type Breadcrumbs = {
|
||||
parentsConnection: Edges<Breadcrumb>
|
||||
title: string
|
||||
}
|
||||
|
||||
export type BlockPage = {
|
||||
aside: Asides[]
|
||||
blocks: Blocks[]
|
||||
breadcrumbs: Breadcrumbs
|
||||
hero: Hero
|
||||
preamble: Preamble
|
||||
title: string
|
||||
url: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user