/** Layout tree types — mirrors widget-react / widget-flutter. */ export type AttributeBag = Record; export interface WidgetCollectionRef { id: string; name: string; } export interface DisplayItemColumn { id: string; /** Component type id, e.g. `r-text`, or a `Collection_…` reference. */ type: string; /** Absent or `"default"` → default library. */ libraryId?: string; componentAttributes?: AttributeBag; /** @deprecated Legacy field — readers check `componentAttributes` first. */ widgetAttributes?: AttributeBag; collection?: WidgetCollectionRef; } export interface DisplayItemRow { id: string; columns: DisplayItemColumn[]; horizontalAlignment?: string; verticalAlignment?: string; gap?: string; alignContent?: string; flexWrap?: string; rowAttributes?: AttributeBag; } /** * An object rather than a bare array so the stacking contract has somewhere to * grow without another breaking shape change. */ export interface WidgetOverlayLayers { /** * Each layer is a full `Items` — its own rows, columns, collections and * container settings — so a layer renders through the same recursion as the * base and needs no separate vocabulary. Order is paint order: later * entries sit above earlier ones. */ layers: Items[]; } export interface Items { rows: DisplayItemRow[]; containerAttributes?: AttributeBag; /** * Layers drawn over the rows above, each covering exactly the box the rows * occupy. Absent for the overwhelming majority of configs. Honoured in * preview and every published render; compose mode ignores it. * See `__docs__/CONTRACT_overlay_layers.md`. */ overlayLayers?: WidgetOverlayLayers; } export interface WidgetCollection { id: string; name: string; collectionRows?: Items; parentId?: string; } /** Effective attributes: prefer componentAttributes, fall back to widgetAttributes. */ export declare function columnAttributes(column: DisplayItemColumn): AttributeBag | undefined; export declare function parseItems(itemList: unknown): Items; //# sourceMappingURL=items.d.ts.map