-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add timeline and event nodes #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
218b159
92150dd
c01e9aa
1d6046f
77fdb27
4ed8a70
cbc49ba
3db9f64
bd88a84
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| export declare namespace ContentTree { | ||
| type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | Tweet | Video | YoutubeVideo | Text; | ||
| type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | Tweet | Video | YoutubeVideo | Text | Timeline; | ||
| type LayoutWidth = "auto" | "in-line" | "inset-left" | "inset-right" | "full-bleed" | "full-grid" | "mid-grid" | "full-width"; | ||
| type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link; | ||
| interface Node { | ||
|
|
@@ -278,8 +278,19 @@ export declare namespace ContentTree { | |
| /** Configuration data to be passed to the component. */ | ||
| attributes: CustomCodeComponentAttributes; | ||
| } | ||
| type TimelineLayoutWidth = Extract<LayoutWidth, "full-width" | "inset-left" | "full-grid">; | ||
| interface Timeline extends Parent { | ||
| type: "timeline"; | ||
| layoutWidth: TimelineLayoutWidth; | ||
| children: [Heading, ...TimelineEvent[]]; | ||
| } | ||
| interface TimelineEvent extends Parent { | ||
| type: "timeline-event"; | ||
| dateLabel: string; | ||
| children: Paragraph[]; | ||
|
||
| } | ||
| namespace full { | ||
| type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | Tweet | Video | YoutubeVideo | Text; | ||
| type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | Tweet | Video | YoutubeVideo | Text | Timeline; | ||
| type LayoutWidth = "auto" | "in-line" | "inset-left" | "inset-right" | "full-bleed" | "full-grid" | "mid-grid" | "full-width"; | ||
| type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link; | ||
| interface Node { | ||
|
|
@@ -558,9 +569,20 @@ export declare namespace ContentTree { | |
| /** Configuration data to be passed to the component. */ | ||
| attributes: CustomCodeComponentAttributes; | ||
| } | ||
| type TimelineLayoutWidth = Extract<LayoutWidth, "full-width" | "inset-left" | "full-grid">; | ||
| interface Timeline extends Parent { | ||
| type: "timeline"; | ||
| layoutWidth: TimelineLayoutWidth; | ||
| children: [Heading, ...TimelineEvent[]]; | ||
| } | ||
| interface TimelineEvent extends Parent { | ||
| type: "timeline-event"; | ||
| dateLabel: string; | ||
| children: Paragraph[]; | ||
| } | ||
| } | ||
| namespace transit { | ||
| type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | Tweet | Video | YoutubeVideo | Text; | ||
| type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | Tweet | Video | YoutubeVideo | Text | Timeline; | ||
| type LayoutWidth = "auto" | "in-line" | "inset-left" | "inset-right" | "full-bleed" | "full-grid" | "mid-grid" | "full-width"; | ||
| type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link; | ||
| interface Node { | ||
|
|
@@ -824,9 +846,20 @@ export declare namespace ContentTree { | |
| /** How the component should be presented in the article page according to the column layout system */ | ||
| layoutWidth: LayoutWidth; | ||
| } | ||
| type TimelineLayoutWidth = Extract<LayoutWidth, "full-width" | "inset-left" | "full-grid">; | ||
| interface Timeline extends Parent { | ||
| type: "timeline"; | ||
| layoutWidth: TimelineLayoutWidth; | ||
| children: [Heading, ...TimelineEvent[]]; | ||
| } | ||
| interface TimelineEvent extends Parent { | ||
| type: "timeline-event"; | ||
| dateLabel: string; | ||
| children: Paragraph[]; | ||
| } | ||
| } | ||
| namespace loose { | ||
| type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | Tweet | Video | YoutubeVideo | Text; | ||
| type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | Tweet | Video | YoutubeVideo | Text | Timeline; | ||
| type LayoutWidth = "auto" | "in-line" | "inset-left" | "inset-right" | "full-bleed" | "full-grid" | "mid-grid" | "full-width"; | ||
| type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link; | ||
| interface Node { | ||
|
|
@@ -1105,5 +1138,16 @@ export declare namespace ContentTree { | |
| /** Configuration data to be passed to the component. */ | ||
| attributes?: CustomCodeComponentAttributes; | ||
| } | ||
| type TimelineLayoutWidth = Extract<LayoutWidth, "full-width" | "inset-left" | "full-grid">; | ||
| interface Timeline extends Parent { | ||
| type: "timeline"; | ||
| layoutWidth: TimelineLayoutWidth; | ||
| children: [Heading, ...TimelineEvent[]]; | ||
| } | ||
| interface TimelineEvent extends Parent { | ||
| type: "timeline-event"; | ||
| dateLabel: string; | ||
| children: Paragraph[]; | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed with @adgad