import { type CookedMaterialRecord, type MaterialCookProgramContext } from '@forgeax/engine-pack'; import type { MaterialProgramAddress } from '@forgeax/engine-types'; export interface MaterialLoadRequest { readonly guid: string; readonly specializationKey: string; } export interface MaterialReady { readonly status: 'Ready'; readonly record: CookedMaterialRecord & Required>; } export interface MaterialPublication { readonly guid: string; readonly record: unknown; readonly artifactError?: { readonly code: 'asset-artifact-missing' | 'asset-artifact-integrity-mismatch'; readonly expected: string; readonly actual?: string; }; readonly artifacts?: Readonly>; } export type MaterialLoadErrorCode = 'material-specialization-not-cooked' | 'asset-artifact-missing' | 'asset-artifact-integrity-mismatch' | 'material-cook-record-invalid' | 'material-reference-not-ready'; export interface MaterialLoadErrorDetail { readonly guid: string; readonly specializationKey: string; readonly publicationGeneration?: number; readonly field?: string; readonly pass?: string; readonly context?: MaterialCookProgramContext; readonly address?: MaterialProgramAddress; readonly matches?: number; readonly vertexColorAvailable?: boolean; readonly missing?: readonly string[]; readonly expected?: string; readonly actual?: string; } export interface MaterialLoadError { readonly status: 'Error'; readonly error: { readonly code: MaterialLoadErrorCode; readonly expected: string; readonly hint: string; readonly retryable: boolean; readonly recoveryActions: readonly string[]; readonly detail: MaterialLoadErrorDetail; }; } export interface MaterialLoaderOptions { readonly loadPublication: (guid: string, specializationKey: string) => Promise; readonly loadReference?: (guid: string) => Promise; } export declare function createMaterialLoader(options: MaterialLoaderOptions): { load(request: MaterialLoadRequest): Promise; }; //# sourceMappingURL=loader.d.ts.map