kofi-stack-template-generator 2.1.37 → 2.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +6 -6
- package/dist/index.js +8057 -440
- package/package.json +1 -1
- package/src/templates.generated.ts +248 -94
- package/templates/integrations/posthog/src/components/providers/posthog-provider.tsx.hbs +4 -1
- package/templates/marketing/payload/package.json.hbs +41 -26
- package/templates/marketing/payload/src/Footer/Component.client.tsx +288 -0
- package/templates/marketing/payload/src/Footer/Component.tsx +11 -0
- package/templates/marketing/payload/src/Footer/RowLabel.tsx +15 -0
- package/templates/marketing/payload/src/Footer/config.ts +178 -0
- package/templates/marketing/payload/src/Footer/hooks/{revalidateFooter.ts.hbs → revalidateFooter.ts} +5 -5
- package/templates/marketing/payload/src/Header/Component.client.tsx +94 -0
- package/templates/marketing/payload/src/Header/Component.tsx +10 -0
- package/templates/marketing/payload/src/Header/MegaMenu/index.tsx +197 -0
- package/templates/marketing/payload/src/Header/MobileMenu/HamburgerIcon.tsx +48 -0
- package/templates/marketing/payload/src/Header/MobileMenu/index.tsx +299 -0
- package/templates/marketing/payload/src/Header/Nav/index.tsx +76 -0
- package/templates/marketing/payload/src/Header/RowLabel.tsx +21 -0
- package/templates/marketing/payload/src/Header/config.ts +208 -0
- package/templates/marketing/payload/src/Header/hooks/{revalidateHeader.ts.hbs → revalidateHeader.ts} +5 -5
- package/templates/marketing/payload/src/access/{authenticated.ts.hbs → authenticated.ts} +1 -1
- package/templates/marketing/payload/src/access/{authenticatedOrPublished.ts.hbs → authenticatedOrPublished.ts} +8 -8
- package/templates/marketing/payload/src/app/(docs)/docs/[[...slug]]/page.tsx +117 -0
- package/templates/marketing/payload/src/app/(docs)/docs/layout.tsx +39 -0
- package/templates/marketing/payload/src/app/(docs)/layout.tsx +44 -0
- package/templates/marketing/payload/src/app/(frontend)/(sitemaps)/pages-sitemap.xml/route.ts +68 -0
- package/templates/marketing/payload/src/app/(frontend)/(sitemaps)/posts-sitemap.xml/route.ts +55 -0
- package/templates/marketing/payload/src/app/(frontend)/[slug]/page.client.tsx +15 -0
- package/templates/marketing/payload/src/app/(frontend)/[slug]/page.tsx +114 -0
- package/templates/marketing/payload/src/app/(frontend)/api/docs-search/route.ts +67 -0
- package/templates/marketing/payload/src/app/(frontend)/api/newsletter/route.ts +260 -0
- package/templates/marketing/payload/src/app/(frontend)/api/pricing/route.ts +266 -0
- package/templates/marketing/payload/src/app/(frontend)/globals.css +1019 -0
- package/templates/marketing/payload/src/app/(frontend)/layout.tsx +114 -0
- package/templates/marketing/payload/src/app/(frontend)/next/exit-preview/route.ts +7 -0
- package/templates/marketing/payload/src/app/(frontend)/next/preview/route.ts +56 -0
- package/templates/marketing/payload/src/app/(frontend)/next/seed/route.ts +31 -0
- package/templates/marketing/payload/src/app/(frontend)/not-found.tsx +17 -0
- package/templates/marketing/payload/src/app/(frontend)/page.tsx +5 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/BlogPageClient.tsx +190 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/[slug]/BlogPostContent.tsx +67 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/[slug]/page.client.tsx +15 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/[slug]/page.tsx +118 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/page/[pageNumber]/page.client.tsx +15 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/page/[pageNumber]/page.tsx +87 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/page.tsx +49 -0
- package/templates/marketing/payload/src/app/(frontend)/search/page.client.tsx +15 -0
- package/templates/marketing/payload/src/app/(frontend)/search/page.tsx +87 -0
- package/templates/marketing/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx +24 -0
- package/templates/marketing/payload/src/app/(payload)/admin/[[...segments]]/page.tsx +24 -0
- package/templates/marketing/payload/src/app/(payload)/admin/importMap.js +83 -0
- package/templates/marketing/payload/src/app/(payload)/api/[...slug]/{route.ts.hbs → route.ts} +13 -9
- package/templates/marketing/payload/src/app/(payload)/api/graphql/{route.ts.hbs → route.ts} +2 -2
- package/templates/marketing/payload/src/app/(payload)/api/graphql-playground/{route.ts.hbs → route.ts} +3 -3
- package/templates/marketing/payload/src/app/(payload)/custom.scss +0 -0
- package/templates/marketing/payload/src/app/(payload)/layout.tsx +31 -0
- package/templates/marketing/payload/src/blocks/ArchiveBlock/Component.tsx +65 -0
- package/templates/marketing/payload/src/blocks/ArchiveBlock/config.ts +120 -0
- package/templates/marketing/payload/src/blocks/Banner/Component.tsx +26 -0
- package/templates/marketing/payload/src/blocks/Banner/config.ts +67 -0
- package/templates/marketing/payload/src/blocks/BentoFeatures/Component.tsx +243 -0
- package/templates/marketing/payload/src/blocks/BentoFeatures/config.ts +147 -0
- package/templates/marketing/payload/src/blocks/CallToAction/Component.tsx +31 -0
- package/templates/marketing/payload/src/blocks/CallToAction/config.ts +68 -0
- package/templates/marketing/payload/src/blocks/Code/Component.client.tsx +33 -0
- package/templates/marketing/payload/src/blocks/Code/Component.tsx +21 -0
- package/templates/marketing/payload/src/blocks/Code/CopyButton.tsx +33 -0
- package/templates/marketing/payload/src/blocks/Code/config.ts +33 -0
- package/templates/marketing/payload/src/blocks/Content/Component.tsx +41 -0
- package/templates/marketing/payload/src/blocks/Content/config.ts +105 -0
- package/templates/marketing/payload/src/blocks/FAQAccordion/Component.tsx +90 -0
- package/templates/marketing/payload/src/blocks/FAQAccordion/config.ts +75 -0
- package/templates/marketing/payload/src/blocks/FeatureGrid/Component.tsx +124 -0
- package/templates/marketing/payload/src/blocks/FeatureGrid/config.ts +120 -0
- package/templates/marketing/payload/src/blocks/FeatureShowcase/Component.tsx +107 -0
- package/templates/marketing/payload/src/blocks/FeatureShowcase/config.ts +111 -0
- package/templates/marketing/payload/src/blocks/FinalCTA/Component.tsx +117 -0
- package/templates/marketing/payload/src/blocks/FinalCTA/config.ts +50 -0
- package/templates/marketing/payload/src/blocks/Form/Checkbox/index.tsx +45 -0
- package/templates/marketing/payload/src/blocks/Form/Component.tsx +170 -0
- package/templates/marketing/payload/src/blocks/Form/Country/index.tsx +65 -0
- package/templates/marketing/payload/src/blocks/Form/Country/options.ts +982 -0
- package/templates/marketing/payload/src/blocks/Form/Email/index.tsx +38 -0
- package/templates/marketing/payload/src/blocks/Form/Error/index.tsx +13 -0
- package/templates/marketing/payload/src/blocks/Form/Message/index.tsx +13 -0
- package/templates/marketing/payload/src/blocks/Form/Number/index.tsx +36 -0
- package/templates/marketing/payload/src/blocks/Form/Select/index.tsx +63 -0
- package/templates/marketing/payload/src/blocks/Form/State/index.tsx +64 -0
- package/templates/marketing/payload/src/blocks/Form/State/options.ts +52 -0
- package/templates/marketing/payload/src/blocks/Form/Text/index.tsx +32 -0
- package/templates/marketing/payload/src/blocks/Form/Textarea/index.tsx +40 -0
- package/templates/marketing/payload/src/blocks/Form/Width/index.tsx +13 -0
- package/templates/marketing/payload/src/blocks/Form/config.ts +77 -0
- package/templates/marketing/payload/src/blocks/Form/fields.tsx +21 -0
- package/templates/marketing/payload/src/blocks/HowItWorks/Component.tsx +59 -0
- package/templates/marketing/payload/src/blocks/HowItWorks/config.ts +88 -0
- package/templates/marketing/payload/src/blocks/IndustryTabs/Component.tsx +132 -0
- package/templates/marketing/payload/src/blocks/IndustryTabs/config.ts +77 -0
- package/templates/marketing/payload/src/blocks/LogoBanner/Component.tsx +95 -0
- package/templates/marketing/payload/src/blocks/LogoBanner/config.ts +48 -0
- package/templates/marketing/payload/src/blocks/MediaBlock/Component.tsx +67 -0
- package/templates/marketing/payload/src/blocks/MediaBlock/config.ts +14 -0
- package/templates/marketing/payload/src/blocks/Personas/Component.tsx +69 -0
- package/templates/marketing/payload/src/blocks/Personas/config.ts +96 -0
- package/templates/marketing/payload/src/blocks/PricingTable/ComparisonTable.tsx +250 -0
- package/templates/marketing/payload/src/blocks/PricingTable/Component.tsx +443 -0
- package/templates/marketing/payload/src/blocks/PricingTable/config.ts +142 -0
- package/templates/marketing/payload/src/blocks/ProofBanner/Component.tsx +65 -0
- package/templates/marketing/payload/src/blocks/ProofBanner/config.ts +42 -0
- package/templates/marketing/payload/src/blocks/RelatedPosts/Component.tsx +32 -0
- package/templates/marketing/payload/src/blocks/RenderBlocks.tsx +92 -0
- package/templates/marketing/payload/src/blocks/TestimonialsGrid/Component.tsx +107 -0
- package/templates/marketing/payload/src/blocks/TestimonialsGrid/config.ts +76 -0
- package/templates/marketing/payload/src/blocks/TrustColumns/Component.tsx +83 -0
- package/templates/marketing/payload/src/blocks/TrustColumns/config.ts +70 -0
- package/templates/marketing/payload/src/collections/Categories.ts +28 -0
- package/templates/marketing/payload/src/collections/FAQs/index.ts +100 -0
- package/templates/marketing/payload/src/collections/Media.ts +160 -0
- package/templates/marketing/payload/src/collections/Pages/hooks/revalidatePage.ts +43 -0
- package/templates/marketing/payload/src/collections/Pages/index.ts +168 -0
- package/templates/marketing/payload/src/collections/Posts/hooks/populateAuthors.ts +41 -0
- package/templates/marketing/payload/src/collections/Posts/hooks/revalidatePost.ts +44 -0
- package/templates/marketing/payload/src/collections/Posts/index.ts +259 -0
- package/templates/marketing/payload/src/collections/Users/index.ts +26 -0
- package/templates/marketing/payload/src/components/AdminBar/index.scss +7 -0
- package/templates/marketing/payload/src/components/AdminBar/index.tsx +89 -0
- package/templates/marketing/payload/src/components/Analytics/CTATracker.tsx +33 -0
- package/templates/marketing/payload/src/components/Analytics/FeatureSectionTracker.tsx +47 -0
- package/templates/marketing/payload/src/components/Analytics/PricingViewTracker.tsx +46 -0
- package/templates/marketing/payload/src/components/Analytics/index.tsx +3 -0
- package/templates/marketing/payload/src/components/BeforeDashboard/SeedButton/index.tsx +89 -0
- package/templates/marketing/payload/src/components/BeforeDashboard/index.tsx +69 -0
- package/templates/marketing/payload/src/components/BeforeLogin/index.tsx +14 -0
- package/templates/marketing/payload/src/components/BlogCTA/index.tsx +77 -0
- package/templates/marketing/payload/src/components/Card/index.tsx +85 -0
- package/templates/marketing/payload/src/components/CollectionArchive/index.tsx +32 -0
- package/templates/marketing/payload/src/components/JsonLd/index.tsx +138 -0
- package/templates/marketing/payload/src/components/Link/index.tsx +66 -0
- package/templates/marketing/payload/src/components/LivePreviewListener/index.tsx +10 -0
- package/templates/marketing/payload/src/components/Logo/Logo.tsx +46 -0
- package/templates/marketing/payload/src/components/Media/ImageMedia/index.tsx +80 -0
- package/templates/marketing/payload/src/components/Media/VideoMedia/index.tsx +47 -0
- package/templates/marketing/payload/src/components/Media/index.tsx +26 -0
- package/templates/marketing/payload/src/components/Media/types.ts +22 -0
- package/templates/marketing/payload/src/components/PageRange/index.tsx +57 -0
- package/templates/marketing/payload/src/components/Pagination/index.tsx +101 -0
- package/templates/marketing/payload/src/components/PayloadRedirects/index.tsx +48 -0
- package/templates/marketing/payload/src/components/RichText/index.tsx +152 -0
- package/templates/marketing/payload/src/components/TableOfContents/index.tsx +128 -0
- package/templates/marketing/payload/src/components/ui/accordion.tsx +64 -0
- package/templates/marketing/payload/src/components/ui/button.tsx +52 -0
- package/templates/marketing/payload/src/components/ui/card.tsx +48 -0
- package/templates/marketing/payload/src/components/ui/checkbox.tsx +27 -0
- package/templates/marketing/payload/src/components/ui/input.tsx +22 -0
- package/templates/marketing/payload/src/components/ui/label.tsx +19 -0
- package/templates/marketing/payload/src/components/ui/pagination.tsx +92 -0
- package/templates/marketing/payload/src/components/ui/select.tsx +144 -0
- package/templates/marketing/payload/src/components/ui/textarea.tsx +21 -0
- package/templates/marketing/payload/src/endpoints/seed/contact-form.ts +111 -0
- package/templates/marketing/payload/src/endpoints/seed/contact-page.ts +56 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/about.ts +281 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/faqs.ts +224 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/automation.ts +229 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/custom-fields.ts +229 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/dashboard.ts +228 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/index.ts +6 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/monetization.ts +230 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/seo.ts +229 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/templates.ts +218 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/home.ts +555 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/index.ts +767 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/posts.ts +623 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/pricing.ts +251 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/privacy.ts +457 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/richtext-helper.ts +88 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/terms.ts +478 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/b2b-vendor-hubs.ts +229 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/communities.ts +230 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/index.ts +4 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/local-services.ts +230 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/marketplaces.ts +230 -0
- package/templates/marketing/payload/src/endpoints/seed/home-static.ts +691 -0
- package/templates/marketing/payload/src/endpoints/seed/home.ts +675 -0
- package/templates/marketing/payload/src/endpoints/seed/image-1.ts +67 -0
- package/templates/marketing/payload/src/endpoints/seed/image-2.ts +67 -0
- package/templates/marketing/payload/src/endpoints/seed/image-3.ts +67 -0
- package/templates/marketing/payload/src/endpoints/seed/image-hero-1.ts +5 -0
- package/templates/marketing/payload/src/endpoints/seed/image-hero1.webp +0 -0
- package/templates/marketing/payload/src/endpoints/seed/image-post1.webp +0 -0
- package/templates/marketing/payload/src/endpoints/seed/image-post2.webp +0 -0
- package/templates/marketing/payload/src/endpoints/seed/image-post3.webp +0 -0
- package/templates/marketing/payload/src/endpoints/seed/index.ts +335 -0
- package/templates/marketing/payload/src/endpoints/seed/post-1.ts +315 -0
- package/templates/marketing/payload/src/endpoints/seed/post-2.ts +232 -0
- package/templates/marketing/payload/src/endpoints/seed/post-3.ts +268 -0
- package/templates/marketing/payload/src/fields/defaultLexical.ts +73 -0
- package/templates/marketing/payload/src/fields/link.ts +139 -0
- package/templates/marketing/payload/src/fields/linkGroup.ts +28 -0
- package/templates/marketing/payload/src/heros/HighImpact/index.tsx +56 -0
- package/templates/marketing/payload/src/heros/LowImpact/index.tsx +48 -0
- package/templates/marketing/payload/src/heros/MediumImpact/index.tsx +50 -0
- package/templates/marketing/payload/src/heros/PostHero/index.tsx +73 -0
- package/templates/marketing/payload/src/heros/ProductShowcase/AnimatedMockup.tsx +241 -0
- package/templates/marketing/payload/src/heros/ProductShowcase/index.tsx +108 -0
- package/templates/marketing/payload/src/heros/{RenderHero.tsx.hbs → RenderHero.tsx} +9 -9
- package/templates/marketing/payload/src/heros/config.ts +121 -0
- package/templates/marketing/payload/src/hooks/populatePublishedAt.ts +15 -0
- package/templates/marketing/payload/src/hooks/{revalidateRedirects.ts.hbs → revalidateRedirects.ts} +3 -3
- package/templates/marketing/payload/src/lib/convex.ts +13 -0
- package/templates/marketing/payload/src/lib/docs-source.ts +138 -0
- package/templates/marketing/payload/src/lib/mdx.tsx +191 -0
- package/templates/marketing/payload/src/payload.config.ts.hbs +95 -145
- package/templates/marketing/payload/src/plugins/index.ts +107 -0
- package/templates/marketing/payload/src/providers/HeaderTheme/index.tsx +34 -0
- package/templates/marketing/payload/src/providers/PostHogProvider.tsx +33 -0
- package/templates/marketing/payload/src/providers/Theme/InitTheme/{index.tsx.hbs → index.tsx} +11 -10
- package/templates/marketing/payload/src/providers/Theme/ThemeSelector/index.tsx +133 -0
- package/templates/marketing/payload/src/providers/Theme/ThemeSelector/types.ts +7 -0
- package/templates/marketing/payload/src/providers/Theme/index.tsx +60 -0
- package/templates/marketing/payload/src/providers/Theme/shared.ts +17 -0
- package/templates/marketing/payload/src/providers/Theme/{types.ts.hbs → types.ts} +3 -3
- package/templates/marketing/payload/src/providers/index.tsx +17 -0
- package/templates/marketing/payload/src/search/Component.tsx +42 -0
- package/templates/marketing/payload/src/search/beforeSync.ts +56 -0
- package/templates/marketing/payload/src/search/fieldOverrides.ts +61 -0
- package/templates/marketing/payload/src/utilities/deepMerge.ts +35 -0
- package/templates/marketing/payload/src/utilities/extractHeadings.ts +78 -0
- package/templates/marketing/payload/src/utilities/formatAuthors.ts +24 -0
- package/templates/marketing/payload/src/utilities/formatDateTime.ts +20 -0
- package/templates/marketing/payload/src/utilities/generateMeta.ts +93 -0
- package/templates/marketing/payload/src/utilities/generatePreviewPath.ts +33 -0
- package/templates/marketing/payload/src/utilities/getDocument.ts +32 -0
- package/templates/marketing/payload/src/utilities/getGlobals.ts +26 -0
- package/templates/marketing/payload/src/utilities/getMeUser.ts +43 -0
- package/templates/marketing/payload/src/utilities/getMediaUrl.ts +24 -0
- package/templates/marketing/payload/src/utilities/getRedirects.ts +26 -0
- package/templates/marketing/payload/src/utilities/getURL.ts +26 -0
- package/templates/marketing/payload/src/utilities/mergeOpenGraph.ts +26 -0
- package/templates/marketing/payload/src/utilities/toKebabCase.ts +5 -0
- package/templates/marketing/payload/src/utilities/ui.ts +12 -0
- package/templates/marketing/payload/src/utilities/useClickableCard.ts +108 -0
- package/templates/marketing/payload/src/utilities/useDebounce.ts +17 -0
- package/templates/packages/ui/src/components/button.tsx.hbs +53 -0
- package/templates/packages/ui/src/components/card.tsx.hbs +76 -0
- package/templates/packages/ui/src/components/separator.tsx.hbs +26 -0
- package/templates/marketing/payload/src/Footer/config.ts.hbs +0 -178
- package/templates/marketing/payload/src/Footer/index.ts.hbs +0 -1
- package/templates/marketing/payload/src/Header/RowLabel.tsx.hbs +0 -21
- package/templates/marketing/payload/src/Header/config.ts.hbs +0 -208
- package/templates/marketing/payload/src/Header/index.ts.hbs +0 -1
- package/templates/marketing/payload/src/access/index.ts.hbs +0 -3
- package/templates/marketing/payload/src/app/(frontend)/layout.tsx.hbs +0 -19
- package/templates/marketing/payload/src/app/(frontend)/next/seed/route.ts.hbs +0 -31
- package/templates/marketing/payload/src/app/(frontend)/page.tsx.hbs +0 -83
- package/templates/marketing/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx.hbs +0 -24
- package/templates/marketing/payload/src/app/(payload)/admin/[[...segments]]/page.tsx.hbs +0 -24
- package/templates/marketing/payload/src/app/(payload)/admin/importMap.js.hbs +0 -1
- package/templates/marketing/payload/src/app/(payload)/custom.scss.hbs +0 -1
- package/templates/marketing/payload/src/app/(payload)/layout.tsx.hbs +0 -31
- package/templates/marketing/payload/src/app/globals.css.hbs +0 -83
- package/templates/marketing/payload/src/app/layout.tsx.hbs +0 -10
- package/templates/marketing/payload/src/blocks/Benefits.ts.hbs +0 -34
- package/templates/marketing/payload/src/blocks/CTA.ts.hbs +0 -39
- package/templates/marketing/payload/src/blocks/Content.ts.hbs +0 -9
- package/templates/marketing/payload/src/blocks/FAQ.ts.hbs +0 -18
- package/templates/marketing/payload/src/blocks/Features.ts.hbs +0 -34
- package/templates/marketing/payload/src/blocks/Hero.ts.hbs +0 -40
- package/templates/marketing/payload/src/blocks/LogoBanner.ts.hbs +0 -17
- package/templates/marketing/payload/src/blocks/Pricing.ts.hbs +0 -37
- package/templates/marketing/payload/src/blocks/Testimonials.ts.hbs +0 -21
- package/templates/marketing/payload/src/blocks/index.ts.hbs +0 -9
- package/templates/marketing/payload/src/collections/Categories/index.ts.hbs +0 -28
- package/templates/marketing/payload/src/collections/FAQs/index.ts.hbs +0 -100
- package/templates/marketing/payload/src/collections/Media.ts.hbs +0 -164
- package/templates/marketing/payload/src/collections/Pages/hooks/revalidatePage.ts.hbs +0 -43
- package/templates/marketing/payload/src/collections/Pages/index.ts.hbs +0 -142
- package/templates/marketing/payload/src/collections/Posts/hooks/populateAuthors.ts.hbs +0 -41
- package/templates/marketing/payload/src/collections/Posts/hooks/revalidatePost.ts.hbs +0 -44
- package/templates/marketing/payload/src/collections/Posts/index.ts.hbs +0 -244
- package/templates/marketing/payload/src/collections/Users/index.ts.hbs +0 -26
- package/templates/marketing/payload/src/collections/index.ts.hbs +0 -6
- package/templates/marketing/payload/src/components/BeforeDashboard/SeedButton/index.tsx.hbs +0 -89
- package/templates/marketing/payload/src/components/BeforeDashboard/index.tsx.hbs +0 -69
- package/templates/marketing/payload/src/components/BeforeLogin/index.tsx.hbs +0 -14
- package/templates/marketing/payload/src/components/Link/index.tsx.hbs +0 -79
- package/templates/marketing/payload/src/components/Media/index.tsx.hbs +0 -67
- package/templates/marketing/payload/src/components/RichText/index.tsx.hbs +0 -44
- package/templates/marketing/payload/src/endpoints/seed/home.ts.hbs +0 -76
- package/templates/marketing/payload/src/endpoints/seed/image-1.ts.hbs +0 -5
- package/templates/marketing/payload/src/endpoints/seed/image-2.ts.hbs +0 -5
- package/templates/marketing/payload/src/endpoints/seed/image-hero.ts.hbs +0 -5
- package/templates/marketing/payload/src/endpoints/seed/index.ts.hbs +0 -235
- package/templates/marketing/payload/src/endpoints/seed/post-1.ts.hbs +0 -252
- package/templates/marketing/payload/src/fields/defaultLexical.ts.hbs +0 -73
- package/templates/marketing/payload/src/fields/link.ts.hbs +0 -139
- package/templates/marketing/payload/src/fields/linkGroup.ts.hbs +0 -28
- package/templates/marketing/payload/src/globals/index.ts.hbs +0 -2
- package/templates/marketing/payload/src/heros/HighImpact/index.tsx.hbs +0 -53
- package/templates/marketing/payload/src/heros/LowImpact/index.tsx.hbs +0 -48
- package/templates/marketing/payload/src/heros/MediumImpact/index.tsx.hbs +0 -46
- package/templates/marketing/payload/src/heros/PostHero/index.tsx.hbs +0 -68
- package/templates/marketing/payload/src/heros/ProductShowcase/index.tsx.hbs +0 -88
- package/templates/marketing/payload/src/heros/config.ts.hbs +0 -112
- package/templates/marketing/payload/src/heros/index.ts.hbs +0 -7
- package/templates/marketing/payload/src/hooks/index.ts.hbs +0 -2
- package/templates/marketing/payload/src/hooks/populatePublishedAt.ts.hbs +0 -15
- package/templates/marketing/payload/src/providers/HeaderTheme/index.tsx.hbs +0 -34
- package/templates/marketing/payload/src/providers/Theme/index.tsx.hbs +0 -60
- package/templates/marketing/payload/src/providers/Theme/shared.ts.hbs +0 -17
- package/templates/marketing/payload/src/providers/index.tsx.hbs +0 -18
- package/templates/marketing/payload/src/utilities/deepMerge.ts.hbs +0 -35
- package/templates/marketing/payload/src/utilities/formatAuthors.ts.hbs +0 -24
- package/templates/marketing/payload/src/utilities/formatDateTime.ts.hbs +0 -13
- package/templates/marketing/payload/src/utilities/generateMeta.ts.hbs +0 -87
- package/templates/marketing/payload/src/utilities/generatePreviewPath.ts.hbs +0 -33
- package/templates/marketing/payload/src/utilities/getURL.ts.hbs +0 -26
- package/templates/marketing/payload/src/utilities/index.ts.hbs +0 -8
- package/templates/marketing/payload/src/utilities/mergeOpenGraph.ts.hbs +0 -26
- /package/templates/marketing/payload/src/access/{anyone.ts.hbs → anyone.ts} +0 -0
- /package/templates/marketing/payload/src/components/BeforeDashboard/SeedButton/{index.scss.hbs → index.scss} +0 -0
- /package/templates/marketing/payload/src/components/BeforeDashboard/{index.scss.hbs → index.scss} +0 -0
- /package/templates/marketing/payload/src/fields/{index.ts.hbs → index.ts} +0 -0
- /package/templates/marketing/payload/src/utilities/{canUseDOM.ts.hbs → canUseDOM.ts} +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { BannerBlock as BannerBlockProps } from "src/payload-types"
|
|
2
|
+
|
|
3
|
+
import RichText from "@/components/RichText"
|
|
4
|
+
import { cn } from "@/utilities/ui"
|
|
5
|
+
import type React from "react"
|
|
6
|
+
|
|
7
|
+
type Props = {
|
|
8
|
+
className?: string
|
|
9
|
+
} & BannerBlockProps
|
|
10
|
+
|
|
11
|
+
export const BannerBlock: React.FC<Props> = ({ className, content, style }) => {
|
|
12
|
+
return (
|
|
13
|
+
<div className={cn("mx-auto my-8 w-full", className)}>
|
|
14
|
+
<div
|
|
15
|
+
className={cn("border py-3 px-6 flex items-center rounded", {
|
|
16
|
+
"border-border bg-card": style === "info",
|
|
17
|
+
"border-error bg-error/30": style === "error",
|
|
18
|
+
"border-success bg-success/30": style === "success",
|
|
19
|
+
"border-warning bg-warning/30": style === "warning",
|
|
20
|
+
})}
|
|
21
|
+
>
|
|
22
|
+
<RichText data={content} enableGutter={false} enableProse={false} />
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { Block } from "payload"
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
AlignFeature,
|
|
5
|
+
BlockquoteFeature,
|
|
6
|
+
ChecklistFeature,
|
|
7
|
+
EXPERIMENTAL_TableFeature,
|
|
8
|
+
FixedToolbarFeature,
|
|
9
|
+
IndentFeature,
|
|
10
|
+
InlineCodeFeature,
|
|
11
|
+
InlineToolbarFeature,
|
|
12
|
+
OrderedListFeature,
|
|
13
|
+
RelationshipFeature,
|
|
14
|
+
StrikethroughFeature,
|
|
15
|
+
SubscriptFeature,
|
|
16
|
+
SuperscriptFeature,
|
|
17
|
+
UnorderedListFeature,
|
|
18
|
+
UploadFeature,
|
|
19
|
+
lexicalEditor,
|
|
20
|
+
} from "@payloadcms/richtext-lexical"
|
|
21
|
+
|
|
22
|
+
export const Banner: Block = {
|
|
23
|
+
slug: "banner",
|
|
24
|
+
fields: [
|
|
25
|
+
{
|
|
26
|
+
name: "style",
|
|
27
|
+
type: "select",
|
|
28
|
+
defaultValue: "info",
|
|
29
|
+
options: [
|
|
30
|
+
{ label: "Info", value: "info" },
|
|
31
|
+
{ label: "Warning", value: "warning" },
|
|
32
|
+
{ label: "Error", value: "error" },
|
|
33
|
+
{ label: "Success", value: "success" },
|
|
34
|
+
],
|
|
35
|
+
required: true,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "content",
|
|
39
|
+
type: "richText",
|
|
40
|
+
editor: lexicalEditor({
|
|
41
|
+
features: ({ rootFeatures }) => {
|
|
42
|
+
return [
|
|
43
|
+
...rootFeatures,
|
|
44
|
+
FixedToolbarFeature(),
|
|
45
|
+
InlineToolbarFeature(),
|
|
46
|
+
StrikethroughFeature(),
|
|
47
|
+
SubscriptFeature(),
|
|
48
|
+
SuperscriptFeature(),
|
|
49
|
+
InlineCodeFeature(),
|
|
50
|
+
BlockquoteFeature(),
|
|
51
|
+
UnorderedListFeature(),
|
|
52
|
+
OrderedListFeature(),
|
|
53
|
+
ChecklistFeature(),
|
|
54
|
+
AlignFeature(),
|
|
55
|
+
IndentFeature(),
|
|
56
|
+
RelationshipFeature(),
|
|
57
|
+
UploadFeature(),
|
|
58
|
+
EXPERIMENTAL_TableFeature(),
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
}),
|
|
62
|
+
label: false,
|
|
63
|
+
required: true,
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
interfaceName: "BannerBlock",
|
|
67
|
+
}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BarChart3,
|
|
3
|
+
Building,
|
|
4
|
+
Database,
|
|
5
|
+
DollarSign,
|
|
6
|
+
Globe,
|
|
7
|
+
Layers,
|
|
8
|
+
Layout,
|
|
9
|
+
type LucideIcon,
|
|
10
|
+
Rocket,
|
|
11
|
+
Search,
|
|
12
|
+
Settings,
|
|
13
|
+
Shield,
|
|
14
|
+
Star,
|
|
15
|
+
Target,
|
|
16
|
+
Users,
|
|
17
|
+
Zap,
|
|
18
|
+
} from "lucide-react"
|
|
19
|
+
import type React from "react"
|
|
20
|
+
|
|
21
|
+
import type { BentoFeaturesBlock as BentoFeaturesBlockProps } from "@/payload-types"
|
|
22
|
+
|
|
23
|
+
import { FeatureSectionTracker } from "@/components/Analytics"
|
|
24
|
+
import { Media } from "@/components/Media"
|
|
25
|
+
import RichText from "@/components/RichText"
|
|
26
|
+
import { cn } from "@/utilities/ui"
|
|
27
|
+
|
|
28
|
+
const iconMap: Record<string, LucideIcon> = {
|
|
29
|
+
rocket: Rocket,
|
|
30
|
+
zap: Zap,
|
|
31
|
+
building: Building,
|
|
32
|
+
target: Target,
|
|
33
|
+
layout: Layout,
|
|
34
|
+
star: Star,
|
|
35
|
+
dollarSign: DollarSign,
|
|
36
|
+
search: Search,
|
|
37
|
+
users: Users,
|
|
38
|
+
globe: Globe,
|
|
39
|
+
shield: Shield,
|
|
40
|
+
settings: Settings,
|
|
41
|
+
database: Database,
|
|
42
|
+
barChart: BarChart3,
|
|
43
|
+
layers: Layers,
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Creative grid positions for asymmetric bento layout (8 cards)
|
|
47
|
+
const gridPositions = [
|
|
48
|
+
"md:col-span-1 md:row-span-1", // Small card (top-left)
|
|
49
|
+
"md:col-span-1 md:row-span-1", // Small card (top-middle)
|
|
50
|
+
"md:col-span-1 md:row-span-1", // Small card (top-right)
|
|
51
|
+
"md:col-span-1 md:row-span-2", // Tall card (left side, rows 2-3)
|
|
52
|
+
"md:col-span-1 md:row-span-1", // Small card (row 2, middle)
|
|
53
|
+
"md:col-span-1 md:row-span-1", // Small card (row 2, right)
|
|
54
|
+
"md:col-span-1 md:row-span-1", // Small card (row 3, middle)
|
|
55
|
+
"md:col-span-1 md:row-span-1", // Small card (row 3, right)
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
const styleClasses: Record<string, { bg: string; text: string; icon: string; statText: string }> = {
|
|
59
|
+
default: {
|
|
60
|
+
bg: "bg-card border border-border/50 hover:border-border",
|
|
61
|
+
text: "text-foreground",
|
|
62
|
+
icon: "bg-primary/10 text-primary",
|
|
63
|
+
statText: "text-primary",
|
|
64
|
+
},
|
|
65
|
+
primary: {
|
|
66
|
+
bg: "bg-primary hover:bg-primary/95",
|
|
67
|
+
text: "text-primary-foreground",
|
|
68
|
+
icon: "bg-white/20 text-white",
|
|
69
|
+
statText: "text-white",
|
|
70
|
+
},
|
|
71
|
+
accent: {
|
|
72
|
+
bg: "bg-gradient-to-br from-teal-500 to-teal-600 hover:from-teal-500/95 hover:to-teal-600/95",
|
|
73
|
+
text: "text-white",
|
|
74
|
+
icon: "bg-white/20 text-white",
|
|
75
|
+
statText: "text-white",
|
|
76
|
+
},
|
|
77
|
+
gradient: {
|
|
78
|
+
bg: "bg-gradient-to-br from-primary via-primary/90 to-secondary hover:from-primary/95",
|
|
79
|
+
text: "text-white",
|
|
80
|
+
icon: "bg-white/20 text-white",
|
|
81
|
+
statText: "text-white",
|
|
82
|
+
},
|
|
83
|
+
warm: {
|
|
84
|
+
bg: "bg-gradient-to-br from-amber-400 via-orange-400 to-rose-400",
|
|
85
|
+
text: "text-white",
|
|
86
|
+
icon: "bg-white/20 text-white",
|
|
87
|
+
statText: "text-white",
|
|
88
|
+
},
|
|
89
|
+
cool: {
|
|
90
|
+
bg: "bg-gradient-to-br from-violet-500 via-purple-500 to-fuchsia-500",
|
|
91
|
+
text: "text-white",
|
|
92
|
+
icon: "bg-white/20 text-white",
|
|
93
|
+
statText: "text-white",
|
|
94
|
+
},
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export const BentoFeaturesBlock: React.FC<BentoFeaturesBlockProps> = ({
|
|
98
|
+
heading,
|
|
99
|
+
subheading,
|
|
100
|
+
features,
|
|
101
|
+
}) => {
|
|
102
|
+
if (!Array.isArray(features) || features.length === 0) {
|
|
103
|
+
return null
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return (
|
|
107
|
+
<FeatureSectionTracker featureName={heading || "bento-features"}>
|
|
108
|
+
<section className="py-16 md:py-24">
|
|
109
|
+
<div className="container">
|
|
110
|
+
{/* Header */}
|
|
111
|
+
{(heading || subheading) && (
|
|
112
|
+
<div className="text-center mb-12 md:mb-16 max-w-3xl mx-auto">
|
|
113
|
+
{heading && (
|
|
114
|
+
<h2 className="text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight mb-6">
|
|
115
|
+
{heading}
|
|
116
|
+
</h2>
|
|
117
|
+
)}
|
|
118
|
+
{subheading && (
|
|
119
|
+
<p className="text-xl md:text-2xl text-muted-foreground">{subheading}</p>
|
|
120
|
+
)}
|
|
121
|
+
</div>
|
|
122
|
+
)}
|
|
123
|
+
|
|
124
|
+
{/* Creative Bento Grid */}
|
|
125
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-5 md:grid-rows-[repeat(3,minmax(140px,160px))]">
|
|
126
|
+
{features.map((feature, index) => {
|
|
127
|
+
const style = feature.style || "default"
|
|
128
|
+
const iconKey = feature.icon
|
|
129
|
+
const Icon =
|
|
130
|
+
iconKey && iconKey !== "none" && iconKey in iconMap
|
|
131
|
+
? iconMap[iconKey as keyof typeof iconMap]
|
|
132
|
+
: null
|
|
133
|
+
const styleConfig = styleClasses[style] || styleClasses.default
|
|
134
|
+
const gridPosition = gridPositions[index] || "md:col-span-1 md:row-span-1"
|
|
135
|
+
const isLarge =
|
|
136
|
+
gridPosition.includes("col-span-2") && gridPosition.includes("row-span-2")
|
|
137
|
+
const featureKey = feature.id || feature.title || `bento-feature-${index}`
|
|
138
|
+
|
|
139
|
+
return (
|
|
140
|
+
<div
|
|
141
|
+
key={featureKey}
|
|
142
|
+
className={cn(
|
|
143
|
+
"relative rounded-2xl overflow-hidden p-5 md:p-6 flex flex-col transition-all duration-300 group",
|
|
144
|
+
"hover:shadow-lg hover:-translate-y-0.5",
|
|
145
|
+
"col-span-1 row-span-1",
|
|
146
|
+
gridPosition,
|
|
147
|
+
styleConfig.bg,
|
|
148
|
+
)}
|
|
149
|
+
>
|
|
150
|
+
{/* Background Image */}
|
|
151
|
+
{feature.image && typeof feature.image === "object" && (
|
|
152
|
+
<>
|
|
153
|
+
<div className="absolute inset-0">
|
|
154
|
+
<Media
|
|
155
|
+
resource={feature.image}
|
|
156
|
+
imgClassName="w-full h-full object-cover"
|
|
157
|
+
fill
|
|
158
|
+
size="(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw"
|
|
159
|
+
/>
|
|
160
|
+
</div>
|
|
161
|
+
<div className="absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent" />
|
|
162
|
+
</>
|
|
163
|
+
)}
|
|
164
|
+
|
|
165
|
+
{/* Decorative elements for visual interest */}
|
|
166
|
+
{!feature.image && isLarge && (
|
|
167
|
+
<div className="absolute -right-6 -bottom-6 w-24 h-24 md:w-32 md:h-32 rounded-full bg-white/10 blur-xl" />
|
|
168
|
+
)}
|
|
169
|
+
|
|
170
|
+
{/* Content */}
|
|
171
|
+
<div
|
|
172
|
+
className={cn(
|
|
173
|
+
"relative z-10 flex flex-col h-full",
|
|
174
|
+
feature.image && "text-white",
|
|
175
|
+
)}
|
|
176
|
+
>
|
|
177
|
+
{/* Icon */}
|
|
178
|
+
{Icon && (
|
|
179
|
+
<div
|
|
180
|
+
className={cn(
|
|
181
|
+
"w-10 h-10 md:w-11 md:h-11 rounded-xl flex items-center justify-center mb-auto",
|
|
182
|
+
feature.image ? "bg-white/20 backdrop-blur-sm" : styleConfig.icon,
|
|
183
|
+
)}
|
|
184
|
+
>
|
|
185
|
+
<Icon className={cn("w-5 h-5 md:w-5 md:h-5", isLarge && "md:w-6 md:h-6")} />
|
|
186
|
+
</div>
|
|
187
|
+
)}
|
|
188
|
+
|
|
189
|
+
{/* Spacer for better vertical distribution */}
|
|
190
|
+
<div className="flex-1 min-h-2" />
|
|
191
|
+
|
|
192
|
+
{/* Stat - only show on larger cards or when explicitly set */}
|
|
193
|
+
{feature.stat && (
|
|
194
|
+
<div
|
|
195
|
+
className={cn(
|
|
196
|
+
"font-bold mb-0.5 leading-none",
|
|
197
|
+
isLarge ? "text-5xl md:text-6xl" : "text-3xl md:text-4xl",
|
|
198
|
+
feature.image ? "text-white" : styleConfig.statText,
|
|
199
|
+
)}
|
|
200
|
+
>
|
|
201
|
+
{feature.stat}
|
|
202
|
+
</div>
|
|
203
|
+
)}
|
|
204
|
+
|
|
205
|
+
{/* Title */}
|
|
206
|
+
{feature.title && (
|
|
207
|
+
<h3
|
|
208
|
+
className={cn(
|
|
209
|
+
"font-semibold mb-1",
|
|
210
|
+
isLarge ? "text-lg md:text-xl" : "text-base md:text-lg",
|
|
211
|
+
feature.image ? "text-white" : styleConfig.text,
|
|
212
|
+
)}
|
|
213
|
+
>
|
|
214
|
+
{feature.title}
|
|
215
|
+
</h3>
|
|
216
|
+
)}
|
|
217
|
+
|
|
218
|
+
{/* Description */}
|
|
219
|
+
{feature.description && (
|
|
220
|
+
<div
|
|
221
|
+
className={cn(
|
|
222
|
+
"leading-snug",
|
|
223
|
+
isLarge ? "text-sm md:text-base" : "text-xs md:text-sm",
|
|
224
|
+
feature.image
|
|
225
|
+
? "text-white/80"
|
|
226
|
+
: style === "default"
|
|
227
|
+
? "text-muted-foreground"
|
|
228
|
+
: "text-white/80",
|
|
229
|
+
)}
|
|
230
|
+
>
|
|
231
|
+
<RichText data={feature.description} enableGutter={false} />
|
|
232
|
+
</div>
|
|
233
|
+
)}
|
|
234
|
+
</div>
|
|
235
|
+
</div>
|
|
236
|
+
)
|
|
237
|
+
})}
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
240
|
+
</section>
|
|
241
|
+
</FeatureSectionTracker>
|
|
242
|
+
)
|
|
243
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { Block } from "payload"
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
AlignFeature,
|
|
5
|
+
BlockquoteFeature,
|
|
6
|
+
ChecklistFeature,
|
|
7
|
+
EXPERIMENTAL_TableFeature,
|
|
8
|
+
FixedToolbarFeature,
|
|
9
|
+
IndentFeature,
|
|
10
|
+
InlineCodeFeature,
|
|
11
|
+
InlineToolbarFeature,
|
|
12
|
+
OrderedListFeature,
|
|
13
|
+
RelationshipFeature,
|
|
14
|
+
StrikethroughFeature,
|
|
15
|
+
SubscriptFeature,
|
|
16
|
+
SuperscriptFeature,
|
|
17
|
+
UnorderedListFeature,
|
|
18
|
+
UploadFeature,
|
|
19
|
+
lexicalEditor,
|
|
20
|
+
} from "@payloadcms/richtext-lexical"
|
|
21
|
+
|
|
22
|
+
export const BentoFeatures: Block = {
|
|
23
|
+
slug: "bentoFeatures",
|
|
24
|
+
interfaceName: "BentoFeaturesBlock",
|
|
25
|
+
fields: [
|
|
26
|
+
{
|
|
27
|
+
name: "heading",
|
|
28
|
+
type: "text",
|
|
29
|
+
label: "Section Heading",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "subheading",
|
|
33
|
+
type: "textarea",
|
|
34
|
+
label: "Section Subheading",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "features",
|
|
38
|
+
type: "array",
|
|
39
|
+
label: "Bento Features",
|
|
40
|
+
minRows: 1,
|
|
41
|
+
maxRows: 8,
|
|
42
|
+
fields: [
|
|
43
|
+
{
|
|
44
|
+
name: "size",
|
|
45
|
+
type: "select",
|
|
46
|
+
defaultValue: "small",
|
|
47
|
+
options: [
|
|
48
|
+
{ label: "Small (1x1)", value: "small" },
|
|
49
|
+
{ label: "Medium (2x1)", value: "medium" },
|
|
50
|
+
{ label: "Large (2x2)", value: "large" },
|
|
51
|
+
{ label: "Tall (1x2)", value: "tall" },
|
|
52
|
+
],
|
|
53
|
+
admin: {
|
|
54
|
+
description: "Card size in the bento grid",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "style",
|
|
59
|
+
type: "select",
|
|
60
|
+
defaultValue: "default",
|
|
61
|
+
options: [
|
|
62
|
+
{ label: "Default (Light)", value: "default" },
|
|
63
|
+
{ label: "Primary (Navy)", value: "primary" },
|
|
64
|
+
{ label: "Accent (Teal)", value: "accent" },
|
|
65
|
+
{ label: "Gradient", value: "gradient" },
|
|
66
|
+
{ label: "Warm (Orange/Rose)", value: "warm" },
|
|
67
|
+
{ label: "Cool (Purple)", value: "cool" },
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "icon",
|
|
72
|
+
type: "select",
|
|
73
|
+
options: [
|
|
74
|
+
{ label: "None", value: "none" },
|
|
75
|
+
{ label: "Rocket", value: "rocket" },
|
|
76
|
+
{ label: "Zap", value: "zap" },
|
|
77
|
+
{ label: "Building", value: "building" },
|
|
78
|
+
{ label: "Target", value: "target" },
|
|
79
|
+
{ label: "Layout", value: "layout" },
|
|
80
|
+
{ label: "Star", value: "star" },
|
|
81
|
+
{ label: "DollarSign", value: "dollarSign" },
|
|
82
|
+
{ label: "Search", value: "search" },
|
|
83
|
+
{ label: "Users", value: "users" },
|
|
84
|
+
{ label: "Globe", value: "globe" },
|
|
85
|
+
{ label: "Shield", value: "shield" },
|
|
86
|
+
{ label: "Settings", value: "settings" },
|
|
87
|
+
{ label: "Database", value: "database" },
|
|
88
|
+
{ label: "BarChart", value: "barChart" },
|
|
89
|
+
{ label: "Layers", value: "layers" },
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "stat",
|
|
94
|
+
type: "text",
|
|
95
|
+
label: "Stat/Number",
|
|
96
|
+
admin: {
|
|
97
|
+
description: 'Optional large stat to display (e.g., "5x", "99.9%")',
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: "title",
|
|
102
|
+
type: "text",
|
|
103
|
+
required: true,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "description",
|
|
107
|
+
type: "richText",
|
|
108
|
+
editor: lexicalEditor({
|
|
109
|
+
features: ({ rootFeatures }) => {
|
|
110
|
+
return [
|
|
111
|
+
...rootFeatures,
|
|
112
|
+
FixedToolbarFeature(),
|
|
113
|
+
InlineToolbarFeature(),
|
|
114
|
+
StrikethroughFeature(),
|
|
115
|
+
SubscriptFeature(),
|
|
116
|
+
SuperscriptFeature(),
|
|
117
|
+
InlineCodeFeature(),
|
|
118
|
+
BlockquoteFeature(),
|
|
119
|
+
UnorderedListFeature(),
|
|
120
|
+
OrderedListFeature(),
|
|
121
|
+
ChecklistFeature(),
|
|
122
|
+
AlignFeature(),
|
|
123
|
+
IndentFeature(),
|
|
124
|
+
RelationshipFeature(),
|
|
125
|
+
UploadFeature(),
|
|
126
|
+
EXPERIMENTAL_TableFeature(),
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
}),
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: "image",
|
|
133
|
+
type: "upload",
|
|
134
|
+
relationTo: "media",
|
|
135
|
+
label: "Background Image",
|
|
136
|
+
admin: {
|
|
137
|
+
description: "Optional background image for the card",
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
labels: {
|
|
144
|
+
plural: "Bento Features",
|
|
145
|
+
singular: "Bento Features",
|
|
146
|
+
},
|
|
147
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import type React from "react"
|
|
4
|
+
|
|
5
|
+
import type { CallToActionBlock as CTABlockProps } from "@/payload-types"
|
|
6
|
+
|
|
7
|
+
import { CTATracker } from "@/components/Analytics"
|
|
8
|
+
import { CMSLink } from "@/components/Link"
|
|
9
|
+
import RichText from "@/components/RichText"
|
|
10
|
+
|
|
11
|
+
export const CallToActionBlock: React.FC<CTABlockProps> = ({ links, richText }) => {
|
|
12
|
+
return (
|
|
13
|
+
<div className="container">
|
|
14
|
+
<div className="bg-card rounded border-border border p-4 flex flex-col gap-8 md:flex-row md:justify-between md:items-center">
|
|
15
|
+
<div className="max-w-[48rem] flex items-center">
|
|
16
|
+
{richText && <RichText className="mb-0" data={richText} enableGutter={false} />}
|
|
17
|
+
</div>
|
|
18
|
+
<div className="flex flex-col gap-8">
|
|
19
|
+
{(links || []).map(({ link }, i) => {
|
|
20
|
+
return (
|
|
21
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: CMS links don't have stable IDs
|
|
22
|
+
<CTATracker key={i} location="cta_block" variant={link?.label || `cta_${i}`}>
|
|
23
|
+
<CMSLink size="lg" {...link} />
|
|
24
|
+
</CTATracker>
|
|
25
|
+
)
|
|
26
|
+
})}
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Block } from "payload"
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
AlignFeature,
|
|
5
|
+
BlockquoteFeature,
|
|
6
|
+
ChecklistFeature,
|
|
7
|
+
EXPERIMENTAL_TableFeature,
|
|
8
|
+
FixedToolbarFeature,
|
|
9
|
+
HeadingFeature,
|
|
10
|
+
IndentFeature,
|
|
11
|
+
InlineCodeFeature,
|
|
12
|
+
InlineToolbarFeature,
|
|
13
|
+
OrderedListFeature,
|
|
14
|
+
RelationshipFeature,
|
|
15
|
+
StrikethroughFeature,
|
|
16
|
+
SubscriptFeature,
|
|
17
|
+
SuperscriptFeature,
|
|
18
|
+
UnorderedListFeature,
|
|
19
|
+
UploadFeature,
|
|
20
|
+
lexicalEditor,
|
|
21
|
+
} from "@payloadcms/richtext-lexical"
|
|
22
|
+
|
|
23
|
+
import { linkGroup } from "../../fields/linkGroup"
|
|
24
|
+
|
|
25
|
+
export const CallToAction: Block = {
|
|
26
|
+
slug: "cta",
|
|
27
|
+
interfaceName: "CallToActionBlock",
|
|
28
|
+
fields: [
|
|
29
|
+
{
|
|
30
|
+
name: "richText",
|
|
31
|
+
type: "richText",
|
|
32
|
+
editor: lexicalEditor({
|
|
33
|
+
features: ({ rootFeatures }) => {
|
|
34
|
+
return [
|
|
35
|
+
...rootFeatures,
|
|
36
|
+
HeadingFeature({ enabledHeadingSizes: ["h1", "h2", "h3", "h4"] }),
|
|
37
|
+
FixedToolbarFeature(),
|
|
38
|
+
InlineToolbarFeature(),
|
|
39
|
+
StrikethroughFeature(),
|
|
40
|
+
SubscriptFeature(),
|
|
41
|
+
SuperscriptFeature(),
|
|
42
|
+
InlineCodeFeature(),
|
|
43
|
+
BlockquoteFeature(),
|
|
44
|
+
UnorderedListFeature(),
|
|
45
|
+
OrderedListFeature(),
|
|
46
|
+
ChecklistFeature(),
|
|
47
|
+
AlignFeature(),
|
|
48
|
+
IndentFeature(),
|
|
49
|
+
RelationshipFeature(),
|
|
50
|
+
UploadFeature(),
|
|
51
|
+
EXPERIMENTAL_TableFeature(),
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
}),
|
|
55
|
+
label: false,
|
|
56
|
+
},
|
|
57
|
+
linkGroup({
|
|
58
|
+
appearances: ["default", "outline"],
|
|
59
|
+
overrides: {
|
|
60
|
+
maxRows: 2,
|
|
61
|
+
},
|
|
62
|
+
}),
|
|
63
|
+
],
|
|
64
|
+
labels: {
|
|
65
|
+
plural: "Calls to Action",
|
|
66
|
+
singular: "Call to Action",
|
|
67
|
+
},
|
|
68
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { Highlight, themes } from "prism-react-renderer"
|
|
3
|
+
import type React from "react"
|
|
4
|
+
import { CopyButton } from "./CopyButton"
|
|
5
|
+
|
|
6
|
+
type Props = {
|
|
7
|
+
code: string
|
|
8
|
+
language?: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const Code: React.FC<Props> = ({ code, language = "" }) => {
|
|
12
|
+
if (!code) return null
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<Highlight code={code} language={language} theme={themes.vsDark}>
|
|
16
|
+
{({ getLineProps, getTokenProps, tokens }) => (
|
|
17
|
+
<pre className="bg-black p-4 border text-xs border-border rounded overflow-x-auto">
|
|
18
|
+
{tokens.map((line, i) => (
|
|
19
|
+
<div key={i} {...getLineProps({ className: "table-row", line })}>
|
|
20
|
+
<span className="table-cell select-none text-right text-white/25">{i + 1}</span>
|
|
21
|
+
<span className="table-cell pl-4">
|
|
22
|
+
{line.map((token, key) => (
|
|
23
|
+
<span key={key} {...getTokenProps({ token })} />
|
|
24
|
+
))}
|
|
25
|
+
</span>
|
|
26
|
+
</div>
|
|
27
|
+
))}
|
|
28
|
+
<CopyButton code={code} />
|
|
29
|
+
</pre>
|
|
30
|
+
)}
|
|
31
|
+
</Highlight>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type React from "react"
|
|
2
|
+
|
|
3
|
+
import { Code } from "./Component.client"
|
|
4
|
+
|
|
5
|
+
export type CodeBlockProps = {
|
|
6
|
+
code: string
|
|
7
|
+
language?: string
|
|
8
|
+
blockType: "code"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type Props = CodeBlockProps & {
|
|
12
|
+
className?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const CodeBlock: React.FC<Props> = ({ className, code, language }) => {
|
|
16
|
+
return (
|
|
17
|
+
<div className={[className, "not-prose"].filter(Boolean).join(" ")}>
|
|
18
|
+
<Code code={code} language={language} />
|
|
19
|
+
</div>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { Button } from "@/components/ui/button"
|
|
3
|
+
import { CopyIcon } from "@payloadcms/ui/icons/Copy"
|
|
4
|
+
import { useState } from "react"
|
|
5
|
+
|
|
6
|
+
export function CopyButton({ code }: { code: string }) {
|
|
7
|
+
const [text, setText] = useState("Copy")
|
|
8
|
+
|
|
9
|
+
function updateCopyStatus() {
|
|
10
|
+
if (text === "Copy") {
|
|
11
|
+
setText(() => "Copied!")
|
|
12
|
+
setTimeout(() => {
|
|
13
|
+
setText(() => "Copy")
|
|
14
|
+
}, 1000)
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<div className="flex justify-end align-middle">
|
|
20
|
+
<Button
|
|
21
|
+
className="flex gap-1"
|
|
22
|
+
variant={"secondary"}
|
|
23
|
+
onClick={async () => {
|
|
24
|
+
await navigator.clipboard.writeText(code)
|
|
25
|
+
updateCopyStatus()
|
|
26
|
+
}}
|
|
27
|
+
>
|
|
28
|
+
<p>{text}</p>
|
|
29
|
+
<CopyIcon />
|
|
30
|
+
</Button>
|
|
31
|
+
</div>
|
|
32
|
+
)
|
|
33
|
+
}
|