confirm build
This commit is contained in:
@@ -90,10 +90,9 @@ export const SlateButton = React.forwardRef<
|
||||
(React.isValidElement(Icon) ? (
|
||||
Icon
|
||||
) : (
|
||||
//@ts-ignore
|
||||
//@ts-expect-error - Icon component type allows JSX element
|
||||
<Icon
|
||||
className={cn(iconSizes[size], "flex-shrink-0")}
|
||||
// @ts-ignore - Some icons support isHovered and isOpen
|
||||
isHovered={isHovered}
|
||||
isOpen={isOpen}
|
||||
/>
|
||||
@@ -104,10 +103,9 @@ export const SlateButton = React.forwardRef<
|
||||
(React.isValidElement(Icon) ? (
|
||||
Icon
|
||||
) : (
|
||||
//@ts-ignore
|
||||
//@ts-expect-error - Icon component type allows JSX element
|
||||
<Icon
|
||||
className={cn(iconSizes[size], "flex-shrink-0")}
|
||||
// @ts-ignore - Some icons support isHovered and isOpen
|
||||
isHovered={isHovered}
|
||||
isOpen={isOpen}
|
||||
/>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// @ts-nocheck
|
||||
"use client";
|
||||
|
||||
import { AnimatePresence, cubicBezier, motion } from "motion/react";
|
||||
|
||||
@@ -70,7 +70,7 @@ interface HeroFlameProps {
|
||||
|
||||
export function HeroFlame({ className, size = "medium" }: HeroFlameProps) {
|
||||
const [frameIndex, setFrameIndex] = useState(0);
|
||||
const intervalRef = useRef<NodeJS.Timeout>();
|
||||
const intervalRef = useRef<NodeJS.Timeout | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
intervalRef.current = setInterval(() => {
|
||||
|
||||
@@ -39,7 +39,7 @@ const pathVariants: Variants = {
|
||||
|
||||
// Higher-order component for icon animation
|
||||
const withIconAnimation = (IconComponent: React.ComponentType<any>) => {
|
||||
return ({
|
||||
const AnimatedIcon = ({
|
||||
isHovered = false,
|
||||
className,
|
||||
...props
|
||||
@@ -63,11 +63,13 @@ const withIconAnimation = (IconComponent: React.ComponentType<any>) => {
|
||||
</div>
|
||||
);
|
||||
};
|
||||
AnimatedIcon.displayName = `Animated${IconComponent.displayName || IconComponent.name || 'Icon'}`;
|
||||
return AnimatedIcon;
|
||||
};
|
||||
|
||||
// Higher-order component for icon animation
|
||||
const withChartIconAnimation = (IconComponent: React.ComponentType<any>) => {
|
||||
return ({
|
||||
const AnimatedChartIcon = ({
|
||||
isHovered = false,
|
||||
className,
|
||||
...props
|
||||
@@ -113,6 +115,8 @@ const withChartIconAnimation = (IconComponent: React.ComponentType<any>) => {
|
||||
</div>
|
||||
);
|
||||
};
|
||||
AnimatedChartIcon.displayName = `AnimatedChart${IconComponent.displayName || IconComponent.name || 'Icon'}`;
|
||||
return AnimatedChartIcon;
|
||||
};
|
||||
|
||||
// Base icon components
|
||||
|
||||
@@ -14,10 +14,10 @@ export default function LivePreviewFrame({
|
||||
const imgRef = useRef<HTMLImageElement>(null);
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
const wsRef = useRef<WebSocket | null>(null);
|
||||
const reconnectTimeoutRef = useRef<NodeJS.Timeout>();
|
||||
const reconnectTimeoutRef = useRef<NodeJS.Timeout | null>(null);
|
||||
const initialPositionSetRef = useRef(false);
|
||||
const idleStartTimerRef = useRef<NodeJS.Timeout>();
|
||||
const idleMoveTimerRef = useRef<NodeJS.Timeout>();
|
||||
const idleStartTimerRef = useRef<NodeJS.Timeout | null>(null);
|
||||
const idleMoveTimerRef = useRef<NodeJS.Timeout | null>(null);
|
||||
const [imageLoaded, setImageLoaded] = useState(false);
|
||||
const [isConnecting, setIsConnecting] = useState(true);
|
||||
const [cursorPosition, setCursorPosition] = useState<{
|
||||
@@ -83,7 +83,7 @@ export default function LivePreviewFrame({
|
||||
// Only start the idle timer if not already idle and no timer is running
|
||||
idleStartTimerRef.current = setTimeout(() => {
|
||||
setIsIdle(true);
|
||||
idleStartTimerRef.current = undefined; // Clear ref after timer runs
|
||||
idleStartTimerRef.current = null; // Clear ref after timer runs
|
||||
}, 5000);
|
||||
}
|
||||
if (animationFrameId) {
|
||||
@@ -96,7 +96,7 @@ export default function LivePreviewFrame({
|
||||
// If we were waiting to go idle, cancel it because we're moving again
|
||||
if (idleStartTimerRef.current) {
|
||||
clearTimeout(idleStartTimerRef.current);
|
||||
idleStartTimerRef.current = undefined;
|
||||
idleStartTimerRef.current = null;
|
||||
}
|
||||
// Ensure idle state is false if we are moving significantly
|
||||
if (isIdle) setIsIdle(false);
|
||||
@@ -127,7 +127,7 @@ export default function LivePreviewFrame({
|
||||
const cleanupConnection = () => {
|
||||
if (reconnectTimeoutRef.current) {
|
||||
clearTimeout(reconnectTimeoutRef.current);
|
||||
reconnectTimeoutRef.current = undefined;
|
||||
reconnectTimeoutRef.current = null;
|
||||
}
|
||||
if (wsRef.current) {
|
||||
wsRef.current.close();
|
||||
@@ -171,7 +171,7 @@ export default function LivePreviewFrame({
|
||||
// Clear any pending reconnection attempts
|
||||
if (reconnectTimeoutRef.current) {
|
||||
clearTimeout(reconnectTimeoutRef.current);
|
||||
reconnectTimeoutRef.current = undefined;
|
||||
reconnectTimeoutRef.current = null;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -197,7 +197,7 @@ export default function LivePreviewFrame({
|
||||
// --- Interrupt Idle State ---
|
||||
if (idleStartTimerRef.current) {
|
||||
clearTimeout(idleStartTimerRef.current);
|
||||
idleStartTimerRef.current = undefined;
|
||||
idleStartTimerRef.current = null;
|
||||
}
|
||||
if (isIdle) {
|
||||
setIsIdle(false);
|
||||
|
||||
Reference in New Issue
Block a user