import type { AttributeType, DataElement } from "../data/elements"; import type { Alignment, Axis, CrossAxisAlignment, Fit, MainAxisAlignment, MainAxisSize, PageContainerType, Stretch, TitleFrom } from "../enums"; import type { ActionDefinition } from "../structural/actions"; import type { LabeledElement, NamedElement } from "./base"; import type { ButtonGroup } from "./buttons"; /** * Size specification. * Maps to: ui:Size * * EMF Defaults: * - width: -1 (unset/auto) * - height: -1 (unset/auto) */ export interface Size { /** Width in pixels. @default -1 (unset/auto) */ width?: number; /** Height in pixels. @default -1 (unset/auto) */ height?: number; } /** * Size constraints (min/max). * Maps to: ui:SizeConstraint * * EMF Defaults: * - minWidth: -1 (no minimum) * - minHeight: -1 (no minimum) * - maxWidth: -1 (no maximum) * - maxHeight: -1 (no maximum) */ export interface SizeConstraint { /** Minimum width. @default -1 (no minimum) */ minWidth?: number; /** Minimum height. @default -1 (no minimum) */ minHeight?: number; /** Maximum width. @default -1 (no maximum) */ maxWidth?: number; /** Maximum height. @default -1 (no maximum) */ maxHeight?: number; } /** * Alignment specification. * Maps to: ui:Align */ export interface Align { alignment: Alignment; } /** * Frame styling for cards/panels. * Maps to: ui:Frame * * EMF Defaults: * - elevation: 4 * - radius: 5 */ export interface Frame { "xmi:id"?: string; /** Elevation level for shadow effect. @default 4 */ elevation?: number; /** Border radius. @default 5 */ radius?: number; } /** * Icon definition. * Maps to: ui:Icon */ export interface Icon extends NamedElement { iconName?: string; } /** * Base visual element - all UI components extend this. * Maps to: ui:VisualElement * * EMF Defaults: * - col: 4 * - row: 1 * - fit: NONE * - stretch: NONE * - disabled: false * - isInCard: false * - isReadOnly: false */ export interface VisualElement extends NamedElement, LabeledElement { "@type": string; /** Column span in grid layout. @default 4 */ col?: number; /** Row span in grid layout. @default 1 */ row?: number; /** Fit behavior in flex container. @default NONE */ fit?: Fit; /** Stretch behavior. @default NONE */ stretch?: Stretch; size?: Size; sizeConstraint?: SizeConstraint; align?: Align; order?: number; /** Whether element is disabled. @default false */ disabled?: boolean; hidden?: boolean; /** Whether element is read-only. @default false */ isReadOnly?: boolean; /** Whether element is in a card context. @default false */ isInCard?: boolean; /** Resolved reference to AttributeType that controls visibility */ hiddenBy?: AttributeType; /** Resolved reference to AttributeType that controls enabled state */ enabledBy?: AttributeType; /** Resolved reference to AttributeType that controls required state */ requiredBy?: AttributeType; customImplementation?: boolean; onBlur?: boolean; subTheme?: string; } /** * Base container with children. * Maps to: ui:Container */ export interface Container extends VisualElement { children: VisualElement[]; actionButtonGroups?: ButtonGroup[]; } /** * Flex layout container. * Maps to: ui:Flex * * EMF Defaults: * - direction: HORIZONTAL (first enum literal) * - mainAxisAlignment: CENTER (first enum literal) * - crossAxisAlignment: START (explicit default) * - mainAxisSize: MIN (first enum literal) */ export interface Flex extends Container { "@type": "Flex"; /** Layout direction. @default HORIZONTAL */ direction?: Axis; /** Main axis alignment. @default CENTER */ mainAxisAlignment?: MainAxisAlignment; /** Cross axis alignment. @default START */ crossAxisAlignment?: CrossAxisAlignment; /** Main axis size behavior. @default MIN */ mainAxisSize?: MainAxisSize; /** Resolved reference to DataElement */ dataElement?: DataElement; frame?: Frame; } /** * Page container - top level container for pages. * Maps to: ui:PageContainer * * EMF Defaults: * - type: TABLE (first enum literal) * - generateVisualPropertiesHook: false * - Inherits Flex defaults */ export interface PageContainer extends Omit { "@type": "PageContainer"; transferPackageNameTokens?: string[]; transferPageName?: string; /** Resolved reference to title AttributeType */ titleAttribute?: AttributeType; titleFrom?: TitleFrom; /** Resolved reference to onInit ActionDefinition */ onInit?: ActionDefinition; /** Container type. @default TABLE */ type?: PageContainerType; templateAction?: ActionDefinition; /** Resolved references to additional mask AttributeTypes */ additionalMaskAttributes?: AttributeType[]; /** Whether to generate visual properties hook. @default false */ generateVisualPropertiesHook: boolean; } /** * Empty space for layout. * Maps to: ui:Spacer */ export interface Spacer extends VisualElement { "@type": "Spacer"; } /** * Visual divider/separator. * Maps to: ui:Divider */ export interface Divider extends VisualElement { "@type": "Divider"; } //# sourceMappingURL=layout.d.ts.map