export type ParamType = 'number' | 'text' | 'boolean' | 'vector' | 'dropdown'; export type CustomizerDefault = number | string | boolean | Array; export interface DropdownOption { value: string | number; label: string; } export type ParamWidget = 'textarea'; export interface CustomizerParam { name: string; type: ParamType; default: CustomizerDefault; description: string; group: string; hidden: boolean; min?: number; max?: number; step?: number; /** Max character length, from a bare (bracket-less) numeric trailing comment on a string param, e.g. `label = "x"; // 8`. */ maxLength?: number; options?: DropdownOption[]; /** * Rendering hint beyond real OpenSCAD Customizer syntax (verified against * the official manual: there is no native multi-line widget — a bare `// * [textarea]` is not a bracket form the desktop Customizer's own comment * parser recognizes for a string, so on a real .scad file it should be * silently ignored there, falling back to an ordinary single-line text * box — not a divergent/broken file, just a no-op elsewhere). Only ever * set when `type === 'text'`. */ widget?: ParamWidget; } export interface CustomizerGroup { name: string; hidden: boolean; params: CustomizerParam[]; } export interface CustomizerSchema { groups: CustomizerGroup[]; params: CustomizerParam[]; defaults: Record; } export declare function parseCustomizer(source: string): CustomizerSchema;