import { Tree } from '@lezer/common'; import { ParsedModule, ShaderDefine } from './types.d.mts'; import LRU from 'lru-cache'; export { loadStaticModule, loadVirtualModule, bindEntryPoint } from '../util/shader.d.mts'; /** LRU cache for parsed shader code */ export declare const makeModuleCache: (options?: Record) => LRU; export declare const DEFAULT_CACHE: LRU; /** Parse WGSL code into lezer tree */ export declare const parseShader: (code: string) => Tree; /** Parse a code module into its in-memory representation (AST + symbol table) */ export declare const loadModule: (code: string, name?: string, entry?: string, compressed?: boolean) => import("...d.mts").ParsedModule; /** Use cache to load modules */ export declare const loadModuleWithCache: (code: string, name?: string, entry?: string, cache?: import("...d.mts").ParsedModuleCache | null) => import("...d.mts").ParsedModule; /** Make WGSL constant definitions */ export declare const defineConstants: (defs: Record) => string; /** Make WGSL constant definitions */ export declare const defineEnables: (enabled: string[]) => string; /** Convert a bundle with a defined entry point to a definition for that attribute or type. */ export declare const bundleToAttribute: (shader: import("...d.mts").ShaderModule, name?: string) => import("./types.d.mts").UniformAttribute; /** Convert a bundle to a definition for all its linkable attributes. */ export declare const bundleToAttributes: (shader: import("...d.mts").ShaderModule) => import("./types.d.mts").UniformAttribute[]; /** Convert a bundle to a definition for all its bindings. */ export declare const bundleToBindings: (shader: import("...d.mts").ShaderModule) => import("./types.d.mts").UniformAttribute[]; /** Convert an attribute to all its primitive fields. */ export declare const attributeToFields: (attribute: import("./types.d.mts").UniformAttribute) => import("./types.d.mts").UniformAttribute; export declare const symbolDictionary: { A: "at"; B: "bindings"; C: "vec4"; D: "vec3"; E: "exports"; F: "func"; G: "flags"; H: "inferred"; I: "identifiers"; J: "imported"; K: "imports"; L: "linkable"; M: "members"; N: "name"; O: "modules"; P: "parameters"; Q: "qual"; R: "symbol"; S: "symbols"; T: "type"; U: "struct"; V: "variable"; W: "visibles"; X: "externals"; Y: "types"; Z: "attr"; }; /** ES/CommonJS Transpiler */ export declare const transpileWGSL: (source: string, resourcePath: string, options?: import("...d.mts").TranspileOptions) => import("...d.mts").TranspileOutput; /** Templated literal syntax: ```tsx wgsl`...` ``` */ export declare const wgsl: (literals: TemplateStringsArray, ...tokens: string[]) => import("...d.mts").ParsedModule; /** Format `number` as WGSL `f32` */ export declare const f32: (x: number) => string; /** Format `number` as WGSL `u32` */ export declare const u32: (x: number) => string; /** Format `number` as WGSL `i32` */ export declare const i32: (x: number) => string;