import type { Rect } from './anchor-solver.js'; export declare const ACTIONS: readonly ["ui_create_control", "ui_set_layout", "ui_get_layout", "ui_anchor_preset", "ui_set_theme", "ui_container_add", "ui_draw_recipe", "ui_build_layout", "ui_measure_layout", "ui_import_prototype", "ui_pixel_verify", "theme_create", "theme_set_property"]; export declare const CONTROL_TYPES: readonly ["Button", "Label", "Panel", "LineEdit", "TextEdit", "RichTextLabel", "LinkButton", "HSlider", "VSlider", "CheckBox", "CheckButton", "OptionButton", "SpinBox", "ProgressBar", "TextureRect", "ColorPickerButton", "TabContainer", "Tree", "ItemList", "MarginContainer", "HBoxContainer", "VBoxContainer", "GridContainer", "CenterContainer", "ScrollContainer", "PanelContainer", "HSplitContainer", "VSplitContainer", "NinePatchRect"]; export declare const ANCHOR_PRESETS: Record; export declare const ERROR_CODES: { readonly INVALID_CONTROL_TYPE: "INVALID_CONTROL_TYPE"; readonly INVALID_ANCHOR_PRESET: "INVALID_ANCHOR_PRESET"; readonly INVALID_PARAMS: "INVALID_PARAMS"; readonly INVALID_DRAW_OP: "INVALID_DRAW_OP"; readonly NODE_NOT_FOUND: "NODE_NOT_FOUND"; readonly SCRIPT_EXEC_FAILED: "SCRIPT_EXEC_FAILED"; readonly THEME_NOT_FOUND: "THEME_NOT_FOUND"; readonly INVALID_THEME_PROPERTY: "INVALID_THEME_PROPERTY"; readonly INVALID_THEME_ITEM_TYPE: "INVALID_THEME_ITEM_TYPE"; }; export declare const DRAW_OP_KINDS: readonly ["rect", "circle", "line", "arc", "polygon", "polyline", "string"]; export type DrawOp = { kind: string; [key: string]: unknown; }; export interface FlexLayout { direction: 'row' | 'column' | 'row-reverse' | 'column-reverse' | 'grid'; justify?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly'; align?: 'stretch' | 'flex-start' | 'center' | 'flex-end'; wrap?: 'nowrap' | 'wrap'; gap?: number; row_gap?: number; padding?: number | [number, number, number, number]; columns?: number; } export interface FlexChild { grow?: number; shrink?: number; align_self?: 'auto' | 'flex-start' | 'center' | 'flex-end' | 'stretch'; min_width?: number; min_height?: number; max_width?: number; max_height?: number; } /** stylebox 类 theme override 槽位白名单(spec §3.3;Godot 4.7 序列化属性名 * theme_override_styles/,spec 原文 styleboxes 系误写——Task 4 集成实测)。 * hover/pressed/disabled 仅供 ui_build_layout 手写树入口,翻译器永不产出; * focus/read_only 等显式不进(YAGNI:每扩一槽须定义语义边界+测试面)。 * 双份硬编码:GD 侧副本在 ui-measure.ts 生成脚本的 _all_slots(override 并集扫描),扩槽须两处同步。 */ export type StyleBoxSlot = 'panel' | 'normal' | 'background' | 'fill' | 'hover' | 'pressed' | 'disabled'; export declare const STYLEBOX_SLOTS: readonly StyleBoxSlot[]; /** StyleBoxFlat 描述(spec §3.2);corner_radius 支持统一值或四角对象。 */ export interface StyleBoxFlatSpec { bg_color?: [number, number, number, number]; corner_radius?: number | { tl?: number; tr?: number; br?: number; bl?: number; }; border_width?: number; border_color?: [number, number, number, number]; draw_center?: boolean; } export interface StyleBoxOverride { slot: StyleBoxSlot; box: StyleBoxFlatSpec; } export type UiNodeSpec = { type: string; name: string; properties?: Record; anchor_preset?: string; rect?: Rect; layout?: FlexLayout; flex?: FlexChild; styleboxes?: StyleBoxOverride[]; children?: UiNodeSpec[]; }; /** 阶段4 同源安全: 返回 properties 中命中 BLOCKED_PROPS 的 key(script/owner/name/instance 等危险属性)。 * 对齐 material-ops IMP-1 / scene S1——UI 工具此前未传播此安全策略。 */ export declare function findBlockedProps(properties?: Record): string[]; export declare function genPropertyLines(properties: Record): string; /** Convert a color value ([r,g,b] or [r,g,b,a]) to a GDScript Color() expression. */ export declare function colorToGd(c: unknown): string;