import type { Align, FlexDirection, Justify, Node, Wrap } from 'yoga-layout'; import * as Yoga from 'yoga-layout'; export type FlexPlane = 'xy' | 'yz' | 'xz'; export type ClassParser = (className: string, props: NodeProps) => NodeProps; export type Axis = 'x' | 'y' | 'z'; /** * This map provides the prop setters as well as the types for the props. The * first input of a setter is used as the prop value. The second input is the * node to apply the prop to. The value of a prop needs to be a primitive type, * so that it can be trivially compared to the previous value. This is used to * prevent unnecessary reflows. */ export declare const propSetter: { alignItems: (align: keyof typeof Align, node: Node) => void; alignSelf: (align: keyof typeof Align, node: Node) => void; alignContent: (align: keyof typeof Align, node: Node) => void; justifyContent: (justify: keyof typeof Justify, node: Node) => void; flexDirection: (dir: keyof typeof FlexDirection, node: Node) => void; flexWrap: (wrap: keyof typeof Wrap, node: Node) => void; flex: (flex: Parameters[0], node: Node) => void; flexBasis: (basis: Parameters[0], node: Node) => void; flexGrow: (grow: Parameters[0], node: Node) => void; flexShrink: (shrink: Parameters[0], node: Node) => void; height: (height: Parameters[0], node: Node) => void; width: (width: Parameters[0], node: Node) => void; maxHeight: (maxHeight: Parameters[0], node: Node) => void; maxWidth: (maxWidth: Parameters[0], node: Node) => void; minHeight: (minHeight: Parameters[0], node: Node) => void; minWidth: (minWidth: Parameters[0], node: Node) => void; /** As of now, this won't work since the bounding box is still computed by nodes marked as absolutely positioned */ top: (top: Parameters[1], node: Node) => void; right: (right: Parameters[1], node: Node) => void; bottom: (bottom: Parameters[1], node: Node) => void; left: (left: Parameters[1], node: Node) => void; padding: (padding: Parameters[1], node: Node) => void; paddingTop: (paddingTop: Parameters[1], node: Node) => void; paddingRight: (paddingRight: Parameters[1], node: Node) => void; paddingBottom: (paddingBottom: Parameters[1], node: Node) => void; paddingLeft: (paddingLeft: Parameters[1], node: Node) => void; margin: (margin: Parameters[1], node: Node) => void; marginTop: (marginTop: Parameters[1], node: Node) => void; marginRight: (marginRight: Parameters[1], node: Node) => void; marginBottom: (marginBottom: Parameters[1], node: Node) => void; marginLeft: (marginLeft: Parameters[1], node: Node) => void; gap: (gap: Parameters[1], node: Node) => { unit: Yoga.Unit; value: number; }; gapColumn: (gapColumn: Parameters[1], node: Node) => { unit: Yoga.Unit; value: number; }; gapRow: (gapRow: Parameters[1], node: Node) => { unit: Yoga.Unit; value: number; }; aspectRatio: (aspectRatio: Parameters[0], node: Node) => void; }; export type NodeProps = { [Key in keyof typeof propSetter]?: Parameters<(typeof propSetter)[Key]>[0]; }; export declare const applyNodeProps: (node: Node, props: NodeProps, scaleFactor: number) => void;