import { Logger } from './logger'; /** * Creates a logger instance using the platform's logger factory * * This function retrieves the logger factory from the global Lime platform * object and creates a scoped logger. If the platform factory is not available, * it falls back to the browser console. * * The package name is automatically determined from the module's URL on the first * call and cached for all subsequent calls. This ensures consistent logger scopes * across all loggers created from the same module instance. * * @param scope - The scope/category for the logger (e.g., 'my-component', 'http-client') * @returns A logger instance integrated with the platform or console fallback * * @remarks * The console fallback is provided for development scenarios where the full * Lime platform is not available. The console object does not fully implement * the Logger interface but provides compatible logging methods. * * @example Create a scoped logger * ```ts * import { createLogger } from '@limetech/lime-web-components'; * * const logger = createLogger('my-component'); * * logger.info('Component initialized'); * logger.debug('Processing data', { count: 42 }); * ``` * * @beta * @group Logger */ export declare function createLogger(scope: string): Logger; /** * Returns the first http(s) URL found in an error stack string, or null * when the stack is empty or holds no URL. Kept separate from * getUrlFromErrorStack so the parsing can be tested without depending on * the runtime's actual stack format. * * @param stack - The error stack to scan. * @returns The first matched URL, or null. */ export declare function parseUrlFromStack(stack: string | null | undefined): string | null; /** * Extracts the package name from a given URL * * Supports multiple URL patterns: * - `/packages/@scope/name/version/...` → extracts `name` * - `/static/name+version/...` → extracts `name` * - `/static/directory/name+version/...` → extracts `name` * - `/static/name/...` → extracts `name` * * The extracted name is cleaned by removing common prefixes and suffixes. * * @param url - The URL string to extract the package name from * * @returns The extracted package name, or null if not found * * @beta * @group Logger */ export declare function getPackageNameFromUrl(url: string | null): string | null;