import { AssetError, type MaterialAsset } from '@forgeax/engine-types'; import type { AssetRegistry } from '../asset-registry'; /** Validate the asset-owned parameter schema and pass module identifiers. */ export declare function validateMaterialPasses(asset: MaterialAsset): AssetError | null; /** * Sprite 9-slice values fail-fast validation * (feat-20260527-sprite-nineslice M2 / w8, plan-strategy §D-1 + AC-08). * * Fires when: * - asset.kind === 'material' * - first pass shader === 'forgeax::sprite' * - values.slices is present * * Six fail-fast branches (1:1 with w4 test): * (1) any component is negative * (2) slices.x + slices.z >= region.zw[0] (X-axis overlap) * (3) slices.y + slices.w >= region.zw[1] (Y-axis overlap) * (4) any component is NaN * (5) any component is Infinity * (6) length !== 4 * * Reuses the existing 'asset-invalid-value' member of the closed * `AssetErrorCode` 13-member union (no new code added per * AGENTS.md §Error model). The `.expected` literal mirrors the AI-User * Charter §3 string; `.hint` inlines the offending sum + the relevant * `region.zw` numeral so AI users can copy-paste the prompt straight * back into the IDE for self-recovery (plan-strategy §R-4). * * @returns AssetError on failure, null on success. */ export declare function validateSpriteSlices(asset: MaterialAsset): AssetError | null; export declare function validateParamType(type: string, value: unknown): boolean; /** * feat-20260527-sprite-nineslice M4 / w18 (D-9): register-time soft-warn * for sliceMode=1 (tile) bound to a sampler whose addressMode is not * 'repeat'. Bumps `nineslice.tile-needs-repeat-sampler` once per offending * catalogue call. Never throws -- the counter is the sole AI-user-facing * signal (charter P3 machine-readable; AC-08 closed, never extends * AssetErrorCode). * * feat-20260614 M8 (D-19): `values.sampler` is now an embedded GUID * string (dash-form), resolved against the catalogue rather than a handle. */ export declare function detectTileNeedsRepeatSampler(registry: AssetRegistry, asset: MaterialAsset): void; /** * feat-20260613-material-paramschema-driven-binding M4 / w23 (D-5 graceful): * Return the texture-field name set for the given material-shader id, * derived from the registered shader's paramSchema via `derive(paramSchema) * .textureFieldNames`. Returns `undefined` when the shader is not yet * registered (cross-worktree shader-late-register, plan R-4). * * Used by `extractFrame` to know which values fields the shader * declares as texture handles; the extract layer validates handle-vs- * scalar typing and drops misclassified slots so the record stage's * MISSING_TEXTURE_HANDLE fallback can take over (white default texture) * rather than letting a stray handle reach `device.createBindGroup`. */ export declare function materialShaderTextureFieldNames(registry: AssetRegistry, shaderId: string): ReadonlySet | undefined; //# sourceMappingURL=validate-material.d.ts.map