import { BookMetadata, Contributor, LanguageMap, Section } from '../core/types'; import { ExportOptions, ExportSelection } from '../core/exporter'; import { extensionFromMime, extensionFromPath, getMimeTypeFromPath, escapeXML, escapeAttr } from '../core/utils'; export { extensionFromMime, extensionFromPath, getMimeTypeFromPath, escapeXML, escapeAttr }; export declare function parseDataURI(src: string): { mimeType: string; bytes: Uint8Array; } | null; export declare function decodeBase64(base64: string): Uint8Array; export declare function toBytes(data: string | ArrayBuffer | Blob): Promise; export declare function canExportFirstSectionsSelection(selection: ExportSelection): boolean; export declare function shouldPackageResource(url: string): boolean; export declare function loadReferencedResource(url: string, options: ExportOptions): Promise<{ mimeType: string; bytes: Uint8Array; } | null>; export declare function extractDocumentTitle(html: string): string | null; export declare function sectionTitleFromId(section: Section): string | null; export declare function resolveSectionTitle(section: Section, index: number, html: string | undefined, preferredTitle: string | undefined, fallbackPrefix?: string): string; export declare function normalizeTitleText(value: string | undefined): string; export declare function stringifyLanguageMap(value: LanguageMap | undefined): string; export declare function normalizeLanguage(value: string | string[] | undefined): string; export declare function stringifyContributor(value: Contributor | readonly Contributor[] | undefined): string | undefined; export declare function buildExportTitle(metadata: BookMetadata | undefined): string; export declare function buildIdentifier(metadata: BookMetadata | undefined): string; /** * Strip HTML tags and decode basic entities to produce plain text. * This is a lightweight regex-based approach suitable for section content. */ export declare function htmlToText(html: string): string; export declare function extractBodyContent(html: string): string; export declare function stripDocumentShell(html: string): string; export declare function normalizeHTMLFragment(html: string): string; export type ResourceAttributeRewriter = (url: string, attr: string, rawAttribute: string) => Promise | string | null; export declare function rewriteResourceAttributes(html: string, rewrite: ResourceAttributeRewriter): Promise; //# sourceMappingURL=utils.d.ts.map