create-vexcms 0.1.0-alpha.2 → 0.1.0-alpha.3

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.
@@ -2,34 +2,15 @@
2
2
 
3
3
  import type { BlockComponentProps } from "@vexcms/react"
4
4
 
5
+ import { buttonVariants, cn } from "@vexcms/react"
5
6
  import { ArrowRight } from "lucide-react"
6
7
  import Link from "next/link"
7
- import { buttonVariants, cn } from "@vexcms/react"
8
8
 
9
- import { AnimatedGroup } from "~/components/motion-primitives/animated-group"
9
+ import { AnimatedGroup, AnimatedItem } from "~/components/motion-primitives/animated-group"
10
10
  import { TextEffect } from "~/components/motion-primitives/text-effect"
11
11
 
12
12
  export { heroBlock } from "./config"
13
13
 
14
- const transitionVariants = {
15
- item: {
16
- hidden: {
17
- filter: "blur(12px)",
18
- opacity: 0,
19
- y: 12,
20
- },
21
- visible: {
22
- filter: "blur(0px)",
23
- opacity: 1,
24
- transition: {
25
- type: "spring",
26
- bounce: 0.3,
27
- duration: 1.5,
28
- },
29
- y: 0,
30
- },
31
- },
32
- }
33
14
 
34
15
  export default function HeroBlock({ block }: BlockComponentProps) {
35
16
  const {
@@ -59,10 +40,7 @@ export default function HeroBlock({ block }: BlockComponentProps) {
59
40
  <div className="mx-auto max-w-7xl px-6">
60
41
  <div className="text-center sm:mx-auto lg:mr-auto">
61
42
  {badgeText && badgeLink && (
62
- <AnimatedGroup
63
- // @ts-expect-error motion-primitives Variants type is stricter than the local transitionVariants shape
64
- variants={transitionVariants}
65
- >
43
+ <AnimatedItem>
66
44
  <Link
67
45
  className="hover:bg-background dark:hover:border-t-border bg-muted group mx-auto flex w-fit items-center gap-4 rounded-full border p-1 pl-4 shadow-md shadow-zinc-950/5 transition-colors duration-300 dark:border-t-white/5 dark:shadow-zinc-950"
68
46
  href={badgeLink}
@@ -80,14 +58,12 @@ export default function HeroBlock({ block }: BlockComponentProps) {
80
58
  </div>
81
59
  </div>
82
60
  </Link>
83
- </AnimatedGroup>
61
+ </AnimatedItem>
84
62
  )}
85
63
 
86
64
  <TextEffect
87
65
  as="h1"
88
66
  className="mt-8 text-6xl text-balance md:text-7xl lg:mt-16 xl:text-[5.25rem]"
89
- preset="fade-in-blur"
90
- speedSegment={0.3}
91
67
  >
92
68
  {heading ?? ""}
93
69
  </TextEffect>
@@ -96,39 +72,29 @@ export default function HeroBlock({ block }: BlockComponentProps) {
96
72
  className="mx-auto mt-8 max-w-2xl text-lg text-balance text-muted-foreground"
97
73
  delay={0.5}
98
74
  per="line"
99
- preset="fade-in-blur"
100
- speedSegment={0.3}
101
75
  >
102
76
  {subheading ?? ""}
103
77
  </TextEffect>
104
78
 
105
79
  <AnimatedGroup
106
80
  className="mt-12 flex flex-col items-center justify-center gap-2 md:flex-row"
107
- // @ts-expect-error motion-primitives Variants type is stricter than the local transitionVariants shape
108
- variants={{
109
- container: {
110
- visible: {
111
- transition: {
112
- delayChildren: 0.75,
113
- staggerChildren: 0.05,
114
- },
115
- },
116
- },
117
- ...transitionVariants,
118
- }}
81
+ delay={0.75}
119
82
  >
120
83
  <div className="bg-foreground/10 rounded-[calc(var(--radius-xl)+0.125rem)] border p-0.5">
121
84
  <Link
122
- href={primaryCtaHref ?? "/"}
123
85
  className={cn(buttonVariants({ size: "lg" }), "rounded-xl px-5 text-base")}
86
+ href={primaryCtaHref ?? "/"}
124
87
  >
125
88
  <span className="text-nowrap">{primaryCtaLabel}</span>
126
89
  </Link>
127
90
  </div>
128
91
  {secondaryCtaLabel && (
129
92
  <Link
93
+ className={cn(
94
+ buttonVariants({ variant: "ghost", size: "lg" }),
95
+ "h-10.5 rounded-xl px-5"
96
+ )}
130
97
  href={secondaryCtaHref ?? "/"}
131
- className={cn(buttonVariants({ variant: "ghost", size: "lg" }), "h-10.5 rounded-xl px-5")}
132
98
  >
133
99
  <span className="text-nowrap">{secondaryCtaLabel}</span>
134
100
  </Link>