import type { ResolvedLayoutProps, PlainObject } from '@xh/hoist/core'; /** * These utils support accepting the CSS styles enumerated below as top-level props of a Component, * and are typically accessed via the `@LayoutSupport` mixin (for class-based components) or the * `useLayoutProps()` Hook (for function components). * * Any supported properties will be extracted from the overall props bundle and returned from * `getLayoutProps()`. The contrasting `getNonLayoutProps()` will output all other props _not_ * included in this list, useful when e.g. relaying unrelated props to a child component without * also sending down unwanted/unexpected layout-related keys. * * The following properties are supported: * margin, marginTop, marginRight, marginBottom, marginLeft, * padding, paddingTop, paddingRight, paddingBottom, paddingLeft, * height, minHeight, maxHeight, width, minWidth, maxWidth, * flex, flexBasis, flexDirection, flexFlow, flexGrow, flexShrink, flexWrap, * alignItems, alignSelf, alignContent, justifyContent, * overflow, overflowX, overflowY, textOverflow, * top, left, position, display * * NOTE - this system relies on Components respecting and responding to these properties. * Component authors must ensure they do, typically by spreading the extracted props onto a * child component that also implements LayoutSupport. `Box` is typically the Hoist layout Component * that is ultimately rendered and will actually implement this system by outputting a div with * appropriate styles set. */ /** * Return all layout related props found in props. * * This method implements some minor translations, to allow a more user friendly specification than * that afforded by the underlying flexbox styles. In particular, it accepts flex and sizing props * as raw numbers rather than strings. Margin, padding, and gap accept a boolean shorthand: * `true` resolves to the `--xh-pad-px` CSS var (default 10px), `false` is treated as unset. */ export declare function getLayoutProps(props: PlainObject): ResolvedLayoutProps; /** * Return all non-layout related props found in props. */ export declare function getNonLayoutProps(props: T): T; /** * Split a set of props into layout and non-layout props. */ export declare function splitLayoutProps(props: T): [ResolvedLayoutProps, T];