"use client"; import type { MotionValue } from "motion/react"; import { motion, useScroll, useTransform } from "motion/react"; import type { ComponentPropsWithoutRef, FC, ReactNode } from "react"; import React from "react"; import { useRef } from "react"; import { cn } from "@/lib/utils"; const REVEAL_TEXT = "گزارش سفارشی را بدون SQL بسازید و سریع منتشر کنید."; const Feature247 = () => { return ( {REVEAL_TEXT} ); }; export { Feature247 }; interface TextRevealProps extends ComponentPropsWithoutRef<"div"> { children: string; title?: string; maxWidth?: string; } const TextReveal: FC = ({ children, title, className, maxWidth, }) => { const targetRef = useRef(null); const { scrollYProgress } = useScroll({ target: targetRef, }); const words = children.split(" "); return ( {title} {words.map((word, i) => { const start = i / words.length; const end = start + 1 / words.length; return ( {word} ); })} ); }; interface WordProps { children: ReactNode; progress: MotionValue; range: [number, number]; } const Word: FC = ({ children, progress, range }) => { const opacity = useTransform(progress, range, [0, 1]); return ( {children} {children} ); };