diff --git a/apps/storyblok/src/components/Footer/index.tsx b/apps/storyblok/src/components/Footer/index.tsx index 7658dac..776080b 100644 --- a/apps/storyblok/src/components/Footer/index.tsx +++ b/apps/storyblok/src/components/Footer/index.tsx @@ -13,7 +13,7 @@ export default function Footer({ blok }: IFooterProps) { const { text, copywriteText, links, image } = blok; if ( - text.length === 0 && + text?.length === 0 && links.length === 0 && image.length === 0 && !copywriteText @@ -26,7 +26,7 @@ export default function Footer({ blok }: IFooterProps) { image={prepareImageProps(image?.[0])} copywriteText={copywriteText} links={links?.map(prepareLinkProps) || []} - text={prepareRichTextProps(text[0])} + text={prepareRichTextProps(text?.[0])} /> ); diff --git a/apps/storyblok/src/components/Footer/types.ts b/apps/storyblok/src/components/Footer/types.ts index 0cc9f6f..f31c3a5 100644 --- a/apps/storyblok/src/components/Footer/types.ts +++ b/apps/storyblok/src/components/Footer/types.ts @@ -1,15 +1,5 @@ -import type { IImage } from "@/lib/adapters/prepareImageProps"; -import type { ILinkBlok } from "@/lib/adapters/prepareLinkProps"; -import type { IRichText } from "@/lib/adapters/prepareRichTextProps"; -import type { ISectionContainer } from "@/components/SectionContainer/types"; - -interface IFooter extends ISectionContainer { - links: ILinkBlok[]; - text: IRichText[]; - image: IImage[]; - copywriteText?: string; -} +import type { FooterStoryblok } from "@/generated/extracted-types"; export interface IFooterProps { - blok: IFooter; + blok: FooterStoryblok; } diff --git a/apps/storyblok/src/components/Header/index.tsx b/apps/storyblok/src/components/Header/index.tsx index 3f772f8..0086662 100644 --- a/apps/storyblok/src/components/Header/index.tsx +++ b/apps/storyblok/src/components/Header/index.tsx @@ -1,4 +1,5 @@ import EmptyBlock from "@shared/ui/components/EmptyBlock"; +import type { AlignVariant } from "@shared/ui/components/sections/header/types"; import { Header as HeaderUI } from "@shared/ui"; @@ -22,7 +23,7 @@ export default function Header({ blok }: IHeaderProps) { ); diff --git a/apps/storyblok/src/components/Header/types.ts b/apps/storyblok/src/components/Header/types.ts index 96fea57..d9a9169 100644 --- a/apps/storyblok/src/components/Header/types.ts +++ b/apps/storyblok/src/components/Header/types.ts @@ -1,15 +1,5 @@ -import type { AlignVariant } from "@shared/ui/components/sections/header/types"; - -import type { IImage } from "@/lib/adapters/prepareImageProps"; -import type { ILinkBlok } from "@/lib/adapters/prepareLinkProps"; -import type { ISectionContainer } from "@/components/SectionContainer/types"; - -interface IHeader extends ISectionContainer { - links: ILinkBlok[]; - alignVariant: AlignVariant; - image: IImage[]; -} +import type { HeaderStoryblok } from "@/generated/extracted-types"; export interface IHeaderProps { - blok: IHeader; + blok: HeaderStoryblok; } diff --git a/apps/storyblok/src/components/Page/types.ts b/apps/storyblok/src/components/Page/types.ts index 8282b17..4798e54 100644 --- a/apps/storyblok/src/components/Page/types.ts +++ b/apps/storyblok/src/components/Page/types.ts @@ -1,11 +1,5 @@ -import type { SbBlokData } from "@storyblok/react/rsc"; - -interface IPageContainer extends SbBlokData { - sections: SbBlokData[]; - header: string; - showCookieBanner: boolean; -} +import type { PageStoryblok } from "@/generated/extracted-types"; export interface IPageContainerProps { - blok: IPageContainer; + blok: PageStoryblok; } diff --git a/apps/storyblok/src/components/SectionContainer/index.tsx b/apps/storyblok/src/components/SectionContainer/index.tsx index 86e0f38..a866a5b 100644 --- a/apps/storyblok/src/components/SectionContainer/index.tsx +++ b/apps/storyblok/src/components/SectionContainer/index.tsx @@ -11,13 +11,13 @@ export default function SectionContainer({ blok, className, }: ISectionContainerProps) { - const { theme, _uid, paddingX, paddingY, marginTop, marginBottom } = blok; + const { _uid, paddingX, paddingY, marginTop, marginBottom } = blok; if (isDraftMode) { return (
; const formattedPosts = posts.map((post) => ({ - style, + style: style as BlogStyle, text: prepareRichTextProps(post.text[0]), image: prepareImageProps(post.image[0]), link: prepareLinkProps(post.link[0]), @@ -27,7 +28,7 @@ export default function Blog({ blok }: IBlogProps) { ); diff --git a/apps/storyblok/src/contentSections/Blog/types.ts b/apps/storyblok/src/contentSections/Blog/types.ts index 918021a..99084ac 100644 --- a/apps/storyblok/src/contentSections/Blog/types.ts +++ b/apps/storyblok/src/contentSections/Blog/types.ts @@ -1,24 +1,5 @@ -import type { BlogStyle } from "@shared/ui/components/sections/blog/types"; -import type { SbBlokData } from "@storyblok/react/rsc"; - -import type { IImage } from "@/lib/adapters/prepareImageProps"; -import type { ILinkBlok } from "@/lib/adapters/prepareLinkProps"; -import type { IRichText } from "@/lib/adapters/prepareRichTextProps"; -import type { ISectionContainer } from "@/components/SectionContainer/types"; - -interface IBlogPost extends SbBlokData { - date: string; - image: IImage[]; - link: ILinkBlok[]; - text: IRichText[]; -} - -interface IBlog extends ISectionContainer { - text: IRichText[]; - posts: IBlogPost[]; - style: BlogStyle; -} +import type { BlogStoryblok } from "@/generated/extracted-types"; export interface IBlogProps { - blok: IBlog; + blok: BlogStoryblok; } diff --git a/apps/storyblok/src/contentSections/CardsGrid/index.tsx b/apps/storyblok/src/contentSections/CardsGrid/index.tsx index aae5c53..e36844d 100644 --- a/apps/storyblok/src/contentSections/CardsGrid/index.tsx +++ b/apps/storyblok/src/contentSections/CardsGrid/index.tsx @@ -1,4 +1,5 @@ import EmptyBlock from "@shared/ui/components/EmptyBlock"; +import type { DefaultCardStyle } from "@shared/ui/components/sections/cardsGrid/types"; import { CardsGrid as CardsGridUI } from "@shared/ui"; @@ -15,9 +16,10 @@ export default function CardsGrid({ blok }: ICardsGridProps) { const formattedItems = items.map((item) => ({ ...item, + style: item.style as DefaultCardStyle, type: item._type, - image: item.image[0] && prepareImageProps(item.image[0]), - link: item.link[0] && prepareLinkProps(item.link[0]), + image: prepareImageProps(item?.image?.[0]), + link: prepareLinkProps(item?.link?.[0]), })); return ( diff --git a/apps/storyblok/src/contentSections/CardsGrid/types.ts b/apps/storyblok/src/contentSections/CardsGrid/types.ts index c262d12..3875270 100644 --- a/apps/storyblok/src/contentSections/CardsGrid/types.ts +++ b/apps/storyblok/src/contentSections/CardsGrid/types.ts @@ -1,23 +1,5 @@ -import type { DefaultCardStyle } from "@shared/ui/components/sections/cardsGrid/types"; -import type { SbBlokData } from "@storyblok/react/rsc"; - -import type { IImage } from "@/lib/adapters/prepareImageProps"; -import type { ILinkBlok } from "@/lib/adapters/prepareLinkProps"; -import type { ISectionContainer } from "@/components/SectionContainer/types"; - -interface IDefaultCard extends SbBlokData { - title: string; - description: string; - image: IImage[]; - link: ILinkBlok[]; - style: DefaultCardStyle; -} - -interface ICardsGrid extends ISectionContainer { - items: IDefaultCard[]; - columns: string; -} +import type { CardsGridStoryblok } from "@/generated/extracted-types"; export interface ICardsGridProps { - blok: ICardsGrid; + blok: CardsGridStoryblok; } diff --git a/apps/storyblok/src/contentSections/Copy/index.tsx b/apps/storyblok/src/contentSections/Copy/index.tsx index 1c2b03e..ffb3eb0 100644 --- a/apps/storyblok/src/contentSections/Copy/index.tsx +++ b/apps/storyblok/src/contentSections/Copy/index.tsx @@ -17,7 +17,7 @@ export default function Copy({ blok }: ICopyProps) { ); diff --git a/apps/storyblok/src/contentSections/Copy/types.ts b/apps/storyblok/src/contentSections/Copy/types.ts index 7e1980c..19f4003 100644 --- a/apps/storyblok/src/contentSections/Copy/types.ts +++ b/apps/storyblok/src/contentSections/Copy/types.ts @@ -1,11 +1,5 @@ -import type { IRichText } from "@/lib/adapters/prepareRichTextProps"; -import type { ISectionContainer } from "@/components/SectionContainer/types"; - -interface ICopy extends ISectionContainer { - columns: IRichText[]; - isReversedOnMobile: boolean; -} +import type { CopyStoryblok } from "@/generated/extracted-types"; export interface ICopyProps { - blok: ICopy; + blok: CopyStoryblok; } diff --git a/apps/storyblok/src/contentSections/Hero/index.tsx b/apps/storyblok/src/contentSections/Hero/index.tsx index 9a48108..e57b5d1 100644 --- a/apps/storyblok/src/contentSections/Hero/index.tsx +++ b/apps/storyblok/src/contentSections/Hero/index.tsx @@ -12,14 +12,14 @@ import type { IHeroProps } from "./types"; export default function Hero({ blok }: IHeroProps) { const { title, text, image, links } = blok; - if (image.length === 0 && links.length === 0 && text.length === 0 && !title) + if (image.length === 0 && links.length === 0 && text?.length === 0 && !title) return ; return ( diff --git a/apps/storyblok/src/contentSections/Hero/types.ts b/apps/storyblok/src/contentSections/Hero/types.ts index 1fca9b6..ed32381 100644 --- a/apps/storyblok/src/contentSections/Hero/types.ts +++ b/apps/storyblok/src/contentSections/Hero/types.ts @@ -1,15 +1,5 @@ -import type { IImage } from "@/lib/adapters/prepareImageProps"; -import type { ILinkBlok } from "@/lib/adapters/prepareLinkProps"; -import type { IRichText } from "@/lib/adapters/prepareRichTextProps"; -import type { ISectionContainer } from "@/components/SectionContainer/types"; - -export interface IHero extends ISectionContainer { - title: string; - text: IRichText[]; - image: IImage[]; - links: ILinkBlok[]; -} +import type { HeroStoryblok } from "@/generated/extracted-types"; export interface IHeroProps { - blok: IHero; + blok: HeroStoryblok; } diff --git a/apps/storyblok/src/contentSections/LinksList/index.tsx b/apps/storyblok/src/contentSections/LinksList/index.tsx index 4949169..a01512f 100644 --- a/apps/storyblok/src/contentSections/LinksList/index.tsx +++ b/apps/storyblok/src/contentSections/LinksList/index.tsx @@ -1,4 +1,5 @@ import EmptyBlock from "@shared/ui/components/EmptyBlock"; +import type { AlignVariant } from "@shared/ui/components/sections/linksList/types"; import { LinksList as LinksListUI } from "@shared/ui"; @@ -15,7 +16,7 @@ export default function LinksList({ blok }: ILinksLinkProps) { return ( diff --git a/apps/storyblok/src/contentSections/LinksList/types.ts b/apps/storyblok/src/contentSections/LinksList/types.ts index b0fd52e..873622e 100644 --- a/apps/storyblok/src/contentSections/LinksList/types.ts +++ b/apps/storyblok/src/contentSections/LinksList/types.ts @@ -1,13 +1,5 @@ -import type { AlignVariant } from "@shared/ui/components/sections/linksList/types"; - -import type { ILinkBlok } from "@/lib/adapters/prepareLinkProps"; -import type { ISectionContainer } from "@/components/SectionContainer/types"; - -interface ILinksLink extends ISectionContainer { - alignVariant: AlignVariant; - links: ILinkBlok[]; -} +import type { LinksListStoryblok } from "@/generated/extracted-types"; export interface ILinksLinkProps { - blok: ILinksLink; + blok: LinksListStoryblok; } diff --git a/apps/storyblok/src/contentSections/Logos/index.tsx b/apps/storyblok/src/contentSections/Logos/index.tsx index 72603d9..5f8e095 100644 --- a/apps/storyblok/src/contentSections/Logos/index.tsx +++ b/apps/storyblok/src/contentSections/Logos/index.tsx @@ -1,4 +1,5 @@ import EmptyBlock from "@shared/ui/components/EmptyBlock"; +import type { AlignVariant } from "@shared/ui/components/sections/logos/types"; import { Logos as LogosUI } from "@shared/ui"; @@ -24,7 +25,10 @@ export default function Logos({ blok }: ILogosProps) { return ( - + ); } diff --git a/apps/storyblok/src/contentSections/Logos/types.ts b/apps/storyblok/src/contentSections/Logos/types.ts index 0bb1c6c..6e85153 100644 --- a/apps/storyblok/src/contentSections/Logos/types.ts +++ b/apps/storyblok/src/contentSections/Logos/types.ts @@ -1,20 +1,5 @@ -import type { AlignVariant } from "@shared/ui/components/sections/logos/types"; - -import type { IImage } from "@/lib/adapters/prepareImageProps"; -import type { ILinkBlok } from "@/lib/adapters/prepareLinkProps"; -import type { ISectionContainer } from "@/components/SectionContainer/types"; - -interface ILogoItem { - image: IImage[]; - link: ILinkBlok[]; - type: "logo" | "clickableLogo"; -} - -export interface ILogos extends ISectionContainer { - items: ILogoItem[]; - alignVariant: AlignVariant; -} +import type { LogosStoryblok } from "@/generated/extracted-types"; export interface ILogosProps { - blok: ILogos; + blok: LogosStoryblok; } diff --git a/apps/storyblok/src/contentSections/Pricing/index.tsx b/apps/storyblok/src/contentSections/Pricing/index.tsx index 8d09303..ea1fd93 100644 --- a/apps/storyblok/src/contentSections/Pricing/index.tsx +++ b/apps/storyblok/src/contentSections/Pricing/index.tsx @@ -9,8 +9,7 @@ import SectionContainer from "@/components/SectionContainer"; import type { IPricingProps } from "./types"; export default function PricingSection({ blok }: IPricingProps) { - console.log(blok); - if (!blok || blok.tiers.length === 0) + if (!blok || blok?.tiers?.length === 0) return ; const { tiers, yearlyDiscountPercentage } = blok; @@ -34,9 +33,11 @@ export default function PricingSection({ blok }: IPricingProps) { ); diff --git a/apps/storyblok/src/contentSections/Pricing/types.ts b/apps/storyblok/src/contentSections/Pricing/types.ts index 8677a41..1d05e3f 100644 --- a/apps/storyblok/src/contentSections/Pricing/types.ts +++ b/apps/storyblok/src/contentSections/Pricing/types.ts @@ -1,27 +1,5 @@ -import type { IImage } from "@/lib/adapters/prepareImageProps"; -import type { ILinkBlok } from "@/lib/adapters/prepareLinkProps"; -import type { ISectionContainer } from "@/components/SectionContainer/types"; - -export interface IPricingTier { - name: string; - icon: IImage[]; - price?: string; - description: string; - features: { text: string }[]; - link: ILinkBlok[]; - popular?: boolean; -} - -export interface IPricing extends ISectionContainer { - tiers: IPricingTier[]; - extraServiceEnabled?: boolean; - yearlyDiscountPercentage: string; - extraService?: { - text: string; - cost: string; - }[]; -} +import type { PricingStoryblok } from "@/generated/extracted-types"; export interface IPricingProps { - blok: IPricing; + blok: PricingStoryblok; } diff --git a/apps/storyblok/src/contentSections/carousels/SimpleCarousel/types.ts b/apps/storyblok/src/contentSections/carousels/SimpleCarousel/types.ts index 61ea501..f645a15 100644 --- a/apps/storyblok/src/contentSections/carousels/SimpleCarousel/types.ts +++ b/apps/storyblok/src/contentSections/carousels/SimpleCarousel/types.ts @@ -1,14 +1,5 @@ -import type { IImage } from "@/lib/adapters/prepareImageProps"; -import type { ISectionContainer } from "@/components/SectionContainer/types"; - -interface ISimpleCarouselSlide { - image: IImage[]; -} - -interface ISimpleCarousel extends ISectionContainer { - slides: ISimpleCarouselSlide[]; -} +import type { SimpleCarouselStoryblok } from "@/generated/extracted-types"; export interface ISimpleCarouselProps { - blok: ISimpleCarousel; + blok: SimpleCarouselStoryblok; } diff --git a/apps/storyblok/src/contentSections/carousels/WideSimpleCarousel/types.ts b/apps/storyblok/src/contentSections/carousels/WideSimpleCarousel/types.ts index 3dabaaa..067b880 100644 --- a/apps/storyblok/src/contentSections/carousels/WideSimpleCarousel/types.ts +++ b/apps/storyblok/src/contentSections/carousels/WideSimpleCarousel/types.ts @@ -1,14 +1,5 @@ -import type { IImage } from "@/lib/adapters/prepareImageProps"; -import type { ISectionContainer } from "@/components/SectionContainer/types"; - -interface IWideSimpleCarouselSlide { - image: IImage[]; -} - -interface IWideSimpleCarousel extends ISectionContainer { - slides: IWideSimpleCarouselSlide[]; -} +import type { WideSimpleCarouselStoryblok } from "@/generated/extracted-types"; export interface IWideSimpleCarouselProps { - blok: IWideSimpleCarousel; + blok: WideSimpleCarouselStoryblok; } diff --git a/apps/storyblok/src/generated/components.production.json b/apps/storyblok/src/generated/components.production.json index 90415cb..09ab105 100644 --- a/apps/storyblok/src/generated/components.production.json +++ b/apps/storyblok/src/generated/components.production.json @@ -4,7 +4,7 @@ "name": "blog", "display_name": null, "created_at": "2024-09-10T10:53:37.659Z", - "updated_at": "2024-10-07T06:26:12.242Z", + "updated_at": "2024-10-29T15:46:14.891Z", "id": 6275958, "schema": { "style": { @@ -32,30 +32,9 @@ ], "default_value": "three-column-with-images" }, - "theme": { - "type": "option", - "pos": 1, - "use_uuid": true, - "required": true, - "options": [ - { - "_uid": "666c831d-7410-40e6-9785-40b751bd77c8", - "name": "light", - "value": "light" - }, - { - "_uid": "0fc766e9-ab44-47d7-a026-56a80ef56a0c", - "value": "dark", - "name": "dark" - } - ], - "exclude_empty_option": true, - "default_value": "light" - }, "tab-01ac9959-3ed3-4c26-9a32-493c31a3d71f": { "display_name": "Style", "keys": [ - "theme", "style", "marginTop", "marginBottom" @@ -245,7 +224,7 @@ "name": "cardsGrid", "display_name": null, "created_at": "2024-09-10T10:51:16.668Z", - "updated_at": "2024-10-07T06:26:53.132Z", + "updated_at": "2024-10-29T15:46:21.774Z", "id": 6275957, "schema": { "items": { @@ -263,7 +242,6 @@ "display_name": "Style", "keys": [ "columns", - "theme", "marginTop", "marginBottom" ], @@ -295,27 +273,6 @@ "default_value": "2", "required": true }, - "theme": { - "type": "option", - "pos": 3, - "use_uuid": true, - "translatable": false, - "required": true, - "options": [ - { - "_uid": "d6bb9296-8811-4c5f-8df0-fca70785b413", - "name": "light", - "value": "light" - }, - { - "_uid": "7556c108-0535-437b-a79f-641a6dac81a0", - "value": "dark", - "name": "dark" - } - ], - "exclude_empty_option": true, - "default_value": "light" - }, "marginTop": { "type": "option", "pos": 4, @@ -398,30 +355,9 @@ "name": "copy", "display_name": null, "created_at": "2024-07-09T16:19:19.131Z", - "updated_at": "2024-09-20T15:50:37.774Z", + "updated_at": "2024-10-29T15:46:29.243Z", "id": 6030874, "schema": { - "theme": { - "type": "option", - "pos": 0, - "use_uuid": true, - "required": true, - "exclude_empty_option": true, - "options": [ - { - "_uid": "f2f8dc66-90b8-41e2-916e-2bfd1665a0e9", - "name": "light", - "value": "light" - }, - { - "_uid": "7bb599fe-f4fb-4df3-bc8f-a3f4d6e3d80e", - "value": "dark", - "name": "dark" - } - ], - "default_value": "light", - "key": "theme" - }, "isReversedOnMobile": { "type": "boolean", "pos": 1 @@ -442,7 +378,6 @@ "tab-a56fbd62-e3cd-4f10-8de8-b218250de1a7": { "display_name": "Style", "keys": [ - "theme", "isReversedOnMobile", "marginTop", "marginBottom" @@ -756,95 +691,6 @@ "internal_tag_ids": [], "content_type_asset_preview": null }, - { - "name": "footer-old", - "display_name": null, - "created_at": "2024-09-10T10:31:02.449Z", - "updated_at": "2024-10-09T15:42:19.692Z", - "id": 6275699, - "schema": { - "text": { - "type": "bloks", - "pos": 0, - "required": true, - "minimum": 1, - "maximum": 1, - "restrict_type": "", - "restrict_components": true, - "component_whitelist": [ - "richText" - ] - }, - "links": { - "type": "bloks", - "pos": 1, - "required": true, - "minimum": 1, - "restrict_type": "", - "restrict_components": true, - "component_whitelist": [ - "link" - ] - }, - "copywriteText": { - "type": "text", - "pos": 2 - }, - "theme": { - "type": "option", - "pos": 3, - "use_uuid": true, - "required": true, - "exclude_empty_option": true, - "options": [ - { - "_uid": "c403fe78-c0ee-43de-b730-627904d0c293", - "name": "light", - "value": "light" - }, - { - "_uid": "1bd2c60f-3024-4c76-8afb-886f6fe800f4", - "value": "dark", - "name": "dark" - } - ], - "default_value": "light" - }, - "tab-9dcf65bd-8f97-46ee-90e3-b40c2492ef6d": { - "display_name": "Style", - "keys": [ - "theme" - ], - "pos": 4, - "type": "tab" - } - }, - "image": "//a.storyblok.com/f/293915/x/dce5ef6456/screenshot-2024-10-07-at-08-27-16.png", - "preview_field": null, - "is_root": false, - "preview_tmpl": null, - "is_nestable": true, - "all_presets": [ - { - "id": 2282778, - "name": "Light align center", - "component_id": 6275699, - "image": "//a.storyblok.com/f/293915/x/14d7756fa8/screenshot-2024-09-10-at-16-45-53.png", - "icon": "", - "color": "", - "description": "" - } - ], - "preset_id": null, - "real_name": "footer-old", - "component_group_uuid": "9a95e24a-4024-4145-992e-070fbb399f97", - "color": null, - "icon": null, - "internal_tags_list": [], - "internal_tag_ids": [], - "content_type_asset_preview": null, - "component_group_name": "sections" - }, { "name": "header", "display_name": null, @@ -1079,7 +925,7 @@ "name": "image", "display_name": null, "created_at": "2024-07-10T10:47:30.096Z", - "updated_at": "2024-10-07T06:28:29.299Z", + "updated_at": "2024-10-29T14:37:52.461Z", "id": 6033429, "schema": { "asset": { @@ -1135,6 +981,11 @@ "_uid": "3a8da21a-288e-40cc-a055-b0c2f1bf453e", "value": "3/1", "name": "3/1" + }, + { + "_uid": "0366cad4-e85b-4812-9006-f1b136d83390", + "value": "auto", + "name": "auto" } ], "exclude_empty_option": true, @@ -1161,7 +1012,7 @@ "name": "link", "display_name": null, "created_at": "2024-07-10T13:22:37.130Z", - "updated_at": "2024-10-07T06:28:47.871Z", + "updated_at": "2024-10-29T14:58:01.048Z", "id": 6034187, "schema": { "text": { @@ -1203,6 +1054,16 @@ "_uid": "aa2e4f27-68fa-4e60-b0af-7aba99301dae", "value": "badge", "name": "badge" + }, + { + "_uid": "2646d7cd-2431-4722-85fc-67e633011943", + "value": "ghost", + "name": "ghost" + }, + { + "_uid": "104a99ce-5d61-4328-8bff-081d55e8de1a", + "value": "ghost-dark", + "name": "ghostDark" } ], "exclude_empty_option": true, @@ -1245,7 +1106,7 @@ "name": "linksList", "display_name": null, "created_at": "2024-09-10T10:44:36.150Z", - "updated_at": "2024-10-07T06:30:06.867Z", + "updated_at": "2024-10-29T15:46:39.097Z", "id": 6275825, "schema": { "alignVariant": { @@ -1273,26 +1134,6 @@ "exclude_empty_option": true, "default_value": "left" }, - "theme": { - "type": "option", - "pos": 1, - "use_uuid": true, - "required": true, - "options": [ - { - "_uid": "9a8d548a-8c2b-4326-a237-8d2024d4c434", - "name": "light", - "value": "light" - }, - { - "_uid": "d768c395-8bb1-4df4-9bf1-fc3c1bb3fcf1", - "value": "dark", - "name": "dark" - } - ], - "exclude_empty_option": true, - "default_value": "light" - }, "links": { "type": "bloks", "pos": 2, @@ -1307,7 +1148,6 @@ "tab-53aef95a-ae1c-4fbd-8298-e4e9173c124b": { "display_name": "Style", "keys": [ - "theme", "alignVariant", "marginTop", "marginBottom" @@ -1493,7 +1333,7 @@ "name": "logos", "display_name": null, "created_at": "2024-09-10T10:38:10.602Z", - "updated_at": "2024-10-07T06:31:16.599Z", + "updated_at": "2024-10-29T15:46:45.436Z", "id": 6275709, "schema": { "alignVariant": { @@ -1521,26 +1361,6 @@ ], "default_value": "left" }, - "theme": { - "type": "option", - "pos": 1, - "use_uuid": true, - "required": true, - "options": [ - { - "_uid": "83e86116-59bc-4468-b28c-e0ee15aa55de", - "name": "light", - "value": "light" - }, - { - "_uid": "a5f36034-7523-444c-b680-a48587728541", - "value": "dark", - "name": "dark" - } - ], - "exclude_empty_option": true, - "default_value": "light" - }, "items": { "type": "bloks", "pos": 2, @@ -1555,7 +1375,6 @@ "tab-e94ff14f-8ff3-44cb-9f91-5091c877b012": { "display_name": "Style", "keys": [ - "theme", "alignVariant", "marginTop", "marginBottom" @@ -1773,6 +1592,209 @@ "content_type_asset_preview": null, "component_group_name": "pages" }, + { + "name": "pricing", + "display_name": null, + "created_at": "2024-10-29T14:19:10.496Z", + "updated_at": "2024-10-29T14:32:16.913Z", + "id": 6489128, + "schema": { + "tiers": { + "type": "bloks", + "pos": 0, + "restrict_type": "", + "restrict_components": true, + "component_whitelist": [ + "pricingTier" + ] + }, + "yearlyDiscountPercentage": { + "type": "text", + "pos": 1 + }, + "extraServiceEnabled": { + "type": "boolean", + "pos": 2, + "default_value": false + }, + "extraService": { + "type": "bloks", + "pos": 3, + "restrict_type": "", + "restrict_components": true, + "component_whitelist": [ + "pricingExtraService" + ], + "maximum": 1, + "minimum": 1 + } + }, + "image": null, + "preview_field": null, + "is_root": false, + "preview_tmpl": null, + "is_nestable": true, + "all_presets": [ + { + "id": 2335597, + "name": "Pricing", + "component_id": 6489128, + "image": "//a.storyblok.com/f/293915/x/a01a228065/screenshot-2024-10-29-at-15-33-45.png", + "icon": "", + "color": "", + "description": "" + } + ], + "preset_id": null, + "real_name": "pricing", + "component_group_uuid": "9a95e24a-4024-4145-992e-070fbb399f97", + "color": null, + "icon": null, + "internal_tags_list": [], + "internal_tag_ids": [], + "content_type_asset_preview": null, + "component_group_name": "sections" + }, + { + "name": "pricingExtraService", + "display_name": null, + "created_at": "2024-10-29T14:31:04.180Z", + "updated_at": "2024-10-29T14:31:21.853Z", + "id": 6489233, + "schema": { + "text": { + "type": "textarea", + "pos": 0, + "required": true + }, + "cost": { + "type": "text", + "pos": 1, + "required": true + } + }, + "image": null, + "preview_field": null, + "is_root": false, + "preview_tmpl": null, + "is_nestable": true, + "all_presets": [], + "preset_id": null, + "real_name": "pricingExtraService", + "component_group_uuid": "7a581c8c-f6b7-4926-b5b0-98b7a48916b3", + "color": null, + "icon": null, + "internal_tags_list": [], + "internal_tag_ids": [], + "content_type_asset_preview": null, + "component_group_name": "components" + }, + { + "name": "pricingTier", + "display_name": null, + "created_at": "2024-10-29T14:19:56.597Z", + "updated_at": "2024-10-29T14:38:42.450Z", + "id": 6489131, + "schema": { + "name": { + "type": "text", + "pos": 0, + "required": true + }, + "icon": { + "type": "bloks", + "pos": 1, + "restrict_type": "", + "restrict_components": true, + "component_whitelist": [ + "image" + ], + "maximum": 1, + "minimum": 1, + "required": true + }, + "price": { + "type": "text", + "pos": 2 + }, + "description": { + "type": "textarea", + "pos": 3, + "required": true + }, + "features": { + "type": "bloks", + "pos": 4, + "restrict_type": "", + "restrict_components": true, + "component_whitelist": [ + "pricingTierFeature" + ], + "required": true + }, + "link": { + "type": "bloks", + "pos": 5, + "required": true, + "display_name": "CTA", + "minimum": 1, + "maximum": 1, + "restrict_type": "", + "restrict_components": true, + "component_whitelist": [ + "link" + ] + }, + "popular": { + "type": "boolean", + "pos": 6 + } + }, + "image": null, + "preview_field": null, + "is_root": false, + "preview_tmpl": null, + "is_nestable": true, + "all_presets": [], + "preset_id": null, + "real_name": "pricingTier", + "component_group_uuid": "7a581c8c-f6b7-4926-b5b0-98b7a48916b3", + "color": null, + "icon": null, + "internal_tags_list": [], + "internal_tag_ids": [], + "content_type_asset_preview": null, + "component_group_name": "components" + }, + { + "name": "pricingTierFeature", + "display_name": null, + "created_at": "2024-10-29T14:25:23.509Z", + "updated_at": "2024-10-29T14:25:40.593Z", + "id": 6489227, + "schema": { + "text": { + "type": "text", + "pos": 0, + "required": true + } + }, + "image": null, + "preview_field": null, + "is_root": false, + "preview_tmpl": null, + "is_nestable": true, + "all_presets": [], + "preset_id": null, + "real_name": "pricingTierFeature", + "component_group_uuid": "7a581c8c-f6b7-4926-b5b0-98b7a48916b3", + "color": null, + "icon": null, + "internal_tags_list": [], + "internal_tag_ids": [], + "content_type_asset_preview": null, + "component_group_name": "components" + }, { "name": "richText", "display_name": null, diff --git a/apps/storyblok/src/generated/extracted-types.ts b/apps/storyblok/src/generated/extracted-types.ts new file mode 100644 index 0000000..03ca896 --- /dev/null +++ b/apps/storyblok/src/generated/extracted-types.ts @@ -0,0 +1,348 @@ +// This file was generated by the storyblok CLI. +// DO NOT MODIFY THIS FILE BY HAND. +import type { ISbStoryData } from "storyblok"; +export interface BlogStoryblok { + style: "three-column" | "three-column-with-images" | "three-column-with-background-images"; + text: RichTextStoryblok[]; + posts: BlogPostStoryblok[]; + marginTop: "none" | "base" | "lg"; + marginBottom: "none" | "base" | "lg"; + component: "blog"; + _uid: string; + [k: string]: any; +} + +export interface BlogPostStoryblok { + date: string; + link: LinkStoryblok[]; + image: ImageStoryblok[]; + text: RichTextStoryblok[]; + component: "blogPost"; + _uid: string; + [k: string]: any; +} + +export interface CardsGridStoryblok { + items: DefaultCardStoryblok[]; + columns: "1" | "2" | "3"; + marginTop: "none" | "base" | "lg"; + marginBottom: "none" | "base" | "lg"; + component: "cardsGrid"; + _uid: string; + [k: string]: any; +} + +export interface CopyStoryblok { + isReversedOnMobile?: boolean; + columns: RichTextStoryblok[]; + marginTop: "none" | "base" | "lg"; + marginBottom: "none" | "base" | "lg"; + component: "copy"; + _uid: string; + [k: string]: any; +} + +export interface DefaultCardStoryblok { + title: string; + description?: string; + image?: ImageStoryblok[]; + link?: LinkStoryblok[]; + style: + | "icon-left" + | "icon-left-with-background" + | "icon-title-inline" + | "icon-top" + | "no-icon" + | "icon-left-separate-title"; + component: "defaultCard"; + _uid: string; + [k: string]: any; +} + +export interface FooterStoryblok { + image: ImageStoryblok[]; + text?: RichTextStoryblok[]; + links: LinkStoryblok[]; + copywriteText?: string; + component: "footer"; + _uid: string; + [k: string]: any; +} + +export interface HeaderStoryblok { + image: ImageStoryblok[]; + links: LinkStoryblok[]; + alignVariant: "left" | "center" | "right"; + component: "header"; + _uid: string; + [k: string]: any; +} + +export interface HeroStoryblok { + title?: string; + text?: RichTextStoryblok[]; + image: ImageStoryblok[]; + links: LinkStoryblok[]; + marginTop: "none" | "base" | "lg"; + marginBottom: "none" | "base" | "lg"; + component: "hero"; + _uid: string; + [k: string]: any; +} + +export interface AssetStoryblok { + alt: string | null; + copyright?: string | null; + fieldtype: "asset"; + id: number; + filename: string | null; + name: string; + title: string | null; + focus: string | null; + meta_data?: { + [k: string]: any; + }; + source?: string | null; + is_external_url?: boolean; + is_private?: boolean; + src?: string; + updated_at?: string; + width?: number | null; + height?: number | null; + aspect_ratio?: number | null; + public_id?: string | null; + content_type?: string; + [k: string]: any; +} + +export interface ImageStoryblok { + asset: AssetStoryblok; + aspectRatio: "16/9" | "3/2" | "4/3" | "1/1" | "9/16" | "1/2" | "4/1" | "3/1" | "auto"; + component: "image"; + _uid: string; + [k: string]: any; +} + +export type MultilinkStoryblok = + | { + fieldtype: "multilink"; + id: string; + url: string; + cached_url: string; + target?: "_blank" | "_self"; + anchor?: string; + rel?: string; + title?: string; + prep?: string; + linktype: "story"; + story?: { + name: string; + created_at?: string; + published_at?: string; + id: number; + uuid: string; + content?: { + [k: string]: any; + }; + slug: string; + full_slug: string; + sort_by_date?: null | string; + position?: number; + tag_list?: string[]; + is_startpage?: boolean; + parent_id?: null | number; + meta_data?: null | { + [k: string]: any; + }; + group_id?: string; + first_published_at?: string; + release_id?: null | number; + lang?: string; + path?: null | string; + alternates?: any[]; + default_full_slug?: null | string; + translated_slugs?: null | any[]; + [k: string]: any; + }; + [k: string]: any; + } + | { + fieldtype: "multilink"; + id: string; + url: string; + cached_url: string; + target?: "_blank" | "_self"; + linktype: "url"; + rel?: string; + title?: string; + [k: string]: any; + } + | { + fieldtype: "multilink"; + id: string; + url: string; + cached_url: string; + target?: "_blank" | "_self"; + email?: string; + linktype: "email"; + [k: string]: any; + } + | { + fieldtype: "multilink"; + id: string; + url: string; + cached_url: string; + target?: "_blank" | "_self"; + linktype: "asset"; + [k: string]: any; + }; + +export interface LinkStoryblok { + text: string; + variant: "default" | "primary" | "secondary" | "headerNav" | "footerNav" | "badge" | "ghost" | "ghost-dark"; + link: Exclude; + component: "link"; + _uid: string; + [k: string]: any; +} + +export interface LinksListStoryblok { + alignVariant: "left" | "center" | "right"; + links: LinkStoryblok[]; + marginTop: "none" | "base" | "lg"; + marginBottom: "none" | "base" | "lg"; + component: "linksList"; + _uid: string; + [k: string]: any; +} + +export interface LogoItemStoryblok { + type: "logo" | "clickableLogo"; + image: ImageStoryblok[]; + link?: LinkStoryblok[]; + component: "logoItem"; + _uid: string; + [k: string]: any; +} + +export interface LogosStoryblok { + alignVariant: "left" | "center" | "right"; + items: LogoItemStoryblok[]; + marginTop: "none" | "base" | "lg"; + marginBottom: "none" | "base" | "lg"; + component: "logos"; + _uid: string; + [k: string]: any; +} + +export interface PageStoryblok { + header: ISbStoryData | string; + sections: ( + | BlogStoryblok + | CardsGridStoryblok + | CopyStoryblok + | HeroStoryblok + | LinksListStoryblok + | LogosStoryblok + | PricingStoryblok + | SimpleCarouselStoryblok + | WideSimpleCarouselStoryblok + )[]; + seoTitle: string; + seoDescription: string; + ogImage?: AssetStoryblok; + robots: "index" | "no-index"; + showCookieBanner?: boolean; + footer: ISbStoryData | string; + component: "page"; + _uid: string; + [k: string]: any; +} + +export interface PricingStoryblok { + tiers?: PricingTierStoryblok[]; + yearlyDiscountPercentage?: string; + extraServiceEnabled?: boolean; + extraService?: PricingExtraServiceStoryblok[]; + component: "pricing"; + _uid: string; + [k: string]: any; +} + +export interface PricingExtraServiceStoryblok { + text: string; + cost: string; + component: "pricingExtraService"; + _uid: string; + [k: string]: any; +} + +export interface PricingTierStoryblok { + name: string; + icon: ImageStoryblok[]; + price?: string; + description: string; + features: PricingTierFeatureStoryblok[]; + link: LinkStoryblok[]; + popular?: boolean; + component: "pricingTier"; + _uid: string; + [k: string]: any; +} + +export interface PricingTierFeatureStoryblok { + text: string; + component: "pricingTierFeature"; + _uid: string; + [k: string]: any; +} + +export interface RichtextStoryblok { + type: string; + content?: RichtextStoryblok[]; + marks?: RichtextStoryblok[]; + attrs?: any; + text?: string; + [k: string]: any; +} + +export interface RichTextStoryblok { + alignVariant: "left" | "center" | "right"; + removeInnerMargins?: boolean; + content: RichtextStoryblok; + component: "richText"; + _uid: string; + [k: string]: any; +} + +export interface SimpleCarouselStoryblok { + slides: SimpleCarouselSlideStoryblok[]; + marginTop: "none" | "base" | "lg"; + marginBottom: "none" | "base" | "lg"; + component: "simpleCarousel"; + _uid: string; + [k: string]: any; +} + +export interface SimpleCarouselSlideStoryblok { + image: ImageStoryblok[]; + component: "simpleCarouselSlide"; + _uid: string; + [k: string]: any; +} + +export interface WideSimpleCarouselStoryblok { + slides: WideSimpleCarouselSlideStoryblok[]; + marginTop: "none" | "base" | "lg"; + marginBottom: "none" | "base" | "lg"; + component: "wideSimpleCarousel"; + _uid: string; + [k: string]: any; +} + +export interface WideSimpleCarouselSlideStoryblok { + image: ImageStoryblok[]; + component: "wideSimpleCarouselSlide"; + _uid: string; + [k: string]: any; +} diff --git a/apps/storyblok/src/generated/presets.production.json b/apps/storyblok/src/generated/presets.production.json index 248a4f6..aa54dc3 100644 --- a/apps/storyblok/src/generated/presets.production.json +++ b/apps/storyblok/src/generated/presets.production.json @@ -1289,141 +1289,225 @@ "description": "" }, { - "id": 2311924, + "id": 2311975, "name": "Default", "preset": { - "_uid": "1af10d2b-9756-473d-b00c-f6ec1cf95a86", - "slides": [ + "_uid": "58f68ee7-d789-4201-8963-03c08c0edbe5", + "text": [ { - "_uid": "05887b7b-05c9-48d9-b108-bdf0aa2784e2", - "image": [ - { - "_uid": "49701e3f-4a74-42c7-b0a2-3cf3ebd021c6", - "asset": { - "id": 17593700, - "alt": "", - "name": "", - "focus": "", - "title": "", - "source": "", - "filename": "https://a.storyblok.com/f/293915/3840x2160/2e8c505a38/nike-logo.png", - "copyright": "", - "fieldtype": "asset", - "meta_data": {}, - "is_external_url": false + "_uid": "cdc6dfbd-5208-40a4-af7e-0fdbcedafafb", + "content": { + "type": "doc", + "content": [ + { + "type": "heading", + "attrs": { + "level": 2 + }, + "content": [ + { + "text": "In Notion, work feels better.", + "type": "text" + } + ] }, - "component": "image", - "aspectRatio": "16/9" - } - ], - "component": "simpleCarouselSlide" + { + "type": "heading", + "attrs": { + "level": 2 + }, + "content": [ + { + "text": "With a little help from AI.", + "type": "text" + } + ] + } + ] + }, + "component": "richText", + "alignVariant": "left", + "removeInnerMargins": true + } + ], + "image": [ + { + "_uid": "262bcb34-10e0-4400-aea5-2a7dc5f68598", + "asset": { + "id": 17600300, + "alt": "", + "name": "", + "focus": "", + "title": "", + "source": "", + "filename": "https://a.storyblok.com/f/293915/2474x1318/df22f90af3/screenshot-2024-10-08-at-16-53-38.png", + "copyright": "", + "fieldtype": "asset", + "meta_data": {}, + "is_external_url": false + }, + "component": "image", + "aspectRatio": "16/9" + } + ], + "links": [ + { + "_uid": "38ffb55a-d12a-4e63-b2b0-5996c0d79177", + "link": { + "id": "5d416347-de08-4adb-b496-00b0a083de3a", + "url": "", + "linktype": "story", + "fieldtype": "multilink", + "cached_url": "blog" + }, + "text": "Get for free", + "variant": "primary", + "component": "link" }, { - "_uid": "417c36e6-a409-4a37-a836-820c3a67682d", - "image": [ - { - "_uid": "9bf63bef-15e9-4a10-a051-c83fcf1e2f77", - "asset": { - "id": 17593700, - "alt": "", - "name": "", - "focus": "", - "title": "", - "source": "", - "filename": "https://a.storyblok.com/f/293915/3840x2160/2e8c505a38/nike-logo.png", - "copyright": "", - "fieldtype": "asset", - "meta_data": {}, - "is_external_url": false - }, - "component": "image", - "aspectRatio": "16/9" - } - ], - "component": "simpleCarouselSlide" + "_uid": "cacf894d-a48f-4bdb-84d6-d9cf98ad9489", + "link": { + "id": "5d416347-de08-4adb-b496-00b0a083de3a", + "url": "", + "linktype": "story", + "fieldtype": "multilink", + "cached_url": "blog" + }, + "text": "Request a demo", + "variant": "secondary", + "component": "link" + } + ], + "title": "Write. Plan. Collaborate.", + "component": "hero", + "marginTop": "base", + "marginBottom": "base" + }, + "component_id": 6391508, + "space_id": 293915, + "created_at": "2024-10-08T15:14:26.596Z", + "updated_at": "2024-10-08T15:14:26.596Z", + "image": "//a.storyblok.com/f/293915/x/9118f0bd1b/screenshot-2024-10-08-at-17-14-10.png", + "color": "", + "icon": "", + "description": "" + }, + { + "id": 2312484, + "name": "Default", + "preset": { + "_uid": "4ad7fd52-a576-4601-9889-04b46142e382", + "image": [ + { + "_uid": "106d9002-a1c3-4f45-a2aa-8ff515b167e5", + "asset": { + "id": 17593700, + "alt": "", + "name": "", + "focus": "", + "title": "", + "source": "", + "filename": "https://a.storyblok.com/f/293915/3840x2160/2e8c505a38/nike-logo.png", + "copyright": "", + "fieldtype": "asset", + "meta_data": {}, + "is_external_url": false + }, + "component": "image", + "aspectRatio": "16/9" + } + ], + "links": [ + { + "_uid": "892b4038-4a39-473f-b3b6-b9b0b2c853bd", + "link": { + "id": "19601884-a1af-4b99-bd95-1a3ca01d5b7a", + "url": "", + "linktype": "story", + "fieldtype": "multilink", + "cached_url": "home" + }, + "text": "Home", + "variant": "default", + "component": "link" }, { - "_uid": "888d00d4-ab5e-45c2-9c7a-844cad205c4b", - "image": [ - { - "_uid": "2c717744-1757-4bbc-b01b-8cb35ab0100c", - "asset": { - "id": 17593700, - "alt": "", - "name": "", - "focus": "", - "title": "", - "source": "", - "filename": "https://a.storyblok.com/f/293915/3840x2160/2e8c505a38/nike-logo.png", - "copyright": "", - "fieldtype": "asset", - "meta_data": {}, - "is_external_url": false - }, - "component": "image", - "aspectRatio": "16/9" - } - ], - "component": "simpleCarouselSlide" + "_uid": "42da28cf-0299-4a13-a006-a1813862fe91", + "link": { + "id": "5d416347-de08-4adb-b496-00b0a083de3a", + "url": "", + "linktype": "story", + "fieldtype": "multilink", + "cached_url": "blog" + }, + "text": "Blog", + "variant": "default", + "component": "link" }, { - "_uid": "f44ca52a-ce5f-4be4-a5fc-367424f0a917", - "image": [ - { - "_uid": "2d31244a-823a-418d-b2be-bea0b266d932", - "asset": { - "id": 17593700, - "alt": "", - "name": "", - "focus": "", - "title": "", - "source": "", - "filename": "https://a.storyblok.com/f/293915/3840x2160/2e8c505a38/nike-logo.png", - "copyright": "", - "fieldtype": "asset", - "meta_data": {}, - "is_external_url": false - }, - "component": "image", - "aspectRatio": "16/9" - } - ], - "component": "simpleCarouselSlide" + "_uid": "e60a7e37-87dc-4ce8-b6a5-70c3c7d4cecc", + "link": { + "id": "", + "url": "https://app.storyblok.com/#/me/spaces/293915", + "target": "_blank", + "linktype": "url", + "fieldtype": "multilink", + "cached_url": "https://app.storyblok.com/#/me/spaces/293915" + }, + "text": "Storyblok", + "variant": "default", + "component": "link" }, { - "_uid": "2d757401-fb99-4632-b7b3-eee67d7ceb0b", - "image": [ - { - "_uid": "93bb87e9-c91d-432f-b789-60a446afe1c7", - "asset": { - "id": 17593700, - "alt": "", - "name": "", - "focus": "", - "title": "", - "source": "", - "filename": "https://a.storyblok.com/f/293915/3840x2160/2e8c505a38/nike-logo.png", - "copyright": "", - "fieldtype": "asset", - "meta_data": {}, - "is_external_url": false - }, - "component": "image", - "aspectRatio": "16/9" - } - ], - "component": "simpleCarouselSlide" + "_uid": "3d6ad342-43b8-4b71-ad05-d9b581d76a0b", + "link": { + "id": "", + "url": "https://github.com/focusreactive/turbo-cms-kit", + "target": "_blank", + "linktype": "url", + "fieldtype": "multilink", + "cached_url": "https://github.com/focusreactive/turbo-cms-kit" + }, + "text": "GitHub", + "variant": "default", + "component": "link" + }, + { + "_uid": "da6abcc0-86a7-4891-9021-80f073e2fa3e", + "link": { + "id": "", + "url": "https://trello.com/b/2XLLkCma/cms-kit", + "target": "_blank", + "linktype": "url", + "fieldtype": "multilink", + "cached_url": "https://trello.com/b/2XLLkCma/cms-kit" + }, + "text": "Trello", + "variant": "default", + "component": "link" + }, + { + "_uid": "f52b36a2-29d5-4b86-a79b-ddd7d135b274", + "link": { + "id": "", + "url": "https://vercel.com/focusreactive/turbo-cms-kit-storyblok", + "linktype": "url", + "fieldtype": "multilink", + "cached_url": "https://vercel.com/focusreactive/turbo-cms-kit-storyblok" + }, + "text": "Vercel", + "variant": "default", + "component": "link" } ], - "component": "simpleCarousel", - "marginTop": "base", - "marginBottom": "base" + "component": "header", + "alignVariant": "right" }, - "component_id": 6391276, + "component_id": 6394530, "space_id": 293915, - "created_at": "2024-10-08T14:31:24.209Z", - "updated_at": "2024-10-08T15:43:18.631Z", - "image": "//a.storyblok.com/f/293915/x/bd83ad5125/screenshot-2024-10-08-at-16-30-53.png", + "created_at": "2024-10-09T05:55:35.787Z", + "updated_at": "2024-10-09T05:55:35.787Z", + "image": "//a.storyblok.com/f/293915/x/beab857f5f/screenshot-2024-10-08-at-13-37-02.png", "color": "", "icon": "", "description": "" @@ -1949,117 +2033,13 @@ "description": "" }, { - "id": 2311975, - "name": "Default", - "preset": { - "_uid": "58f68ee7-d789-4201-8963-03c08c0edbe5", - "text": [ - { - "_uid": "cdc6dfbd-5208-40a4-af7e-0fdbcedafafb", - "content": { - "type": "doc", - "content": [ - { - "type": "heading", - "attrs": { - "level": 2 - }, - "content": [ - { - "text": "In Notion, work feels better.", - "type": "text" - } - ] - }, - { - "type": "heading", - "attrs": { - "level": 2 - }, - "content": [ - { - "text": "With a little help from AI.", - "type": "text" - } - ] - } - ] - }, - "component": "richText", - "alignVariant": "left", - "removeInnerMargins": true - } - ], - "image": [ - { - "_uid": "262bcb34-10e0-4400-aea5-2a7dc5f68598", - "asset": { - "id": 17600300, - "alt": "", - "name": "", - "focus": "", - "title": "", - "source": "", - "filename": "https://a.storyblok.com/f/293915/2474x1318/df22f90af3/screenshot-2024-10-08-at-16-53-38.png", - "copyright": "", - "fieldtype": "asset", - "meta_data": {}, - "is_external_url": false - }, - "component": "image", - "aspectRatio": "16/9" - } - ], - "links": [ - { - "_uid": "38ffb55a-d12a-4e63-b2b0-5996c0d79177", - "link": { - "id": "5d416347-de08-4adb-b496-00b0a083de3a", - "url": "", - "linktype": "story", - "fieldtype": "multilink", - "cached_url": "blog" - }, - "text": "Get for free", - "variant": "primary", - "component": "link" - }, - { - "_uid": "cacf894d-a48f-4bdb-84d6-d9cf98ad9489", - "link": { - "id": "5d416347-de08-4adb-b496-00b0a083de3a", - "url": "", - "linktype": "story", - "fieldtype": "multilink", - "cached_url": "blog" - }, - "text": "Request a demo", - "variant": "secondary", - "component": "link" - } - ], - "title": "Write. Plan. Collaborate.", - "component": "hero", - "marginTop": "base", - "marginBottom": "base" - }, - "component_id": 6391508, - "space_id": 293915, - "created_at": "2024-10-08T15:14:26.596Z", - "updated_at": "2024-10-08T15:14:26.596Z", - "image": "//a.storyblok.com/f/293915/x/9118f0bd1b/screenshot-2024-10-08-at-17-14-10.png", - "color": "", - "icon": "", - "description": "" - }, - { - "id": 2312484, + "id": 2311925, "name": "Default", "preset": { - "_uid": "4ad7fd52-a576-4601-9889-04b46142e382", + "_uid": "6ba0bc81-e7fc-432b-87c4-5373260b484b", "image": [ { - "_uid": "106d9002-a1c3-4f45-a2aa-8ff515b167e5", + "_uid": "76b33db3-8365-49e3-86d8-0806dcae26b6", "asset": { "id": 17593700, "alt": "", @@ -2077,97 +2057,153 @@ "aspectRatio": "16/9" } ], - "links": [ - { - "_uid": "892b4038-4a39-473f-b3b6-b9b0b2c853bd", - "link": { - "id": "19601884-a1af-4b99-bd95-1a3ca01d5b7a", - "url": "", - "linktype": "story", - "fieldtype": "multilink", - "cached_url": "home" - }, - "text": "Home", - "variant": "default", - "component": "link" - }, + "component": "simpleCarouselSlide" + }, + "component_id": 6391277, + "space_id": 293915, + "created_at": "2024-10-08T14:31:37.528Z", + "updated_at": "2024-10-08T14:31:37.528Z", + "image": "//a.storyblok.com/f/293915/x/6750a101ef/screenshot-2024-10-08-at-16-31-02.png", + "color": "", + "icon": "", + "description": "" + }, + { + "id": 2311924, + "name": "Default", + "preset": { + "_uid": "1af10d2b-9756-473d-b00c-f6ec1cf95a86", + "slides": [ { - "_uid": "42da28cf-0299-4a13-a006-a1813862fe91", - "link": { - "id": "5d416347-de08-4adb-b496-00b0a083de3a", - "url": "", - "linktype": "story", - "fieldtype": "multilink", - "cached_url": "blog" - }, - "text": "Blog", - "variant": "default", - "component": "link" + "_uid": "05887b7b-05c9-48d9-b108-bdf0aa2784e2", + "image": [ + { + "_uid": "49701e3f-4a74-42c7-b0a2-3cf3ebd021c6", + "asset": { + "id": 17593700, + "alt": "", + "name": "", + "focus": "", + "title": "", + "source": "", + "filename": "https://a.storyblok.com/f/293915/3840x2160/2e8c505a38/nike-logo.png", + "copyright": "", + "fieldtype": "asset", + "meta_data": {}, + "is_external_url": false + }, + "component": "image", + "aspectRatio": "16/9" + } + ], + "component": "simpleCarouselSlide" }, { - "_uid": "e60a7e37-87dc-4ce8-b6a5-70c3c7d4cecc", - "link": { - "id": "", - "url": "https://app.storyblok.com/#/me/spaces/293915", - "target": "_blank", - "linktype": "url", - "fieldtype": "multilink", - "cached_url": "https://app.storyblok.com/#/me/spaces/293915" - }, - "text": "Storyblok", - "variant": "default", - "component": "link" + "_uid": "417c36e6-a409-4a37-a836-820c3a67682d", + "image": [ + { + "_uid": "9bf63bef-15e9-4a10-a051-c83fcf1e2f77", + "asset": { + "id": 17593700, + "alt": "", + "name": "", + "focus": "", + "title": "", + "source": "", + "filename": "https://a.storyblok.com/f/293915/3840x2160/2e8c505a38/nike-logo.png", + "copyright": "", + "fieldtype": "asset", + "meta_data": {}, + "is_external_url": false + }, + "component": "image", + "aspectRatio": "16/9" + } + ], + "component": "simpleCarouselSlide" }, { - "_uid": "3d6ad342-43b8-4b71-ad05-d9b581d76a0b", - "link": { - "id": "", - "url": "https://github.com/focusreactive/turbo-cms-kit", - "target": "_blank", - "linktype": "url", - "fieldtype": "multilink", - "cached_url": "https://github.com/focusreactive/turbo-cms-kit" - }, - "text": "GitHub", - "variant": "default", - "component": "link" + "_uid": "888d00d4-ab5e-45c2-9c7a-844cad205c4b", + "image": [ + { + "_uid": "2c717744-1757-4bbc-b01b-8cb35ab0100c", + "asset": { + "id": 17593700, + "alt": "", + "name": "", + "focus": "", + "title": "", + "source": "", + "filename": "https://a.storyblok.com/f/293915/3840x2160/2e8c505a38/nike-logo.png", + "copyright": "", + "fieldtype": "asset", + "meta_data": {}, + "is_external_url": false + }, + "component": "image", + "aspectRatio": "16/9" + } + ], + "component": "simpleCarouselSlide" }, { - "_uid": "da6abcc0-86a7-4891-9021-80f073e2fa3e", - "link": { - "id": "", - "url": "https://trello.com/b/2XLLkCma/cms-kit", - "target": "_blank", - "linktype": "url", - "fieldtype": "multilink", - "cached_url": "https://trello.com/b/2XLLkCma/cms-kit" - }, - "text": "Trello", - "variant": "default", - "component": "link" + "_uid": "f44ca52a-ce5f-4be4-a5fc-367424f0a917", + "image": [ + { + "_uid": "2d31244a-823a-418d-b2be-bea0b266d932", + "asset": { + "id": 17593700, + "alt": "", + "name": "", + "focus": "", + "title": "", + "source": "", + "filename": "https://a.storyblok.com/f/293915/3840x2160/2e8c505a38/nike-logo.png", + "copyright": "", + "fieldtype": "asset", + "meta_data": {}, + "is_external_url": false + }, + "component": "image", + "aspectRatio": "16/9" + } + ], + "component": "simpleCarouselSlide" }, { - "_uid": "f52b36a2-29d5-4b86-a79b-ddd7d135b274", - "link": { - "id": "", - "url": "https://vercel.com/focusreactive/turbo-cms-kit-storyblok", - "linktype": "url", - "fieldtype": "multilink", - "cached_url": "https://vercel.com/focusreactive/turbo-cms-kit-storyblok" - }, - "text": "Vercel", - "variant": "default", - "component": "link" + "_uid": "2d757401-fb99-4632-b7b3-eee67d7ceb0b", + "image": [ + { + "_uid": "93bb87e9-c91d-432f-b789-60a446afe1c7", + "asset": { + "id": 17593700, + "alt": "", + "name": "", + "focus": "", + "title": "", + "source": "", + "filename": "https://a.storyblok.com/f/293915/3840x2160/2e8c505a38/nike-logo.png", + "copyright": "", + "fieldtype": "asset", + "meta_data": {}, + "is_external_url": false + }, + "component": "image", + "aspectRatio": "16/9" + } + ], + "component": "simpleCarouselSlide" } ], - "component": "header", - "alignVariant": "right" + "component": "simpleCarousel", + "marginTop": "base", + "marginBottom": "base" }, - "component_id": 6394530, + "component_id": 6391276, "space_id": 293915, - "created_at": "2024-10-09T05:55:35.787Z", - "updated_at": "2024-10-09T05:55:35.787Z", - "image": "//a.storyblok.com/f/293915/x/beab857f5f/screenshot-2024-10-08-at-13-37-02.png", + "created_at": "2024-10-08T14:31:24.209Z", + "updated_at": "2024-10-08T15:43:18.631Z", + "image": "//a.storyblok.com/f/293915/x/bd83ad5125/screenshot-2024-10-08-at-16-30-53.png", "color": "", "icon": "", "description": "" @@ -2320,42 +2356,6 @@ "icon": "", "description": "" }, - { - "id": 2311925, - "name": "Default", - "preset": { - "_uid": "6ba0bc81-e7fc-432b-87c4-5373260b484b", - "image": [ - { - "_uid": "76b33db3-8365-49e3-86d8-0806dcae26b6", - "asset": { - "id": 17593700, - "alt": "", - "name": "", - "focus": "", - "title": "", - "source": "", - "filename": "https://a.storyblok.com/f/293915/3840x2160/2e8c505a38/nike-logo.png", - "copyright": "", - "fieldtype": "asset", - "meta_data": {}, - "is_external_url": false - }, - "component": "image", - "aspectRatio": "16/9" - } - ], - "component": "simpleCarouselSlide" - }, - "component_id": 6391277, - "space_id": 293915, - "created_at": "2024-10-08T14:31:37.528Z", - "updated_at": "2024-10-08T14:31:37.528Z", - "image": "//a.storyblok.com/f/293915/x/6750a101ef/screenshot-2024-10-08-at-16-31-02.png", - "color": "", - "icon": "", - "description": "" - }, { "id": 2225125, "name": "Default Centered", @@ -4834,6 +4834,26 @@ "icon": "", "description": "" }, + { + "id": 2335597, + "name": "Pricing", + "preset": { + "_uid": "b4501ba5-a0ae-452d-bb61-fca7c9edf808", + "tiers": [], + "component": "pricing", + "extraService": [], + "extraServiceEnabled": false, + "yearlyDiscountPercentage": "" + }, + "component_id": 6489128, + "space_id": 293915, + "created_at": "2024-10-29T14:34:25.198Z", + "updated_at": "2024-10-29T14:34:25.198Z", + "image": "//a.storyblok.com/f/293915/x/a01a228065/screenshot-2024-10-29-at-15-33-45.png", + "color": "", + "icon": "", + "description": "" + }, { "id": 2282728, "name": "Text with CMS logos", @@ -5270,4 +5290,4 @@ "description": "" } ] -} +} \ No newline at end of file diff --git a/apps/storyblok/src/lib/adapters/prepareImageProps.tsx b/apps/storyblok/src/lib/adapters/prepareImageProps.tsx index 9f7da9e..ad63541 100644 --- a/apps/storyblok/src/lib/adapters/prepareImageProps.tsx +++ b/apps/storyblok/src/lib/adapters/prepareImageProps.tsx @@ -1,20 +1,10 @@ +import type { ImageStoryblok } from "@/generated/extracted-types"; import { ImageAspectRatio, type IImageProps, } from "@shared/ui/components/ui/image/types"; -import type { SbBlokData } from "@storyblok/react/rsc"; -interface IStoryblokImage { - alt: string; - filename: string; -} - -export interface IImage extends SbBlokData { - asset: IStoryblokImage; - aspectRatio: ImageAspectRatio; -} - -export const prepareImageProps = (props?: IImage): IImageProps => { +export const prepareImageProps = (props?: ImageStoryblok): IImageProps => { if (!props) { return { src: "", @@ -26,9 +16,9 @@ export const prepareImageProps = (props?: IImage): IImageProps => { } return { - src: props.asset.filename, - alt: props.asset.alt, - aspectRatio: props.aspectRatio, + src: props.asset.filename || "", + alt: props.asset.alt || "", + aspectRatio: props.aspectRatio as ImageAspectRatio, fill: true, fit: "cover", sizes: "(max-width: 1280px) 100vw, 1280px", diff --git a/apps/storyblok/src/lib/adapters/prepareLinkProps.ts b/apps/storyblok/src/lib/adapters/prepareLinkProps.ts index 8bd9857..089e63f 100644 --- a/apps/storyblok/src/lib/adapters/prepareLinkProps.ts +++ b/apps/storyblok/src/lib/adapters/prepareLinkProps.ts @@ -1,8 +1,8 @@ +import type { LinkStoryblok } from "@/generated/extracted-types"; import { LinkVariant, type LinkProps, } from "@shared/ui/components/ui/link/types"; -import type { SbBlokData } from "@storyblok/react/rsc"; import { useDataContext } from "@/components/DataContext"; @@ -14,27 +14,7 @@ export enum LinkTypes { email = "email", } -export interface IStoryLink { - id: string; - url: string; - anchor?: string; - linktype: LinkTypes; - fieldtype: string; - cached_url: string; - target?: string; - story?: { - full_slug: string; - }; -} - -export interface ILinkBlok extends SbBlokData { - text: string; - link: IStoryLink; - variant: LinkVariant; - newTab?: boolean; -} - -export const prepareLinkProps = (props?: ILinkBlok): LinkProps => { +export const prepareLinkProps = (props?: LinkStoryblok): LinkProps => { const { allResolvedLinks } = useDataContext(); if (!props) { @@ -67,7 +47,7 @@ export const prepareLinkProps = (props?: ILinkBlok): LinkProps => { return { text: props.text, href: url, - variant: props.variant, + variant: props.variant as LinkVariant, clickDisabled: isPreview, }; }; diff --git a/apps/storyblok/src/lib/adapters/prepareRichTextProps.ts b/apps/storyblok/src/lib/adapters/prepareRichTextProps.ts index 7f77a70..4e548c3 100644 --- a/apps/storyblok/src/lib/adapters/prepareRichTextProps.ts +++ b/apps/storyblok/src/lib/adapters/prepareRichTextProps.ts @@ -1,18 +1,14 @@ +import type { RichTextStoryblok } from "@/generated/extracted-types"; import { AlignVariant, type IRichTextProps, } from "@shared/ui/components/ui/richText/types"; -import type { ISbRichtext, SbBlokData } from "@storyblok/react/rsc"; import renderRichText from "../renderRichText"; -export interface IRichText extends SbBlokData { - content: ISbRichtext; - removeInnerMargins?: boolean; - alignVariant: AlignVariant; -} - -export const prepareRichTextProps = (props?: IRichText): IRichTextProps => { +export const prepareRichTextProps = ( + props?: RichTextStoryblok, +): IRichTextProps => { if (!props) { return { richText: null, @@ -24,6 +20,6 @@ export const prepareRichTextProps = (props?: IRichText): IRichTextProps => { return { richText: renderRichText(props.content), removeInnerMargins: props.removeInnerMargins, - alignVariant: props.alignVariant, + alignVariant: props.alignVariant as AlignVariant, }; }; diff --git a/apps/storyblok/src/lib/renderRichText.tsx b/apps/storyblok/src/lib/renderRichText.tsx index 3f042db..66bc448 100644 --- a/apps/storyblok/src/lib/renderRichText.tsx +++ b/apps/storyblok/src/lib/renderRichText.tsx @@ -1,9 +1,10 @@ +import type { ImageStoryblok } from "@/generated/extracted-types"; import { StoryblokComponent, type ISbRichtext } from "@storyblok/react/rsc"; import { render } from "storyblok-rich-text-react-renderer"; import { Image } from "@shared/ui"; -import { prepareImageProps, type IImage } from "./adapters/prepareImageProps"; +import { prepareImageProps } from "./adapters/prepareImageProps"; export default function renderRichText(data: ISbRichtext) { return render(data, { @@ -20,7 +21,7 @@ export default function renderRichText(data: ISbRichtext) { > diff --git a/packages/ui/components/sections/cardsGrid/types.ts b/packages/ui/components/sections/cardsGrid/types.ts index f0dfda4..d60dae1 100644 --- a/packages/ui/components/sections/cardsGrid/types.ts +++ b/packages/ui/components/sections/cardsGrid/types.ts @@ -12,7 +12,7 @@ export enum DefaultCardStyle { export interface IDefaultCardProps { title: string; - description: string; + description?: string; style: DefaultCardStyle; image?: IImageProps; link?: LinkProps;