import type { IThumbnail } from './Asset'; interface IMetadata { /** * The filename of the original asset, if it exists/can be derived */ filename: string; } /** * Represents the asset that the provenance data is extracted from */ export declare class Source { #private; /** * The binary data of the source asset */ readonly blob: Blob; /** * Any metadata that we know/can derive from the asset (e.g. filename) */ readonly metadata: Partial; /** * Creates a new source instance * * @param blob - The binary data of the source asset * @param metadata - Any additional metdata to include that we know up front * * @internal */ constructor(blob: Blob, metadata?: Partial); /** * Gets the mime type of the asset */ get type(): string; /** * Gets the filename of the asset, if it is known or able to be derived */ get filename(): string | undefined; /** * Determines if the source is valid */ isValid(): boolean; /** * Gets the binary data of this asset as an array buffer */ arrayBuffer(): Promise; /** * Gets the size of this asset (in bytes) */ size(): Promise; computeHash(): Promise; /** * Generates a blob URL from the source data * * @returns An object with a `url` and `dispose` function */ generateUrl(): Promise; /** * Attempts to get additional metadata for this source from its backing `File` object, if available * * @param file - The source data as a `File` object */ static metadataFromFile(file: File): { filename: string; }; /** * Attemps to derive additional metadata (namely `filename`) from the URL * * @param url - The URL of the source data */ static metadataFromUrl(url: string): { filename: string; }; } export {}; //# sourceMappingURL=Source.d.ts.map