import { PieContent, PieItemElement, PieModel } from "../interface"; export declare const createTag: (npmPkg: any) => string; /** * Replaces all user-defined element name mappings with ones derived from * the NPM package name. * @param content the content to normalize */ export declare const normalizeContentElements: (content: PieContent) => PieContent; /** * Convert an npm package to html valid element name by replacing * all special chars with `-` * @param npmPackage npm package to convert */ export declare const packageToElementName: (npmPackage: string) => string; export declare const getPackageWithoutVersion: (packages: any) => string; /** * See if the `PieContent.elements` set contains the provided package. * * @param elements the elements dict * @param npmPackage the npm package to locate */ export declare const elementsHasPackage: (elements: PieItemElement, npmPackage: string) => boolean; /** * Gets all models defined for a given npmPacakge in `PieContent` * @param pieContent the pie content * @param npmPackage npm package name */ export declare const modelsForPackage: (pieContent: PieContent, npmPackage: string) => PieModel[]; /** * Gets the element tag defined for a package. * @param pieContent the pie content * @param npmPackage npm package name */ export declare const elementForPackage: (pieContent: PieContent, npmPackage: string) => string; export declare const getPackageBundleUri: (pies: PieItemElement) => string; export declare const pieContentFromConfig: (config: any) => PieContent; export declare const patchMDCSwitchFocus: (element: any) => void; /** * Creates short id for use within pie models. * Can be used to create random element tag or model id. */ export declare const pieShortIdGenerator: () => string; /** * Check if an error is a network error */ export declare const isNetworkError: (error: Error) => boolean; /** * Execute an async function and retry with exponential backoff * based on the maximum retry attempts it can perform. * * @param fn: Promise-returning function to retry. * @param maxRetries: The maximum number of times to attempt the function. * @param delay: The delay, in milliseconds. */ export declare const withRetry: (fn: (currentDelay: number, attempt: number) => Promise, maxRetries: number, delay?: number, maxDelay?: number) => Promise;