'use client'; /** * Lazy-loaded LottiePlayer Component * * Lottie library (~200KB) is loaded only when component is rendered. * Use this for automatic code-splitting with Suspense fallback. * * For direct imports without lazy loading, use: * import { LottiePlayer } from '@djangocfg/ui-tools/lottie' */ import { createLazyComponent } from '../../../common'; import type { LottiePlayerProps } from './types'; // ============================================================================ // Re-export types // ============================================================================ export type { LottiePlayerProps, LottieSize, LottieSpeed, LottieDirection, LottieSegment, } from './types'; // ============================================================================ // Lottie Loading Fallback // ============================================================================ function LottieLoadingFallback() { return (
); } // ============================================================================ // Lazy Component // ============================================================================ /** * LazyLottiePlayer - Lazy-loaded Lottie animation player * * Automatically shows loading state while Lottie loads (~200KB) */ export const LazyLottiePlayer = createLazyComponent( () => import('./LottiePlayer.client').then((mod) => ({ default: mod.LottiePlayer })), { displayName: 'LazyLottiePlayer', fallback: , } );