UNPKG

vlibras-player-webjs

Version:

Biblioteca JavaScript moderna para integração do VLibras Player com React, Vue, Angular e vanilla JS

92 lines 2.91 kB
/** * @file Utilitários específicos para NextJS * @description Componentes e hooks otimizados para NextJS */ import React, { ComponentType } from 'react'; import { SSRSafeVLibrasProviderProps } from './SSRSafeProvider'; /** * Configurações específicas para NextJS */ export interface NextJSVLibrasConfig extends Omit<SSRSafeVLibrasProviderProps, 'children'> { /** Caminho para os assets do VLibras no diretório public/ */ publicAssetsPath?: string; /** Se deve usar importação dinâmica */ useDynamicImport?: boolean; /** Loading component para importação dinâmica */ loadingComponent?: React.ComponentType; /** Se deve desabilitar SSR completamente */ ssr?: boolean; } /** * Provider VLibras otimizado para NextJS * Automaticamente configura caminhos e comportamentos específicos do NextJS */ export declare const NextJSVLibrasProvider: ({ publicAssetsPath, children, config, ...props }: NextJSVLibrasConfig & { children: React.ReactNode; }) => import("react/jsx-runtime").JSX.Element; /** * Hook para criar componentes VLibras dinâmicos no NextJS */ export declare function useNextJSDynamicVLibras<P extends object>(componentImport: () => Promise<{ default: ComponentType<P>; }>, options?: { loading?: ComponentType; ssr?: boolean; }): any; /** * Cria uma versão dinâmica de um componente VLibras para NextJS */ export declare function createNextJSVLibrasComponent<P extends object>(Component: ComponentType<P>, options?: { ssr?: boolean; loading?: ComponentType; fallback?: React.ReactNode; }): ComponentType<P>; /** * Utilitários para páginas NextJS */ export declare const NextJSUtils: { /** * getStaticProps helper para VLibras */ getVLibrasStaticProps: () => { props: { vlibrasConfig: { assetsPath: string; ssr: boolean; }; }; }; /** * getServerSideProps helper para VLibras */ getVLibrasServerSideProps: () => { props: { vlibrasConfig: { assetsPath: string; ssr: boolean; }; }; }; /** * Head tags para VLibras */ VLibrasHeadTags: () => import("react/jsx-runtime").JSX.Element; }; /** * Componente wrapper para páginas NextJS */ export declare function NextJSPageWrapper({ children, vlibrasConfig }: { children: React.ReactNode; vlibrasConfig?: NextJSVLibrasConfig; }): import("react/jsx-runtime").JSX.Element; export interface NextJSPageProps { vlibrasConfig?: NextJSVLibrasConfig; } /** * HOC para páginas NextJS com VLibras */ export declare function withNextJSVLibras<P extends object>(Page: ComponentType<P>, vlibrasConfig?: NextJSVLibrasConfig): { (props: P): import("react/jsx-runtime").JSX.Element; displayName: string; }; //# sourceMappingURL=NextJSCompatibility.d.ts.map