From 47a9ab478078d897beb706a1590fef3596f1ee12 Mon Sep 17 00:00:00 2001 From: prototypa Date: Thu, 27 Jul 2023 14:05:39 -0400 Subject: [PATCH] Rename types.ts to types.d.ts --- src/types.d.ts | 201 +++++++++++++++++++++++++++++++++++++++++++++++++ src/types.ts | 40 ---------- 2 files changed, 201 insertions(+), 40 deletions(-) create mode 100644 src/types.d.ts delete mode 100644 src/types.ts diff --git a/src/types.d.ts b/src/types.d.ts new file mode 100644 index 0000000..8fb830a --- /dev/null +++ b/src/types.d.ts @@ -0,0 +1,201 @@ +import { AstroComponentFactory } from 'astro/dist/runtime/server'; + +export interface Post { + id: string; + slug: string; + + publishDate: Date; + title: string; + description?: string; + + image?: string; + + canonical?: string | URL; + permalink?: string; + + draft?: boolean; + + excerpt?: string; + category?: string; + tags?: Array; + author?: string; + + Content: AstroComponentFactory; + content?: string; + + readingTime?: number; +} + +export interface MetaSEO { + title?: string; + description?: string; + image?: string; + + canonical?: string | URL; + noindex?: boolean; + nofollow?: boolean; + + ogTitle?: string; + ogType?: string; +} + +export interface Image { + src: string; + alt?: string; +} + +export interface Video { + src: string; + type?: string; +} + +export interface Widget { + id?: string; + isDark?: boolean; + bg?: string; + classes?: Record; +} + +export interface Headline { + title?: string; + subtitle?: string; + tagline?: string; + classes?: Record; +} + +interface TeamMember { + name?: string; + job?: string; + image?: Image; + socials?: Array; + description?: string; + classes?: Record; +} + +interface Social { + icon?: string; + href?: string; +} + +export interface Stat { + amount?: number; + title?: string; + icon?: string; +} + +export interface Item { + title?: string; + description?: string; + icon?: string; + classes?: Record; + callToAction?: CallToAction; + image?: Image; +} + +export interface Price { + title?: string; + description?: string; + price?: number; + period?: string; + items?: Array; + callToAction?: CallToAction; + hasRibbon?: boolean; + ribbonTitle?: string; +} + +export interface Testimonial { + title?: string; + testimonial?: string; + name?: string; + job?: string; + image?: Image; +} + +// COMPONENTS +export interface CallToAction { + targetBlank: boolean; + text?: string; + icon?: string; + href?: string; + classes?: Record; +} + +export interface ItemGrid { + items?: Array; + columns?: number; + defaultIcon?: string; + classes?: Record; +} + +export interface Collapse { + iconUp?: string; + iconDown?: string; + items?: Array; + columns?: number; + classes?: Record; +} + +// WIDGETS +export interface Hero extends Headline, Widget { + image?: Image; + callToAction1?: CallToAction; + callToAction2?: CallToAction; + isReversed?: boolean; +} + +export interface Team extends Headline, Widget { + team?: Array; +} + +export interface Stats extends Headline, Widget { + stats?: Array; +} + +export interface Pricing extends Headline, Widget { + prices?: Array; +} + +export interface Testimonials extends Headline, Widget { + testimonials?: Array; + callToAction?: CallToAction; +} + +export interface Clients extends Headline, Widget { + icons?: Array; + images?: Array; +} + +export interface Features extends Headline, Widget { + image?: Image; + video?: Video; + items: Array; + columns: number; + callToAction1?: CallToAction; + callToAction2?: CallToAction; + isReversed?: boolean; +} + +export interface Faqs extends Headline, Widget { + iconUp?: string; + iconDown?: string; + items?: Array; + columns?: number; +} + +export interface Steps extends Headline, Widget { + items: Array<{ + title: string; + description?: string; + icon?: string; + classes?: Record; + }>; + image?: string | any; // TODO: find HTMLElementProps + isReversed?: boolean; +} + +export interface Content extends Headline, Widget { + image?: string; + items?: Array; + columns?: number; + isReversed?: boolean; +} \ No newline at end of file diff --git a/src/types.ts b/src/types.ts deleted file mode 100644 index 22f2862..0000000 --- a/src/types.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { AstroComponentFactory } from 'astro/dist/runtime/server'; - -export interface Post { - id: string; - slug: string; - - publishDate: Date; - title: string; - description?: string; - - image?: string; - - canonical?: string | URL; - permalink?: string; - - draft?: boolean; - - excerpt?: string; - category?: string; - tags?: Array; - author?: string; - - Content: AstroComponentFactory; - content?: string; - - readingTime?: number; -} - -export interface MetaSEO { - title?: string; - description?: string; - image?: string; - - canonical?: string | URL; - noindex?: boolean; - nofollow?: boolean; - - ogTitle?: string; - ogType?: string; -}