import { PropsWithChildren, ReactNode } from 'react'; import { VuerProps } from '../../interfaces'; export type ContribLoaderProps = PropsWithChildren void; /** @dial-ignore */ onError?: (error: Error) => void; /** @dial-ignore */ render?: (modules: Record, ready: boolean) => ReactNode; }>>; /** * ContribLoader dynamically loads external JavaScript libraries/modules at runtime. * It supports loading from CDN (jsDelivr), local development modules, or custom URLs. * * @param _key - Unique identifier for this loader instance (default: 'contrib-loader') * @param url - Direct URL to load the script from (overrides library/version/main) * @param async - Whether to load the script asynchronously (default: false) * @param library - NPM package name to load from jsDelivr CDN * @param version - Package version to load (default: 'latest') * @param main - Entry point file within the package (default: 'dist/index.js') * @param devMode - Whether to use local development mode. When true and running on localhost, * loads modules via Vite's import system instead of CDN. Uses import.meta.env.MODE * to detect the development environment (not NODE_ENV). Default: import.meta.env.MODE === 'development' * @param dependencies - Array of global dependencies that must exist before loading * @param onLoad - Callback function executed when script loads successfully * @param onError - Callback function executed if script loading fails * * @example * // Load from CDN in production * * * @example * // Load with custom URL * * * @example * // Load with dependencies and callbacks * console.log('Loaded!')} * onError={(err) => console.error('Failed:', err)} * /> **/ export declare const ContribLoader: ({ _key: key, url, async, library, version, main, devMode, dependencies, onLoad, onError, render, children, }: ContribLoaderProps) => ReactNode;